summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Piekos <mateuszpiekos@gmail.com>2012-04-24 19:59:55 (GMT)
committerMateusz Piekos <mateuszpiekos@gmail.com>2012-04-24 20:04:02 (GMT)
commit554627bb6fc2c2c89e93a4318aa85c03ec8c7acd (patch)
tree017751a54eceacdae2c0d9d19a34aa8e1524cd8e
parent8d200bd989b2893d2eaa03ea9f7fa7863f313547 (diff)
downloadswift-contrib-pielas/branch.zip
swift-contrib-pielas/branch.tar.bz2
Inserting elements do generalMenu_ before quitActionpielas/branch
Resolves: #1081
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp3
-rw-r--r--Swift/QtUI/QtMainWindow.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 7612720..e7cabf2 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -222,7 +222,8 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream, SettingsProvider* set
void QtLoginWindow::setShowNotificationToggle(bool toggle) {
if (toggle) {
- generalMenu_->addAction(toggleNotificationsAction_);
+ QList< QAction* > generalMenuActions = generalMenu_->actions();
+ generalMenu_->insertAction(generalMenuActions.at(generalMenuActions.count()-2), toggleNotificationsAction_);
}
else {
generalMenu_->removeAction(toggleNotificationsAction_);
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index ea888d5..05c78b3 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -126,7 +126,9 @@ QtMainWindow::QtMainWindow(SettingsProvider* settings, UIEventStream* uiEventStr
toggleRequestDeliveryReceipts_->setCheckable(true);
toggleRequestDeliveryReceipts_->setChecked(settings_->getSetting(SettingConstants::REQUEST_DELIVERYRECEIPTS));
connect(toggleRequestDeliveryReceipts_, SIGNAL(toggled(bool)), SLOT(handleToggleRequestDeliveryReceipts(bool)));
- loginMenus_.generalMenu->addAction(toggleRequestDeliveryReceipts_);
+
+ QList< QAction* > generalMenuActions = loginMenus_.generalMenu->actions();
+ loginMenus_.generalMenu->insertAction(generalMenuActions.at(generalMenuActions.count()-2),toggleRequestDeliveryReceipts_);
treeWidget_->onSomethingSelectedChanged.connect(boost::bind(&QAction::setEnabled, editUserAction_, _1));