]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/win32/win32_factory.cpp
Add --data-path option. Access the src share directory now works from build tree.
[vlc] / modules / gui / skins2 / win32 / win32_factory.cpp
index 47d4556c90c21e65b974f02dfdafa542f7ef98f1..e7bbf66952b11dc9873c403ed1b44ac65653e829 100644 (file)
@@ -33,6 +33,7 @@
 #include "win32_loop.hpp"
 #include "../src/theme.hpp"
 #include "../src/window_manager.hpp"
+#include "../src/generic_window.hpp"
 #include "../commands/cmd_dialogs.hpp"
 #include "../commands/cmd_minimize.hpp"
 
@@ -225,17 +226,15 @@ bool Win32Factory::init()
     }
 
     // Initialize the resource path
-    char *datadir = config_GetUserDataDir();
+    char *datadir = config_GetUserDir( VLC_DATA_DIR );
     m_resourcePath.push_back( (string)datadir + "\\skins" );
     free( datadir );
-    m_resourcePath.push_back( (string)config_GetDataDir() +
-                              "\\skins" );
-    m_resourcePath.push_back( (string)config_GetDataDir() +
-                              "\\skins2" );
-    m_resourcePath.push_back( (string)config_GetDataDir() +
-                              "\\share\\skins" );
-    m_resourcePath.push_back( (string)config_GetDataDir() +
-                              "\\share\\skins2" );
+    datadir = config_GetDataDir( getIntf() );
+    m_resourcePath.push_back( (string)datadir + "\\skins" );
+    m_resourcePath.push_back( (string)datadir + "\\skins2" );
+    m_resourcePath.push_back( (string)datadir + "\\share\\skins" );
+    m_resourcePath.push_back( (string)datadir + "\\share\\skins2" );
+    free( datadir );
 
     // All went well
     return true;
@@ -323,7 +322,8 @@ OSTimer *Win32Factory::createOSTimer( CmdGeneric &rCmd )
 
 
 OSWindow *Win32Factory::createOSWindow( GenericWindow &rWindow, bool dragDrop,
-                                        bool playOnDrop, OSWindow *pParent )
+                                        bool playOnDrop, OSWindow *pParent,
+                                        GenericWindow::WindowType_t type )
 {
     return new Win32Window( getIntf(), rWindow, m_hInst, m_hParentWindow,
                             dragDrop, playOnDrop, (Win32Window*)pParent );
@@ -389,24 +389,12 @@ void Win32Factory::changeCursor( CursorType_t type ) const
     LPCTSTR id;
     switch( type )
     {
-        case kDefaultArrow:
-            id = IDC_ARROW;
-            break;
-        case kResizeNWSE:
-            id = IDC_SIZENWSE;
-            break;
-        case kResizeNS:
-            id = IDC_SIZENS;
-            break;
-        case kResizeWE:
-            id = IDC_SIZEWE;
-            break;
-        case kResizeNESW:
-            id = IDC_SIZENESW;
-            break;
-        default:
-            id = IDC_ARROW;
-            break;
+    default:
+    case kDefaultArrow: id = IDC_ARROW;    break;
+    case kResizeNWSE:   id = IDC_SIZENWSE; break;
+    case kResizeNS:     id = IDC_SIZENS;   break;
+    case kResizeWE:     id = IDC_SIZEWE;   break;
+    case kResizeNESW:   id = IDC_SIZENESW; break;
     }
 
     HCURSOR hCurs = LoadCursor( NULL, id );