]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/win32/win32_factory.cpp
* Some more fixes (+ don't redefine a function that already existed, reverts part...
[vlc] / modules / gui / skins2 / win32 / win32_factory.cpp
index 7e384f869139dad6ece09a362d7fb03049eed855..6fbe0e87307494ed5e569114faad2916aa0c3b9e 100644 (file)
@@ -37,7 +37,7 @@
 #include "../commands/cmd_minimize.hpp"
 
 // Custom message for the notifications of the system tray
-#define MY_WSTRAYACTION (WM_APP + 1)
+#define MY_WM_TRAYACTION (WM_APP + 1)
 
 
 LRESULT CALLBACK Win32Proc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
@@ -73,14 +73,11 @@ LRESULT CALLBACK Win32Proc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
             }
             else
             {
-                msg_Err( p_intf, "WM_SYSCOMMAND %i", wParam );
+                msg_Dbg( p_intf, "WM_SYSCOMMAND %i", wParam );
             }
-//            if( (Event *)wParam != NULL )
-//                ( (Event *)wParam )->SendEvent();
-//            return 0;
         }
         // Handle systray notifications
-        else if( uMsg == MY_WSTRAYACTION )
+        else if( uMsg == MY_WM_TRAYACTION )
         {
             if( (UINT)lParam == WM_LBUTTONDOWN )
             {
@@ -175,7 +172,7 @@ bool Win32Factory::init()
     m_trayIcon.hWnd = m_hParentWindow;
     m_trayIcon.uID = 42;
     m_trayIcon.uFlags = NIF_ICON|NIF_TIP|NIF_MESSAGE;
-    m_trayIcon.uCallbackMessage = MY_WSTRAYACTION;
+    m_trayIcon.uCallbackMessage = MY_WM_TRAYACTION;
     m_trayIcon.hIcon = LoadIcon( m_hInst, _T("VLC_ICON") );
     strcpy( m_trayIcon.szTip, "VLC media player" );
 
@@ -228,15 +225,15 @@ bool Win32Factory::init()
     }
 
     // Initialize the resource path
-    m_resourcePath.push_back( (string)getIntf()->p_vlc->psz_homedir +
+    m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir +
                                "\\" + CONFIG_DIR + "\\skins" );
-    m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath +
+    m_resourcePath.push_back( (string)config_GetDataDir( getIntf() ) +
                               "\\skins" );
-    m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath +
+    m_resourcePath.push_back( (string)config_GetDataDir( getIntf() ) +
                               "\\skins2" );
-    m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath +
+    m_resourcePath.push_back( (string)config_GetDataDir( getIntf() ) +
                               "\\share\\skins" );
-    m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath +
+    m_resourcePath.push_back( (string)config_GetDataDir( getIntf() ) +
                               "\\share\\skins2" );
 
     // All went well
@@ -368,13 +365,12 @@ int Win32Factory::getScreenHeight() const
 }
 
 
-Rect Win32Factory::getWorkArea() const
+SkinsRect Win32Factory::getWorkArea() const
 {
     RECT r;
     SystemParametersInfo( SPI_GETWORKAREA, 0, &r, 0 );
     // Fill a Rect object
-    Rect rect( r.left, r.top, r.right, r.bottom );
-    return rect;
+    return  SkinsRect( r.left, r.top, r.right, r.bottom );
 }