diff options
author | Mateusz Łukasik <mati75@linuxmint.pl> | 2015-10-06 15:06:23 +0200 |
---|---|---|
committer | Mateusz Łukasik <mati75@linuxmint.pl> | 2015-10-06 15:06:23 +0200 |
commit | cad53e4ce7061f8bc7d49c8123ca6fc6155c79fd (patch) | |
tree | 9da50be8116ad843a2f01441c1e65c4816e4927d /src/prefgeneral.cpp | |
parent | ac1e595cfef357d7ef481dbbefb88996af72eb79 (diff) |
Imported Upstream version 15.9.0~ds0
Diffstat (limited to 'src/prefgeneral.cpp')
-rw-r--r-- | src/prefgeneral.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/prefgeneral.cpp b/src/prefgeneral.cpp index f6f798d..3910b61 100644 --- a/src/prefgeneral.cpp +++ b/src/prefgeneral.cpp @@ -24,6 +24,7 @@ #include "mediasettings.h" #include "paths.h" #include "vdpauproperties.h" +#include "playerid.h" #if USE_ALSA_DEVICES || USE_DSOUND_DEVICES #include "deviceinfo.h" @@ -75,6 +76,11 @@ PrefGeneral::PrefGeneral(QWidget * parent, Qt::WindowFlags f) shutdown_widget->hide(); #endif +#ifndef MPV_SUPPORT + screenshot_template_label->hide(); + screenshot_template_edit->hide(); +#endif + // Channels combo channels_combo->addItem( "2", MediaSettings::ChStereo ); channels_combo->addItem( "4", MediaSettings::ChSurround ); @@ -153,6 +159,8 @@ void PrefGeneral::retranslateStrings() { "Example: <b>es|esp|spa</b> will select the track if it matches with " "<i>es</i>, <i>esp</i> or <i>spa</i>.")); + executable_label->setText( tr("%1 &executable:").arg(PLAYER_NAME) ); + createHelp(); } @@ -161,7 +169,9 @@ void PrefGeneral::setData(Preferences * pref) { setUseScreenshots( pref->use_screenshot ); setScreenshotDir( pref->screenshot_directory ); +#ifdef MPV_SUPPORT screenshot_template_edit->setText( pref->screenshot_template ); +#endif QString vo = pref->vo; if (vo.isEmpty()) { @@ -271,7 +281,9 @@ void PrefGeneral::getData(Preferences * pref) { TEST_AND_SET(pref->use_screenshot, useScreenshots()); TEST_AND_SET(pref->screenshot_directory, screenshotDir()); +#ifdef MPV_SUPPORT TEST_AND_SET(pref->screenshot_template, screenshot_template_edit->text()); +#endif TEST_AND_SET(pref->vo, VO()); TEST_AND_SET(pref->ao, AO()); @@ -879,9 +891,9 @@ void PrefGeneral::createHelp() { addSectionTitle(tr("General")); - setWhatsThis(mplayerbin_edit, tr("MPlayer/MPV executable"), - tr("Here you must specify the MPlayer or mpv " - "executable that SMPlayer will use.") + "<br><b>" + + setWhatsThis(mplayerbin_edit, tr("%1 executable").arg(PLAYER_NAME), + tr("Here you must specify the %1 " + "executable that SMPlayer will use.").arg(PLAYER_NAME) + "<br><b>" + tr("If this setting is wrong, SMPlayer won't be able to play " "anything!") + "</b>"); @@ -913,6 +925,7 @@ void PrefGeneral::createHelp() { "SMPlayer will be stored. If the folder is not valid the " "screenshot feature will be disabled.") ); +#ifdef MPV_SUPPORT setWhatsThis(screenshot_template_edit, tr("Template for screenshots"), tr("This option specifies the filename template used to save screenshots.") + " " + tr("For example %1 would save the screenshot as 'moviename_0001.png'.").arg("%F_%04n") + "<br>" + @@ -922,6 +935,7 @@ void PrefGeneral::createHelp() { " <a href=\"http://mpv.io/manual/stable/#options-screenshot-template\">" "http://mpv.io/manual/stable/#options-screenshot-template</a>" + "<br>" + tr("This option only works with mpv.") ); +#endif setWhatsThis(pause_if_hidden_check, tr("Pause when minimized"), tr("If this option is enabled, the file will be paused when the " |