]> git.sesse.net Git - vlc/commitdiff
[Qt] remove trailing spaces, set a default filter and add a LONGTEXT
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Oct 2008 00:07:29 +0000 (02:07 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Oct 2008 00:07:29 +0000 (02:07 +0200)
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/menus.hpp
modules/gui/qt4/qt4.cpp
modules/gui/qt4/recents.cpp
modules/gui/qt4/recents.hpp

index d14342edaf938a2aff13e76dad8fc3cd0d5f6c99..83dc725ed6869798b2e76020c3a64e76cb518502 100644 (file)
@@ -38,7 +38,6 @@
 #include <QToolButton>
 #include <QButtonGroup>
 #include <QVBoxLayout>
-#include <QSettings>
 
 #include <QtAlgorithms>
 
index 53970ecf119de31146d5e2b4eeedb9e6faf5c1ac..bbebc769ab0b231ee5f5066469343f1be99e5f5b 100644 (file)
@@ -651,7 +651,7 @@ void DialogsProvider::loadSubtitlesFile()
  **/
 void DialogsProvider::playMRL( const QString &mrl )
 {
-    input_item_t *p_input = input_item_New( p_intf, 
+    input_item_t *p_input = input_item_New( p_intf,
             qtu( mrl ), NULL );
     playlist_AddInput( THEPL, p_input, PLAYLIST_GO,
             PLAYLIST_END, true, pl_Unlocked );
index 1c52d87c859782ab5e7dedf9cf1a35076738a5ee..c64b0f03020bd6566ff1f55f26c324416c0f232f 100644 (file)
@@ -153,7 +153,7 @@ void InputManager::addCallbacks()
     var_AddCallback( p_input, "state", ItemStateChanged, this );
     /* src/input/es-out.c:552 */
     var_AddCallback( p_input, "spu-es", ChangeSPU, this );
-    /* emit UpdateStatus so that main_interface updates controls 
+    /* emit UpdateStatus so that main_interface updates controls
      * if there is new videotracks (mpeg-ts)*/
     var_AddCallback( p_input, "video-es", ItemStateChanged, this );
     /* src/input/es-out.c: */
index dd29bc6bdc6c6881a38d30e5363247f5923a6af6..0fa8eb2d9df258ca73a734eb138714058b886b2a 100644 (file)
@@ -133,12 +133,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
      * Menu Bar and Status Bar
      **************************/
     QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled );
-    
+
     /* StatusBar Creation */
     createStatusBar();
 
     /* Recents menu updates */
-    CONNECT( RecentsMRL::getInstance( p_intf ), updated(), this, updateRecentsMenu() ); 
+    CONNECT( RecentsMRL::getInstance( p_intf ), updated(),
+             this, updateRecentsMenu() );
 
     /********************
      * Input Manager    *
index e9f907640c7030fa8194db493a9b77aac1e3134f..b1083e61ed635804e91a50ff5a2001680f998b6e 100644 (file)
@@ -117,7 +117,7 @@ private:
     static int CreateChoicesMenu( QMenu *,const char *, vlc_object_t *, bool );
     static QMenu *recentsMenu;
 public slots:
-    static void updateRecents( intf_thread_t * ); 
+    static void updateRecents( intf_thread_t * );
 };
 
 class MenuFunc : public QObject
index fb4fb49fa50c40c7ec8f8c22e04f240db55035d5..913c7454389d0c3dc7caf5516584bbae95d6786f 100755 (executable)
@@ -125,7 +125,10 @@ static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
 #define PRIVACY_TEXT N_( "Ask for network policy at start" )
 
 #define RECENTPLAY_TEXT N_( "Save the recently played items in the menu" )
+
 #define RECENTPLAY_FILTER_TEXT N_( "List of words separated by | to filter" )
+#define RECENTPLAY_FILTER_LONGTEXT N_( "Regular expression used to filter " \
+        "the recent items played in the player" )
 
 #define SLIDERCOL_TEXT N_( "Define the colors of the volume slider " )
 #define SLIDERCOL_LONGTEXT N_( "Define the colors of the volume slider\n" \
@@ -195,6 +198,11 @@ vlc_module_begin();
             change_autosave();
             change_internal();
 
+        add_bool( "qt-recentplay", true, NULL, RECENTPLAY_TEXT,
+                RECENTPLAY_TEXT, false );
+        add_string( "qt-recentplay-filter", "xxx|porn", NULL,
+                RECENTPLAY_FILTER_TEXT, RECENTPLAY_FILTER_LONGTEXT, false );
+
         add_bool( "qt-adv-options", false, NULL, ADVANCED_OPTIONS_TEXT,
                   ADVANCED_OPTIONS_LONGTEXT, true );
         add_bool( "qt-advanced-pref", false, NULL, ADVANCED_PREFS_TEXT,
@@ -213,10 +221,6 @@ vlc_module_begin();
 
         add_bool( "qt-privacy-ask", true, NULL, PRIVACY_TEXT, PRIVACY_TEXT,
                 false );
-        add_bool( "qt-recentplay", true, NULL, RECENTPLAY_TEXT,
-                RECENTPLAY_TEXT, false );
-        add_string( "qt-recentplay-filter", NULL, NULL,
-                RECENTPLAY_FILTER_TEXT, RECENTPLAY_FILTER_TEXT, false );
             change_internal();
 
         set_callbacks( OpenDialogs, Close );
index 473a081248d9e1bac1a25ec32e9fa98fc2005d64..1a265f883dda16513e7053104c066cb7223e6f60 100644 (file)
@@ -37,7 +37,7 @@ RecentsMRL::RecentsMRL( intf_thread_t *_p_intf ) : p_intf( _p_intf )
 {
     stack = new QList<QString>;
     signalMapper = new QSignalMapper(this);
-    
+
     isActive = config_GetInt( p_intf, "qt-recentplay" );
     filter = new QRegExp(
             qfu( config_GetPsz( p_intf, "qt-recentplay-filter" ) ),
@@ -57,7 +57,7 @@ void RecentsMRL::addRecent( const QString &mrl )
 {
     if ( !isActive || filter->indexIn( mrl ) >= 0 )
         return;
-    
+
     if( stack->contains( mrl ) )
     {
         stack->removeOne( mrl );
@@ -90,7 +90,7 @@ QList<QString> RecentsMRL::recents()
 void RecentsMRL::load()
 {
     QStringList list;
-    
+
     getSettings()->beginGroup( "RecentsMRL" );
     list = getSettings()->value( "list" ).toStringList();
     getSettings()->endGroup();
index 29c65d948a4304cc0154e831b932b8a8d4700eef..c45c799b05908f06d38e84f5c15fd7ab7e0ad480 100644 (file)
@@ -56,7 +56,7 @@ public:
     virtual ~RecentsMRL();
 
     void addRecent( const QString & );
-    QList<QString> recents(); 
+    QList<QString> recents();
     QSignalMapper *signalMapper;
 
 private: