Commit e4dd19a5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Remove the qt-pl-showflags from preferences and put it in...

Qt4 - Remove the qt-pl-showflags from preferences and put it in QSettings,because there is no way a normal being get it right.
parent c32581d4
/***************************************************************************** /*****************************************************************************
* playlist_item.cpp : Manage playlist item * playlist_item.cpp : Manage playlist item
**************************************************************************** ****************************************************************************
* Copyright (C) 2006-2007 the VideoLAN team * Copyright © 2006-2008 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Clément Stenac <zorglub@videolan.org> * Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -65,7 +66,8 @@ void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m ) ...@@ -65,7 +66,8 @@ void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m )
} }
else else
{ {
i_showflags = config_GetInt( model->p_intf, "qt-pl-showflags" ); QSettings settings( "vlc", "vlc-qt-interface" );
i_showflags = settings.value( "qt-pl-showflags" ).toInt();
updateColumnHeaders(); updateColumnHeaders();
} }
} }
......
...@@ -98,8 +98,8 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */ ...@@ -98,8 +98,8 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
PLModel::~PLModel() PLModel::~PLModel()
{ {
config_PutInt( p_intf, "qt-pl-showflags", rootItem->i_showflags ); QSettings settings( "vlc", "vlc-qt-interface" );
config_SaveConfigFile( p_intf, NULL ); settings.setValue( "qt-pl-showflags", rootItem->i_showflags );
delCallbacks(); delCallbacks();
delete rootItem; delete rootItem;
} }
......
...@@ -474,6 +474,7 @@ inline void MainInterface::askForPrivacy() ...@@ -474,6 +474,7 @@ inline void MainInterface::askForPrivacy()
} }
config_PutInt( p_intf, "qt-privacy-ask" , 0 ); config_PutInt( p_intf, "qt-privacy-ask" , 0 );
/* We have to save here because the user may not launch Prefs */
config_SaveConfigFile( p_intf, NULL ); config_SaveConfigFile( p_intf, NULL );
} }
} }
......
/***************************************************************************** /*****************************************************************************
* qt4.cpp : QT4 interface * qt4.cpp : QT4 interface
**************************************************************************** ****************************************************************************
* Copyright (C) 2006-2007 the VideoLAN team * Copyright © 2006-2008 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Clément Stenac <zorglub@videolan.org> * Authors: Clément Stenac <zorglub@videolan.org>
...@@ -93,11 +93,6 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); ...@@ -93,11 +93,6 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
" This option only works with Windows and " \ " This option only works with Windows and " \
"X11 with composite extensions." ) "X11 with composite extensions." )
#define SHOWFLAGS_TEXT N_( "Define what columns to show in playlist window" )
#define SHOWFLAGS_LONGTEXT N_( "Enter the sum of the options that you want: \n" \
"Title: 1; Duration: 2; Artist: 4; Genre: 8; " \
"Copyright: 16; Collection/album: 32; Rating: 256." )
#define ERROR_TEXT N_( "Show unimportant error and warnings dialogs" ) #define ERROR_TEXT N_( "Show unimportant error and warnings dialogs" )
#define UPDATER_TEXT N_( "Activate the updates availability notification" ) #define UPDATER_TEXT N_( "Activate the updates availability notification" )
...@@ -187,13 +182,6 @@ vlc_module_begin(); ...@@ -187,13 +182,6 @@ vlc_module_begin();
UPDATER_DAYS_TEXT, VLC_FALSE ); UPDATER_DAYS_TEXT, VLC_FALSE );
#endif #endif
add_integer( "qt-pl-showflags",
VLC_META_ENGINE_ARTIST|VLC_META_ENGINE_TITLE|
VLC_META_ENGINE_DURATION|VLC_META_ENGINE_COLLECTION,
NULL, SHOWFLAGS_TEXT,
SHOWFLAGS_LONGTEXT, VLC_TRUE );
change_autosave();
add_bool( "qt-open-detail", VLC_FALSE, NULL, VIEWDETAIL_TEXT, add_bool( "qt-open-detail", VLC_FALSE, NULL, VIEWDETAIL_TEXT,
VIEWDETAIL_TEXT, VLC_FALSE ); VIEWDETAIL_TEXT, VLC_FALSE );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment