]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/main_interface_win32.cpp
Qt: fix typos
[vlc] / modules / gui / qt4 / main_interface_win32.cpp
index be670ce836ae0daf6e0dce7eb3ee72792397d9f2..be786ccb6f9e6eeec8f52a4d36eb253f4d15e793 100644 (file)
@@ -27,9 +27,8 @@
 #include "input_manager.hpp"
 #include "actions_manager.hpp"
 
-#ifdef WIN32
- #include <QBitmap>
- #include <vlc_windows_interfaces.h>
+#include <QBitmap>
+#include <vlc_windows_interfaces.h>
 
 #define WM_APPCOMMAND 0x0319
 
@@ -87,12 +86,12 @@ void MainInterface::createTaskBarButtons()
     {
         p_taskbl->vt->HrInit(p_taskbl);
 
-        if(himl = ImageList_Create( 20, //cx
+        if( (himl = ImageList_Create( 20, //cx
                         20, //cy
                         ILC_COLOR32,//flags
                         4,//initial nb of images
                         0//nb of images that can be added
-                        ))
+                        ) ) != NULL )
         {
             QPixmap img   = QPixmap(":/win7/prev");
             QPixmap img2  = QPixmap(":/win7/pause");
@@ -135,12 +134,12 @@ void MainInterface::createTaskBarButtons()
 
         HRESULT hr = p_taskbl->vt->ThumbBarSetImageList(p_taskbl, winId(), himl );
         if(S_OK != hr)
-            msg_Err( p_intf, "ThumbBarSetImageList failed with error %08x", hr );
+            msg_Err( p_intf, "ThumbBarSetImageList failed with error %08lx", hr );
         else
         {
             hr = p_taskbl->vt->ThumbBarAddButtons(p_taskbl, winId(), 3, thbButtons);
             if(S_OK != hr)
-                msg_Err( p_intf, "ThumbBarAddButtons failed with error %08x", hr );
+                msg_Err( p_intf, "ThumbBarAddButtons failed with error %08lx", hr );
         }
         CONNECT( THEMIM->getIM(), playingStatusChanged( int ), this, changeThumbbarButtons( int ) );
     }
@@ -156,7 +155,7 @@ bool MainInterface::winEvent ( MSG * msg, long * result )
 {
     if (msg->message == taskbar_wmsg)
     {
-        //We received the taskbarbuttoncreated, now we can really create th buttons
+        //We received the taskbarbuttoncreated, now we can really create the buttons
         createTaskBarButtons();
     }
 
@@ -237,12 +236,9 @@ bool MainInterface::winEvent ( MSG * msg, long * result )
     }
     return false;
 }
-#endif
 
-//moc doesn't know about #ifdef, so we have to build this method for every platform
-void MainInterface::changeThumbbarButtons( int i_status)
+void MainInterface::changeThumbbarButtons( int i_status )
 {
-#ifdef WIN32
     // Define an array of three buttons. These buttons provide images through an
     // image list and also provide tooltips.
     DWORD dwMask = THB_BITMAP | THB_FLAGS;
@@ -264,6 +260,7 @@ void MainInterface::changeThumbbarButtons( int i_status)
 
     switch( i_status )
     {
+        case OPENING_S:
         case PLAYING_S:
             {
                 thbButtons[0].dwFlags = THBF_ENABLED;
@@ -272,7 +269,9 @@ void MainInterface::changeThumbbarButtons( int i_status)
                 thbButtons[1].iBitmap = 1;
                 break;
             }
+        case END_S:
         case PAUSE_S:
+        case ERROR_S:
             {
                 thbButtons[0].dwFlags = THBF_ENABLED;
                 thbButtons[1].dwFlags = THBF_ENABLED;
@@ -285,8 +284,5 @@ void MainInterface::changeThumbbarButtons( int i_status)
     }
     HRESULT hr =  p_taskbl->vt->ThumbBarUpdateButtons(p_taskbl, this->winId(), 3, thbButtons);
     if(S_OK != hr)
-        msg_Err( p_intf, "ThumbBarUpdateButtons failed with error %08x", hr );
-#endif
+        msg_Err( p_intf, "ThumbBarUpdateButtons failed with error %08lx", hr );
 }
-
-