summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-05-26 20:21:58 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-05-26 20:21:58 (GMT)
commit183966ef624e1a3813e2aa261440d5745a3dc820 (patch)
treee6e4fa2c41fcd65d822e9261fff923697379652d /Swift
parent103e5d04240fa6c9decf54802bca083c2cd65744 (diff)
downloadswift-183966ef624e1a3813e2aa261440d5745a3dc820.zip
swift-183966ef624e1a3813e2aa261440d5745a3dc820.tar.bz2
If last status was a preset, don't show for all types
Resolves: #394
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtStatusWidget.cpp12
1 files changed, 12 insertions, 0 deletions
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();