Qt4 - SysTrayIcon: change the previous commit after some remarks on IRC and fix the...
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 30 May 2007 23:51:00 +0000 (23:51 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 30 May 2007 23:51:00 +0000 (23:51 +0000)
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.hpp

index 5252d9b..d1a7f2c 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <QMenu>
-#include <QMenuBar>
-#include <QAction>
-#include <QActionGroup>
-#include <QSignalMapper>
-#include <QSystemTrayIcon>
-
 #ifndef WIN32
 #   include <signal.h>
 #endif
 #include "dialogs_provider.hpp"
 #include "input_manager.hpp"
 
+#include <QMenu>
+#include <QMenuBar>
+#include <QAction>
+#include <QActionGroup>
+#include <QSignalMapper>
+#include <QSystemTrayIcon>
+
 enum
 {
     ITEM_NORMAL,
@@ -597,24 +597,20 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi, intf_thread_t *p_intf,
     POPUP_BOILERPLATE;
     QMenu *sysMenu = mi->getSysTrayMenu();
     sysMenu->clear();
-    DP_SADD( sysMenu, qtr("&About VLC media player" ), "", "",
-            aboutDialog(), "" );
-    sysMenu->addSeparator();
-    POPUP_PLAY_ENTRIES( sysMenu );
-    sysMenu->addSeparator();
-    DP_SADD( sysMenu, qtr("&Open" ), "", "", openFileDialog(), "" );
-    sysMenu->addSeparator();
-
-    if( !mi->isVisible() || b_force_visible )
+    if( mi->isVisible() || b_force_visible )
     {
-        sysMenu->addAction( qtr("Hide Interface"), mi,
+        sysMenu->addAction( qtr("Hide VLC media player"), mi,
                 SLOT( toggleUpdateSystrayMenu() ) );
     }
     else
     {
-        sysMenu->addAction( qtr("Show Interface"), mi,
+        sysMenu->addAction( qtr("Show VLC media player"), mi,
                 SLOT( toggleUpdateSystrayMenu() ) );
     }
+    sysMenu->addSeparator();
+    POPUP_PLAY_ENTRIES( sysMenu );
+    sysMenu->addSeparator();
+    DP_SADD( sysMenu, qtr("&Open Media" ), "", "", openFileDialog(), "" );
     DP_SADD( sysMenu, qtr("&Quit") , "", "", quit(), "" );
 
     mi->getSysTray()->setContextMenu( sysMenu );
index 666028b..015c26d 100644 (file)
 #include "qt4.hpp"
 #include <QObject>
 #include <vector>
-#include <QSystemTrayIcon>
 
 using namespace std;
 
 class QMenu;
 class QMenuBar;
+class QSystemTrayIcon;
 
 class MenuItemData : public QObject
 {