]> git.sesse.net Git - vlc/commitdiff
Qt: no need to go through the MainInterface to forward the signals about recentItems.
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 29 Dec 2008 20:35:46 +0000 (21:35 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Dec 2008 12:19:35 +0000 (13:19 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/recents.cpp
modules/gui/qt4/recents.hpp

index 8ec4dae2ccb78e38964dbf9a9892df53b3273e4c..6fc8e2461344ef59c9f5551781045337385200ce 100644 (file)
@@ -137,10 +137,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     /* StatusBar Creation */
     createStatusBar();
 
-    /* Recents menu updates */
-    CONNECT( RecentsMRL::getInstance( p_intf ), updated(),
-             this, updateRecentsMenu() );
-
     /********************
      * Input Manager    *
      ********************/
@@ -1140,11 +1136,3 @@ static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
      return VLC_SUCCESS;
 }
 
-/*****************************************************************************
- * updateRecentsMenu: event called by RecentsMRL
- *****************************************************************************/
-
-void MainInterface::updateRecentsMenu()
-{
-    QVLCMenu::updateRecents( p_intf );
-}
index 748d33ca20c3cc9dd1919f2ea3f224005850ca0f..a532d91aad6bef9763e6fe89cf091b6b5389b033 100644 (file)
@@ -169,7 +169,6 @@ private slots:
     void handleSystrayClick( QSystemTrayIcon::ActivationReason );
     void updateSystrayTooltipName( QString );
     void updateSystrayTooltipStatus( int );
-    void updateRecentsMenu();
 signals:
     void askReleaseVideo( );
     void askVideoToResize( unsigned int, unsigned int );
index ea3fcd4fce9f3a19b62e9de0b940d5ae6f15db66..4fbae09e980811b3cddf329db6c96fba39bfafe4 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "recents.hpp"
 #include "dialogs_provider.hpp"
+#include "menus.hpp"
 
 #include <QList>
 #include <QString>
@@ -76,7 +77,7 @@ void RecentsMRL::addRecent( const QString &mrl )
         if( stack->size() > RECENTS_LIST_SIZE )
             stack->takeLast();
     }
-    emit updated();
+    QVLCMenu::updateRecents( p_intf );
     save();
 }
 
@@ -85,7 +86,7 @@ void RecentsMRL::clear()
     if ( stack->isEmpty() )
         return;
     stack->clear();
-    emit updated();
+    QVLCMenu::updateRecents( p_intf );
     save();
 }
 
index c45c799b05908f06d38e84f5c15fd7ab7e0ad480..3a394f652e0648e5f02bbff776d60f9a792de70d 100644 (file)
@@ -38,9 +38,6 @@ class RecentsMRL : public QObject
 {
     Q_OBJECT
 
-signals:
-    void updated();
-
 public:
     static RecentsMRL* getInstance( intf_thread_t* p_intf )
     {