summaryrefslogtreecommitdiff
path: root/src/prefgeneral.cpp
diff options
context:
space:
mode:
authorMateusz Łukasik <mati75@linuxmint.pl>2017-02-03 08:16:09 +0100
committerMateusz Łukasik <mati75@linuxmint.pl>2017-02-03 08:16:09 +0100
commitbcae744b1bae2f5015cb3efdd0d2226150cd79e5 (patch)
tree872701745b36fbfbeb16dd1d59d485bc1e494dbd /src/prefgeneral.cpp
parent634cd2063f449c5d38046de88a395af77e2c9ea5 (diff)
New upstream version 17.2.0~ds0
Diffstat (limited to 'src/prefgeneral.cpp')
-rw-r--r--src/prefgeneral.cpp37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/prefgeneral.cpp b/src/prefgeneral.cpp
index d2e9ea0..b17035c 100644
--- a/src/prefgeneral.cpp
+++ b/src/prefgeneral.cpp
@@ -1,5 +1,5 @@
/* smplayer, GUI front-end for mplayer.
- Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
+ Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
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,6 +65,9 @@ PrefGeneral::PrefGeneral(QWidget * parent, Qt::WindowFlags f)
#if USE_ALSA_DEVICES
alsa_devices = DeviceInfo::alsaDevices();
#endif
+#if USE_MPV_ALSA_DEVICES
+ mpv_alsa_devices = DeviceInfo::mpvAlsaDevices();
+#endif
#if USE_PULSEAUDIO_DEVICES
pa_devices = DeviceInfo::paDevices();
#endif
@@ -95,7 +98,9 @@ PrefGeneral::PrefGeneral(QWidget * parent, Qt::WindowFlags f)
#ifndef ADD_BLACKBORDERS_FS
blackborders_on_fs_check->hide();
-#else
+#endif
+
+#ifndef INITIAL_BLACKBORDERS
blackborders_check->hide();
#endif
@@ -256,7 +261,9 @@ void PrefGeneral::setData(Preferences * pref) {
#ifdef ADD_BLACKBORDERS_FS
setBlackbordersOnFullscreen( pref->add_blackborders_on_fullscreen );
-#else
+#endif
+
+#ifdef INITIAL_BLACKBORDERS
blackborders_check->setChecked(pref->initial_blackborders);
#endif
@@ -358,7 +365,9 @@ void PrefGeneral::getData(Preferences * pref) {
pref->add_blackborders_on_fullscreen = blackbordersOnFullscreen();
if (pref->fullscreen) requires_restart = true;
}
-#else
+#endif
+
+#ifdef INITIAL_BLACKBORDERS
pref->initial_blackborders = blackborders_check->isChecked();
#endif
@@ -466,33 +475,39 @@ void PrefGeneral::updateDriverCombos() {
for ( int n = 0; n < ao_list.count(); n++) {
ao = ao_list[n].name();
ao_combo->addItem( ao, ao );
+ /*
#ifdef Q_OS_OS2
if ( ao == "kai") {
ao_combo->addItem( "kai (" + tr("uniaud mode") + ")", "kai:uniaud" );
ao_combo->addItem( "kai (" + tr("dart mode") + ")", "kai:dart" );
}
#endif
+ */
#if USE_ALSA_DEVICES
if ((ao == "alsa") && (!alsa_devices.isEmpty())) {
for (int n=0; n < alsa_devices.count(); n++) {
- ao_combo->addItem( "alsa (" + alsa_devices[n].ID().toString() + " - " + alsa_devices[n].desc() + ")",
- "alsa:device=hw=" + alsa_devices[n].ID().toString() );
+ ao_combo->addItem( DeviceInfo::printableName("alsa", alsa_devices[n]), DeviceInfo::internalName("alsa", alsa_devices[n]) );
+ }
+ }
+ #endif
+ #if USE_MPV_ALSA_DEVICES
+ if ((ao == "alsa") && (!mpv_alsa_devices.isEmpty())) {
+ for (int n=0; n < mpv_alsa_devices.count(); n++) {
+ ao_combo->addItem( DeviceInfo::printableName("alsa", mpv_alsa_devices[n]), DeviceInfo::internalName("alsa", mpv_alsa_devices[n]) );
}
}
#endif
#if USE_PULSEAUDIO_DEVICES
if ((ao == "pulse") && (!pa_devices.isEmpty())) {
for (int n=0; n < pa_devices.count(); n++) {
- ao_combo->addItem( "pulse (" + pa_devices[n].ID().toString() + " - " + pa_devices[n].desc() + ")",
- "pulse::" + pa_devices[n].ID().toString() );
+ ao_combo->addItem( DeviceInfo::printableName("pulse", pa_devices[n]), DeviceInfo::internalName("pulse", pa_devices[n]) );
}
}
#endif
#if USE_DSOUND_DEVICES
if ((ao == "dsound") && (!dsound_devices.isEmpty())) {
for (int n=0; n < dsound_devices.count(); n++) {
- ao_combo->addItem( "dsound (" + dsound_devices[n].ID().toString() + " - " + dsound_devices[n].desc() + ")",
- "dsound:device=" + dsound_devices[n].ID().toString() );
+ ao_combo->addItem( DeviceInfo::printableName("dsound", dsound_devices[n]), DeviceInfo::internalName("dsound", dsound_devices[n]) );
}
}
#endif
@@ -1088,7 +1103,7 @@ void PrefGeneral::createHelp() {
"videos opened.") +" "+
tr("<b>Note:</b> This option won't be used for TV channels.") );
-#ifndef ADD_BLACKBORDERS_FS
+#ifdef INITIAL_BLACKBORDERS
setWhatsThis(blackborders_check, tr("Add black borders for subtitles by default"),
tr("If this option is enabled, black borders will be added to the image "
"by default on new opened files."));