#include <QToolButton>
#include <QButtonGroup>
#include <QVBoxLayout>
-#include <QSettings>
#include <QtAlgorithms>
**/
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 );
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: */
* 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 *
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
#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" \
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,
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 );
{
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" ) ),
{
if ( !isActive || filter->indexIn( mrl ) >= 0 )
return;
-
+
if( stack->contains( mrl ) )
{
stack->removeOne( mrl );
void RecentsMRL::load()
{
QStringList list;
-
+
getSettings()->beginGroup( "RecentsMRL" );
list = getSettings()->value( "list" ).toStringList();
getSettings()->endGroup();
virtual ~RecentsMRL();
void addRecent( const QString & );
- QList<QString> recents();
+ QList<QString> recents();
QSignalMapper *signalMapper;
private: