diff options
Diffstat (limited to 'src/plugins/General/hotkey/hotkeyfactory.cpp')
| -rw-r--r-- | src/plugins/General/hotkey/hotkeyfactory.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/General/hotkey/hotkeyfactory.cpp b/src/plugins/General/hotkey/hotkeyfactory.cpp index 7c0c176de..72c3ed9ab 100644 --- a/src/plugins/General/hotkey/hotkeyfactory.cpp +++ b/src/plugins/General/hotkey/hotkeyfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2012 by Ilya Kotov * + * Copyright (C) 2009-2018 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -18,9 +18,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ - #include <QMessageBox> #include <qmmp/qmmp.h> +#include <qmmpui/general.h> #include "settingsdialog.h" #include "hotkeymanager.h" #include "hotkeyfactory.h" @@ -43,7 +43,13 @@ QObject *HotkeyFactory::create(QObject *parent) QDialog *HotkeyFactory::createConfigDialog(QWidget *parent) { - return new SettingsDialog(parent); + SettingsDialog *dialog = new SettingsDialog(parent); + if(General::isEnabled(this)) + { + General::setEnabled(this, false); + connect(dialog, &QDialog::finished, [this] { General::setEnabled(this); }); + } + return dialog; } void HotkeyFactory::showAbout(QWidget *parent) |
