[vlc-devel] commit: Fix --qt-start-mninimized option (Jean-Baptiste Kempf )

git version control git at videolan.org
Wed May 20 18:53:50 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May 18 01:31:58 2009 +0200| [68c0d25f704019224454ab30d771320a009080cd] | committer: Jean-Baptiste Kempf 

Fix --qt-start-mninimized option

Report : http://forum.videolan.org/viewtopic.php?f=13&t=59425&p=198466#p198450

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68c0d25f704019224454ab30d771320a009080cd
---

 modules/gui/qt4/main_interface.cpp |    5 +++--
 modules/gui/qt4/main_interface.hpp |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 8baf686..0bde8ff 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -84,6 +84,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     cryptedLabel         = NULL;
     controls             = NULL;
     inputC               = NULL;
+    b_shouldHide         = false;
 
     bgWasVisible         = false;
     i_bg_height          = 0;
@@ -265,7 +266,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     /* Final sizing and showing */
     setMinimumWidth( __MAX( controls->sizeHint().width(),
                             menuBar()->sizeHint().width() ) );
-    show();
+    setVisible( !b_shouldHide );
 
     /* And switch to minimal view if needed
        Must be called after the show() */
@@ -462,7 +463,7 @@ inline void MainInterface::initSystray()
         if( b_systrayAvailable )
         {
             b_systrayWanted = true;
-            hide();
+            b_shouldHide = true;
         }
         else
             msg_Err( p_intf, "cannot start minimized without system tray bar" );
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 2f74e23..d522a8b 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -144,6 +144,7 @@ private:
     pl_dock_e            i_pl_dock;
     bool                 isDocked() { return ( i_pl_dock != PL_UNDOCKED ); }
     int                  i_bg_height;         ///< Save height of bgWidget
+    bool                 b_shouldHide;
 
     /* Status Bar */
     QLabel              *nameLabel;




More information about the vlc-devel mailing list