mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
UI Lock also lock the tray icon menu
This commit is contained in:
parent
99d040de3f
commit
dcccbaad59
@ -328,6 +328,7 @@ void GUI::on_actionLock_qBittorrent_triggered() {
|
|||||||
// Lock the interface
|
// Lock the interface
|
||||||
ui_locked = true;
|
ui_locked = true;
|
||||||
Preferences::setUILocked(true);
|
Preferences::setUILocked(true);
|
||||||
|
myTrayIconMenu->setEnabled(false);
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,6 +584,7 @@ bool GUI::unlockUI() {
|
|||||||
if(real_pass_md5 == password_md5) {
|
if(real_pass_md5 == password_md5) {
|
||||||
ui_locked = false;
|
ui_locked = false;
|
||||||
Preferences::setUILocked(false);
|
Preferences::setUILocked(false);
|
||||||
|
myTrayIconMenu->setEnabled(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
QMessageBox::warning(this, tr("Invalid password"), tr("The password is invalid"));
|
QMessageBox::warning(this, tr("Invalid password"), tr("The password is invalid"));
|
||||||
@ -1100,6 +1102,8 @@ QMenu* GUI::getTrayIconMenu() {
|
|||||||
myTrayIconMenu->addAction(actionPause_All);
|
myTrayIconMenu->addAction(actionPause_All);
|
||||||
myTrayIconMenu->addSeparator();
|
myTrayIconMenu->addSeparator();
|
||||||
myTrayIconMenu->addAction(actionExit);
|
myTrayIconMenu->addAction(actionExit);
|
||||||
|
if(ui_locked)
|
||||||
|
myTrayIconMenu->setEnabled(false);
|
||||||
return myTrayIconMenu;
|
return myTrayIconMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,8 +150,6 @@ contains(DEFINES, DISABLE_GUI) {
|
|||||||
TARGET = qbittorrent
|
TARGET = qbittorrent
|
||||||
}
|
}
|
||||||
|
|
||||||
QMAKE_CXXFLAGS_RELEASE += -flto
|
|
||||||
QMAKE_CXXFLAGS_DEBUG += -flto
|
|
||||||
unix:QMAKE_LFLAGS_SHAPP += -rdynamic
|
unix:QMAKE_LFLAGS_SHAPP += -rdynamic
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
|
Loading…
Reference in New Issue
Block a user