]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/main_interface_win32.cpp
Qt: main_interface: fix showTab(oldwidget) for undocked playlist (fix #6794)
[vlc] / modules / gui / qt4 / main_interface_win32.cpp
index d3ae1bd5e326e3ea105ea030b01e81de0a88447f..fdf5d69d95429b42222aff36cf77a7ccdccc432e 100644 (file)
@@ -79,12 +79,12 @@ void MainInterface::createTaskBarButtons()
 
     CoInitialize( 0 );
 
-    if( S_OK == CoCreateInstance( &clsid_ITaskbarList,
+    if( S_OK == CoCreateInstance( CLSID_TaskbarList,
                 NULL, CLSCTX_INPROC_SERVER,
                 IID_ITaskbarList3,
                 (void **)&p_taskbl) )
     {
-        p_taskbl->vt->HrInit(p_taskbl);
+        p_taskbl->HrInit();
 
         if( (himl = ImageList_Create( 20, //cx
                         20, //cy
@@ -103,18 +103,18 @@ void MainInterface::createTaskBarButtons()
             QBitmap mask4 = img4.createMaskFromColor(Qt::transparent);
 
             if(-1 == ImageList_Add(himl, img.toWinHBITMAP(QPixmap::PremultipliedAlpha),mask.toWinHBITMAP()))
-                msg_Err( p_intf, "ImageList_Add failed" );
+                msg_Err( p_intf, "First ImageList_Add failed" );
             if(-1 == ImageList_Add(himl, img2.toWinHBITMAP(QPixmap::PremultipliedAlpha),mask2.toWinHBITMAP()))
-                msg_Err( p_intf, "ImageList_Add failed" );
+                msg_Err( p_intf, "Second ImageList_Add failed" );
             if(-1 == ImageList_Add(himl, img3.toWinHBITMAP(QPixmap::PremultipliedAlpha),mask3.toWinHBITMAP()))
-                msg_Err( p_intf, "ImageList_Add failed" );
+                msg_Err( p_intf, "Third ImageList_Add failed" );
             if(-1 == ImageList_Add(himl, img4.toWinHBITMAP(QPixmap::PremultipliedAlpha),mask4.toWinHBITMAP()))
-                msg_Err( p_intf, "ImageList_Add failed" );
+                msg_Err( p_intf, "Fourth ImageList_Add failed" );
         }
 
         // Define an array of two buttons. These buttons provide images through an
         // image list and also provide tooltips.
-        DWORD dwMask = THB_BITMAP | THB_FLAGS;
+        THUMBBUTTONMASK dwMask = THUMBBUTTONMASK(THB_BITMAP | THB_FLAGS);
 
         THUMBBUTTON thbButtons[3];
         thbButtons[0].dwMask = dwMask;
@@ -132,12 +132,12 @@ void MainInterface::createTaskBarButtons()
         thbButtons[2].iBitmap = 3;
         thbButtons[2].dwFlags = THBF_HIDDEN;
 
-        HRESULT hr = p_taskbl->vt->ThumbBarSetImageList(p_taskbl, winId(), himl );
+        HRESULT hr = p_taskbl->ThumbBarSetImageList(winId(), himl );
         if(S_OK != hr)
             msg_Err( p_intf, "ThumbBarSetImageList failed with error %08lx", hr );
         else
         {
-            hr = p_taskbl->vt->ThumbBarAddButtons(p_taskbl, winId(), 3, thbButtons);
+            hr = p_taskbl->ThumbBarAddButtons(winId(), 3, thbButtons);
             if(S_OK != hr)
                 msg_Err( p_intf, "ThumbBarAddButtons failed with error %08lx", hr );
         }
@@ -244,7 +244,7 @@ void MainInterface::changeThumbbarButtons( int i_status )
 
     // Define an array of three buttons. These buttons provide images through an
     // image list and also provide tooltips.
-    DWORD dwMask = THB_BITMAP | THB_FLAGS;
+    THUMBBUTTONMASK dwMask = THUMBBUTTONMASK(THB_BITMAP | THB_FLAGS);
 
     THUMBBUTTON thbButtons[3];
     //prev
@@ -285,7 +285,7 @@ void MainInterface::changeThumbbarButtons( int i_status )
         default:
             return;
     }
-    HRESULT hr =  p_taskbl->vt->ThumbBarUpdateButtons(p_taskbl, this->winId(), 3, thbButtons);
+    HRESULT hr =  p_taskbl->ThumbBarUpdateButtons(this->winId(), 3, thbButtons);
     if(S_OK != hr)
         msg_Err( p_intf, "ThumbBarUpdateButtons failed with error %08lx", hr );
 }