From 183966ef624e1a3813e2aa261440d5745a3dc820 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Wed, 26 May 2010 21:21:58 +0100
Subject: If last status was a preset, don't show for all types
Resolves: #394
diff --git a/Swift/QtUI/QtStatusWidget.cpp b/Swift/QtUI/QtStatusWidget.cpp
index 4801ff9..784c0d4 100644
--- a/Swift/QtUI/QtStatusWidget.cpp
+++ b/Swift/QtUI/QtStatusWidget.cpp
@@ -146,6 +146,18 @@ void QtStatusWidget::handleClicked() {
if (x + width > screenWidth) {
x = screenWidth - width;
}
+ std::vector<StatusShow::Type> types;
+ types.push_back(StatusShow::Online);
+ types.push_back(StatusShow::FFC);
+ types.push_back(StatusShow::Away);
+ types.push_back(StatusShow::XA);
+ types.push_back(StatusShow::DND);
+ types.push_back(StatusShow::None);
+ foreach (StatusShow::Type type, types) {
+ if (statusEdit_->text() == P2QSTRING(StatusShow::typeToFriendlyName(type))) {
+ statusEdit_->setText("");
+ }
+ }
generateList();
height = menu_->sizeHintForRow(0) * menu_->count();
--
cgit v0.10.2-6-g49f6