From dcccbaad59e5a202b0e9ad29594fbd714ea90dfa Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 22 Aug 2010 19:08:15 +0000 Subject: [PATCH] UI Lock also lock the tray icon menu --- src/GUI.cpp | 4 ++++ src/src.pro | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index 4e77f3eb2..b251ca4da 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -328,6 +328,7 @@ void GUI::on_actionLock_qBittorrent_triggered() { // Lock the interface ui_locked = true; Preferences::setUILocked(true); + myTrayIconMenu->setEnabled(false); hide(); } @@ -583,6 +584,7 @@ bool GUI::unlockUI() { if(real_pass_md5 == password_md5) { ui_locked = false; Preferences::setUILocked(false); + myTrayIconMenu->setEnabled(true); return true; } QMessageBox::warning(this, tr("Invalid password"), tr("The password is invalid")); @@ -1100,6 +1102,8 @@ QMenu* GUI::getTrayIconMenu() { myTrayIconMenu->addAction(actionPause_All); myTrayIconMenu->addSeparator(); myTrayIconMenu->addAction(actionExit); + if(ui_locked) + myTrayIconMenu->setEnabled(false); return myTrayIconMenu; } diff --git a/src/src.pro b/src/src.pro index 80c4ce05b..3e5b8275b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -150,8 +150,6 @@ contains(DEFINES, DISABLE_GUI) { TARGET = qbittorrent } -QMAKE_CXXFLAGS_RELEASE += -flto -QMAKE_CXXFLAGS_DEBUG += -flto unix:QMAKE_LFLAGS_SHAPP += -rdynamic unix {