summaryrefslogtreecommitdiff
path: root/src/prefinput.cpp
diff options
context:
space:
mode:
authorMateusz Łukasik <mati75@linuxmint.pl>2016-06-15 20:23:58 +0200
committerMateusz Łukasik <mati75@linuxmint.pl>2016-06-15 20:23:58 +0200
commit42be0eb4f1d7a25dca97e8e2eb4ec4d03b7931fb (patch)
treefae3347b0c924378c57862feea2708766d159771 /src/prefinput.cpp
parent1a2f0c9c1087899a00298db8fa70518d3c1e69f8 (diff)
Imported Upstream version 16.6.0~ds0
Diffstat (limited to 'src/prefinput.cpp')
-rw-r--r--src/prefinput.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/prefinput.cpp b/src/prefinput.cpp
index a848aac..f619fba 100644
--- a/src/prefinput.cpp
+++ b/src/prefinput.cpp
@@ -27,6 +27,10 @@ PrefInput::PrefInput(QWidget * parent, Qt::WindowFlags f)
{
setupUi(this);
+#ifndef GLOBALSHORTCUTS
+ globalshortcuts_check->hide();
+#endif
+
retranslateStrings();
}
@@ -39,7 +43,7 @@ QString PrefInput::sectionName() {
}
QPixmap PrefInput::sectionIcon() {
- return Images::icon("input_devices", 22);
+ return Images::icon("input_devices");
}
void PrefInput::createMouseCombos() {
@@ -186,6 +190,10 @@ void PrefInput::setData(Preferences * pref) {
delay_left_check->setChecked(pref->delay_left_click);
setDragFunction(pref->drag_function);
+
+#ifdef GLOBALSHORTCUTS
+ setUseGlobalShortcuts(pref->use_global_shortcuts);
+#endif
}
void PrefInput::getData(Preferences * pref) {
@@ -203,6 +211,10 @@ void PrefInput::getData(Preferences * pref) {
pref->delay_left_click = delay_left_check->isChecked();
pref->drag_function = dragFunction();
+
+#ifdef GLOBALSHORTCUTS
+ pref->use_global_shortcuts = useGlobalShortcuts();
+#endif
}
/*
@@ -328,6 +340,16 @@ int PrefInput::dragFunction() {
return drag_function_combo->itemData(drag_function_combo->currentIndex()).toInt();
}
+#ifdef GLOBALSHORTCUTS
+void PrefInput::setUseGlobalShortcuts(bool b) {
+ globalshortcuts_check->setChecked(b);
+}
+
+bool PrefInput::useGlobalShortcuts() {
+ return globalshortcuts_check->isChecked();
+}
+#endif
+
void PrefInput::createHelp() {
clearHelp();
@@ -344,6 +366,12 @@ void PrefInput::createHelp() {
"keys). If the <b>Capture</b> button is off "
"then you could enter the full name of the key.") );
+#ifdef GLOBALSHORTCUTS
+ setWhatsThis(globalshortcuts_check, tr("Use the multimedia keys as global shortcuts"),
+ tr("When this option is enabled the multimedia keys (Play, Stop, Volume+/-, Mute, etc.) "
+ "will work even when SMPlayer is running in the background."));
+#endif
+
addSectionTitle(tr("Mouse"));
setWhatsThis(left_click_combo, tr("Left click"),