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

Qt4 - SPrefs, add an option for saving volume on exit, and fix the displayMode in SPrefs.

parent 1c14f28a
...@@ -74,7 +74,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -74,7 +74,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
spref_cone_Interface_64.png, 0 ); spref_cone_Interface_64.png, 0 );
ADD_CATEGORY( SPrefsAudio, qtr("Audio"), spref_cone_Audio_64.png, 1 ); ADD_CATEGORY( SPrefsAudio, qtr("Audio"), spref_cone_Audio_64.png, 1 );
ADD_CATEGORY( SPrefsVideo, qtr("Video"), spref_cone_Video_64.png, 2 ); 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 ); spref_cone_Subtitles_64.png, 3 );
ADD_CATEGORY( SPrefsInputAndCodecs, qtr("Input and Codecs"), ADD_CATEGORY( SPrefsInputAndCodecs, qtr("Input and Codecs"),
spref_cone_Input_64.png, 4 ); spref_cone_Input_64.png, 4 );
...@@ -84,7 +84,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -84,7 +84,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
layout->setMargin( 0 ); layout->setMargin( 0 );
layout->setSpacing( 1 ); layout->setSpacing( 1 );
this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
setLayout( layout ); setLayout( layout );
} }
...@@ -223,6 +223,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -223,6 +223,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
preferredAudioLanguage ); preferredAudioLanguage );
CONFIG_GENERIC( "spdif", Bool, NULL, spdifBox ); CONFIG_GENERIC( "spdif", Bool, NULL, spdifBox );
CONFIG_GENERIC( "qt-autosave-volume", Bool, NULL, saveVolBox );
CONFIG_GENERIC( "force-dolby-surround" , IntegerList , NULL, CONFIG_GENERIC( "force-dolby-surround" , IntegerList , NULL,
detectionDolby ); detectionDolby );
...@@ -435,11 +436,19 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -435,11 +436,19 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
optionWidgets.append( ui.skins ); optionWidgets.append( ui.skins );
optionWidgets.append( ui.qt4 ); 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, CONFIG_GENERIC( "album-art", IntegerList, ui.artFetchLabel,
artFetcher ); artFetcher );
CONFIG_GENERIC( "fetch-meta", Bool, NULL, metaFetcher ); CONFIG_GENERIC( "fetch-meta", Bool, NULL, metaFetcher );
CONFIG_GENERIC( "security-policy", IntegerList, CONFIG_GENERIC( "security-policy", IntegerList,
ui.netPolicyLabel, netPolicyBox ); ui.netPolicyLabel, netPolicyBox );
/* UPDATE options */
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
CONFIG_GENERIC( "qt-updates-notif", Bool, NULL, updatesBox ); CONFIG_GENERIC( "qt-updates-notif", Bool, NULL, updatesBox );
CONFIG_GENERIC_NO_BOOL( "qt-updates-days", Integer, NULL, CONFIG_GENERIC_NO_BOOL( "qt-updates-days", Integer, NULL,
...@@ -450,10 +459,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -450,10 +459,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui.updatesBox->hide(); ui.updatesBox->hide();
ui.updatesDays->hide(); ui.updatesDays->hide();
#endif #endif
CONFIG_GENERIC( "qt-always-video", Bool, NULL, qtAlwaysVideo ); /* ONE INSTANCE options */
CONFIG_GENERIC( "embedded-video", Bool, NULL, embedVideo );
CONFIG_GENERIC_FILE( "skins2-last", File, NULL, fileSkin,
skinBrowse );
#if defined( WIN32 ) || defined( HAVE_DBUS_3 ) || defined(__APPLE__) #if defined( WIN32 ) || defined( HAVE_DBUS_3 ) || defined(__APPLE__)
CONFIG_GENERIC( "one-instance", Bool, NULL, OneInterfaceMode ); CONFIG_GENERIC( "one-instance", Bool, NULL, OneInterfaceMode );
CONFIG_GENERIC( "playlist-enqueue", Bool, NULL, CONFIG_GENERIC( "playlist-enqueue", Bool, NULL,
......
...@@ -106,6 +106,8 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); ...@@ -106,6 +106,8 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
"can distort the audio, since it uses " \ "can distort the audio, since it uses " \
"software amplification." ) "software amplification." )
#define SAVEVOL_TEXT N_( "Automatically save the volume on exit" )
#define BLING_TEXT N_( "Use non native buttons and volume slider" ) #define BLING_TEXT N_( "Use non native buttons and volume slider" )
#define PRIVACY_TEXT N_( "Ask for network policy at start" ) #define PRIVACY_TEXT N_( "Ask for network policy at start" )
...@@ -164,6 +166,8 @@ vlc_module_begin(); ...@@ -164,6 +166,8 @@ vlc_module_begin();
add_bool( "qt-volume-complete", VLC_FALSE, NULL, COMPLETEVOL_TEXT, add_bool( "qt-volume-complete", VLC_FALSE, NULL, COMPLETEVOL_TEXT,
COMPLETEVOL_LONGTEXT, VLC_TRUE ); 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, add_string( "qt-filedialog-path", NULL, NULL, FILEDIALOG_PATH_TEXT,
FILEDIALOG_PATH_TEXT, VLC_TRUE ); FILEDIALOG_PATH_TEXT, VLC_TRUE );
change_autosave(); change_autosave();
...@@ -291,7 +295,7 @@ static void Init( intf_thread_t *p_intf ) ...@@ -291,7 +295,7 @@ static void Init( intf_thread_t *p_intf )
* see commits 21610 21622 21654 for reference */ * see commits 21610 21622 21654 for reference */
/* If you don't have a gconftool-2 binary, you should comment this line */ /* If you don't have a gconftool-2 binary, you should comment this line */
// QApplication::setDesktopSettingsAware( false ); QApplication::setDesktopSettingsAware( false );
#endif #endif
/* Start the QApplication here */ /* Start the QApplication here */
......
...@@ -93,13 +93,20 @@ ...@@ -93,13 +93,20 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="4" > <item row="1" column="0" >
<widget class="QCheckBox" name="spdifBox" > <widget class="QCheckBox" name="spdifBox" >
<property name="text" > <property name="text" >
<string>_("Use S/PDIF when available")</string> <string>_("Use S/PDIF when available")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" colspan="3" >
<widget class="QCheckBox" name="saveVolBox" >
<property name="text" >
<string>_("Save volume on exit")</string>
</property>
</widget>
</item>
<item row="2" column="0" > <item row="2" column="0" >
<widget class="QLabel" name="label_8" > <widget class="QLabel" name="label_8" >
<property name="text" > <property name="text" >
......
...@@ -61,21 +61,37 @@ ...@@ -61,21 +61,37 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" colspan="3" > <item row="1" column="1" >
<widget class="QCheckBox" name="qtAlwaysVideo" > <widget class="QLabel" name="label" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" > <property name="text" >
<string>_("Always display the video")</string> <string>_("Display Mode")</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2" >
<widget class="QComboBox" name="displayModeBox" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1" colspan="2" > <item row="2" column="1" colspan="3" >
<widget class="QCheckBox" name="embedVideo" > <widget class="QCheckBox" name="embedVideo" >
<property name="text" > <property name="text" >
<string>_("Integrate video in interface")</string> <string>_("Integrate video in interface")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="3" > <item row="3" column="0" colspan="4" >
<widget class="Line" name="line" > <widget class="Line" name="line" >
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -89,7 +105,7 @@ ...@@ -89,7 +105,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item rowspan="3" row="4" column="1" colspan="3" > <item rowspan="2" row="4" column="1" colspan="3" >
<widget class="QLabel" name="skinsLabel" > <widget class="QLabel" name="skinsLabel" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" > <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
...@@ -136,23 +152,23 @@ ...@@ -136,23 +152,23 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item rowspan="2" row="6" column="0" > <item row="6" column="0" >
<widget class="QLabel" name="label_4" > <widget class="QLabel" name="label_4" >
<property name="text" > <property name="text" >
<string>_("Skin File")</string> <string>_("Skin File")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="2" colspan="2" > <item row="6" column="1" colspan="2" >
<widget class="QLineEdit" name="fileSkin" />
</item>
<item row="6" column="3" >
<widget class="QPushButton" name="skinBrowse" > <widget class="QPushButton" name="skinBrowse" >
<property name="text" > <property name="text" >
<string>_("Browse...")</string> <string>_("Browse...")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1" >
<widget class="QLineEdit" name="fileSkin" />
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
...@@ -257,7 +273,6 @@ ...@@ -257,7 +273,6 @@
<tabstops> <tabstops>
<tabstop>language</tabstop> <tabstop>language</tabstop>
<tabstop>qt4</tabstop> <tabstop>qt4</tabstop>
<tabstop>qtAlwaysVideo</tabstop>
<tabstop>skins</tabstop> <tabstop>skins</tabstop>
<tabstop>fileSkin</tabstop> <tabstop>fileSkin</tabstop>
<tabstop>skinBrowse</tabstop> <tabstop>skinBrowse</tabstop>
......
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