]> git.sesse.net Git - vlc/commitdiff
Qt4 - Remove the qt-pl-showflags from preferences and put it in QSettings,because...
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 8 Feb 2008 04:36:19 +0000 (04:36 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 8 Feb 2008 04:36:19 +0000 (04:36 +0000)
modules/gui/qt4/components/playlist/playlist_item.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/qt4.cpp

index 701f60dd51ce3288b8ebd7e7292db1c39f521cd0..3d52abd8f9fea2a2cef95836bb7fcb023d448566 100644 (file)
@@ -1,10 +1,11 @@
 /*****************************************************************************
  * playlist_item.cpp : Manage playlist item
  ****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright © 2006-2008 the VideoLAN team
  * $Id$
  *
  * 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
  * 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 )
         }
         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();
         }
     }
index 994b39b76704bf6010a8f7393b05ef6268effb69..e77e7d7d034df30324441c62e49a39c48ac44133 100644 (file)
@@ -98,8 +98,8 @@ PLModel::PLModel( playlist_t *_p_playlist,  /* THEPL */
 
 PLModel::~PLModel()
 {
-    config_PutInt( p_intf, "qt-pl-showflags", rootItem->i_showflags );
-    config_SaveConfigFile( p_intf, NULL );
+    QSettings settings( "vlc", "vlc-qt-interface" );
+    settings.setValue( "qt-pl-showflags", rootItem->i_showflags );
     delCallbacks();
     delete rootItem;
 }
index d187a2d99c86c2d65c2d35db3a533ae755ae4d3f..fc8756d7d693496e5b7ca09ccf644115588c50c7 100644 (file)
@@ -474,6 +474,7 @@ inline void MainInterface::askForPrivacy()
             }
 
             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 );
         }
     }
index 530d57ad2ada317fe5b4d0d2cbd46e72b6fa7b0f..d78cba09738301bc9965d3cb01e1bb79f4768468 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * qt4.cpp : QT4 interface
  ****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright © 2006-2008 the VideoLAN team
  * $Id$
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
@@ -93,11 +93,6 @@ static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
                              " This option only works with Windows and " \
                              "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 UPDATER_TEXT N_( "Activate the updates availability notification" )
@@ -187,13 +182,6 @@ vlc_module_begin();
                 UPDATER_DAYS_TEXT, VLC_FALSE );
 #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,
                 VIEWDETAIL_TEXT, VLC_FALSE );