qt4 - HideMenus change position. Still don't know whether we will keep this one.
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 2 Aug 2007 21:35:08 +0000 (21:35 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 2 Aug 2007 21:35:08 +0000 (21:35 +0000)
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/menus.cpp

index 315a69e..d750a04 100644 (file)
@@ -501,13 +501,6 @@ void DialogsProvider::doInteraction( intf_dialog_args_t *p_arg )
     }
 }
 
-void DialogsProvider::hideMenus()
-{
-    /* TODO
-     * Simplify the main Interface
-     */
-}
-
 void DialogsProvider::switchToSkins()
 {
     var_SetString( p_intf, "intf-switch", "skins2" );
index 9ed6f46..4c439f8 100644 (file)
@@ -166,7 +166,6 @@ public slots:
     void openPlaylist();
     void savePlaylist();
 
-    void hideMenus();
     void switchToSkins();
     void quit();
 };
index ec6da90..2de523d 100644 (file)
@@ -747,6 +747,13 @@ void MainInterface::undockPlaylist()
     }
 }
 
+void MainInterface::toggleMenus()
+{
+    if( menuBar()->isVisible() ) menuBar()->hide();
+        else menuBar()->show();
+    msg_Dbg( p_intf, "I was there: \\_o<~~ coin coin" );
+}
+
 void MainInterface::customEvent( QEvent *event )
 {
     if( event->type() == PLDockEvent_Type )
index c4a08c9..99a3f7a 100644 (file)
@@ -118,6 +118,7 @@ private:
     void customEvent( QEvent *);
 public slots:
     void undockPlaylist();
+    void toggleMenus();
     void playlist();
     void toggleUpdateSystrayMenu();
 private slots:
index 57b6aef..aed3886 100644 (file)
@@ -289,7 +289,8 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
         adv->setCheckable( true );
         if( adv_controls_enabled ) adv->setChecked( true );
 
-        DP_SADD( menu, qtr( "Hide Menus..." ), "","",hideMenus(), "Ctrl+H" );
+        menu->addAction( qtr( "Hide Menus..." ), mi, SLOT( toggleMenus() ),
+                qtr( "Ctrl+H") );
         menu->addSeparator();
 
 #if 0 /* For Visualisations. Not yet working */