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 ) :
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,
......
......@@ -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 */
......
......@@ -93,13 +93,20 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="4" >
<item row="1" column="0" >
<widget class="QCheckBox" name="spdifBox" >
<property name="text" >
<string>_("Use S/PDIF when available")</string>
</property>
</widget>
</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" >
<widget class="QLabel" name="label_8" >
<property name="text" >
......
......@@ -61,21 +61,37 @@
</property>
</widget>
</item>
<item row="1" column="1" colspan="3" >
<widget class="QCheckBox" name="qtAlwaysVideo" >
<item row="1" column="1" >
<widget class="QLabel" name="label" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<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>
</widget>
</item>
<item row="2" column="1" colspan="2" >
<item row="2" column="1" colspan="3" >
<widget class="QCheckBox" name="embedVideo" >
<property name="text" >
<string>_("Integrate video in interface")</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3" >
<item row="3" column="0" colspan="4" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
......@@ -89,7 +105,7 @@
</property>
</widget>
</item>
<item rowspan="3" row="4" column="1" colspan="3" >
<item rowspan="2" row="4" column="1" colspan="3" >
<widget class="QLabel" name="skinsLabel" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
......@@ -136,23 +152,23 @@
</property>
</spacer>
</item>
<item rowspan="2" row="6" column="0" >
<item row="6" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>_("Skin File")</string>
</property>
</widget>
</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" >
<property name="text" >
<string>_("Browse...")</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="fileSkin" />
</item>
</layout>
</widget>
</item>
......@@ -257,7 +273,6 @@
<tabstops>
<tabstop>language</tabstop>
<tabstop>qt4</tabstop>
<tabstop>qtAlwaysVideo</tabstop>
<tabstop>skins</tabstop>
<tabstop>fileSkin</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