From e5d0cd4f13d7f0c835c8ef425f59ddc416f2bb68 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 25 Feb 2008 09:33:56 +0000 Subject: [PATCH] Qt4 - SPrefs, add an option for saving volume on exit, and fix the displayMode in SPrefs. --- .../gui/qt4/components/simple_preferences.cpp | 18 ++++++--- modules/gui/qt4/qt4.cpp | 6 ++- modules/gui/qt4/ui/sprefs_audio.ui | 9 ++++- modules/gui/qt4/ui/sprefs_interface.ui | 39 +++++++++++++------ 4 files changed, 52 insertions(+), 20 deletions(-) diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index 0d3874e231..bf3cb54c00 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -74,7 +74,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : spref_cone_Interface_64.png, 0 ); ADD_CATEGORY( SPrefsAudio, qtr("Audio"), spref_cone_Audio_64.png, 1 ); ADD_CATEGORY( SPrefsVideo, qtr("Video"), spref_cone_Video_64.png, 2 ); - ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles"), + ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles & OSD"), spref_cone_Subtitles_64.png, 3 ); ADD_CATEGORY( SPrefsInputAndCodecs, qtr("Input and Codecs"), spref_cone_Input_64.png, 4 ); @@ -84,7 +84,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : layout->setMargin( 0 ); layout->setSpacing( 1 ); - this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); + setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); setLayout( layout ); } @@ -223,6 +223,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, preferredAudioLanguage ); CONFIG_GENERIC( "spdif", Bool, NULL, spdifBox ); + CONFIG_GENERIC( "qt-autosave-volume", Bool, NULL, saveVolBox ); CONFIG_GENERIC( "force-dolby-surround" , IntegerList , NULL, detectionDolby ); @@ -435,11 +436,19 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, optionWidgets.append( ui.skins ); optionWidgets.append( ui.qt4 ); + CONFIG_GENERIC( "qt-display-mode", IntegerList, NULL, + displayModeBox ); + CONFIG_GENERIC( "embedded-video", Bool, NULL, embedVideo ); + CONFIG_GENERIC_FILE( "skins2-last", File, NULL, fileSkin, + skinBrowse ); + CONFIG_GENERIC( "album-art", IntegerList, ui.artFetchLabel, artFetcher ); CONFIG_GENERIC( "fetch-meta", Bool, NULL, metaFetcher ); CONFIG_GENERIC( "security-policy", IntegerList, ui.netPolicyLabel, netPolicyBox ); + + /* UPDATE options */ #ifdef UPDATE_CHECK CONFIG_GENERIC( "qt-updates-notif", Bool, NULL, updatesBox ); CONFIG_GENERIC_NO_BOOL( "qt-updates-days", Integer, NULL, @@ -450,10 +459,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ui.updatesBox->hide(); ui.updatesDays->hide(); #endif - CONFIG_GENERIC( "qt-always-video", Bool, NULL, qtAlwaysVideo ); - CONFIG_GENERIC( "embedded-video", Bool, NULL, embedVideo ); - CONFIG_GENERIC_FILE( "skins2-last", File, NULL, fileSkin, - skinBrowse ); + /* ONE INSTANCE options */ #if defined( WIN32 ) || defined( HAVE_DBUS_3 ) || defined(__APPLE__) CONFIG_GENERIC( "one-instance", Bool, NULL, OneInterfaceMode ); CONFIG_GENERIC( "playlist-enqueue", Bool, NULL, diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index be83b289c4..0bea6f491f 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -106,6 +106,8 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); "can distort the audio, since it uses " \ "software amplification." ) +#define SAVEVOL_TEXT N_( "Automatically save the volume on exit" ) + #define BLING_TEXT N_( "Use non native buttons and volume slider" ) #define PRIVACY_TEXT N_( "Ask for network policy at start" ) @@ -164,6 +166,8 @@ vlc_module_begin(); add_bool( "qt-volume-complete", VLC_FALSE, NULL, COMPLETEVOL_TEXT, COMPLETEVOL_LONGTEXT, VLC_TRUE ); + add_bool( "qt-autosave-volume", VLC_FALSE, NULL, SAVEVOL_TEXT, + SAVEVOL_TEXT, VLC_TRUE ); add_string( "qt-filedialog-path", NULL, NULL, FILEDIALOG_PATH_TEXT, FILEDIALOG_PATH_TEXT, VLC_TRUE ); change_autosave(); @@ -291,7 +295,7 @@ static void Init( intf_thread_t *p_intf ) * see commits 21610 21622 21654 for reference */ /* If you don't have a gconftool-2 binary, you should comment this line */ -// QApplication::setDesktopSettingsAware( false ); + QApplication::setDesktopSettingsAware( false ); #endif /* Start the QApplication here */ diff --git a/modules/gui/qt4/ui/sprefs_audio.ui b/modules/gui/qt4/ui/sprefs_audio.ui index 796c5b8730..87ebea5a77 100644 --- a/modules/gui/qt4/ui/sprefs_audio.ui +++ b/modules/gui/qt4/ui/sprefs_audio.ui @@ -93,13 +93,20 @@ - + _("Use S/PDIF when available") + + + + _("Save volume on exit") + + + diff --git a/modules/gui/qt4/ui/sprefs_interface.ui b/modules/gui/qt4/ui/sprefs_interface.ui index 5bf9650a5d..23152ddb38 100644 --- a/modules/gui/qt4/ui/sprefs_interface.ui +++ b/modules/gui/qt4/ui/sprefs_interface.ui @@ -61,21 +61,37 @@ - - + + + + + 0 + 0 + + - _("Always display the video") + _("Display Mode") + + + + + + + + 0 + 0 + - + _("Integrate video in interface") - + Qt::Horizontal @@ -89,7 +105,7 @@ - + @@ -136,23 +152,23 @@ - + _("Skin File") - + + + + _("Browse...") - - - @@ -257,7 +273,6 @@ language qt4 - qtAlwaysVideo skins fileSkin skinBrowse -- 2.39.2