summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtRosterHeader.h2
-rw-r--r--Swift/QtUI/QtStatusWidget.cpp7
-rw-r--r--Swift/QtUI/QtStatusWidget.h6
3 files changed, 6 insertions, 9 deletions
diff --git a/Swift/QtUI/QtRosterHeader.h b/Swift/QtUI/QtRosterHeader.h
index 7fed2c0..72091cb 100644
--- a/Swift/QtUI/QtRosterHeader.h
+++ b/Swift/QtUI/QtRosterHeader.h
@@ -45,8 +45,6 @@ namespace Swift {
// void toggleExpanded();
QString name_;
QLabel* avatarLabel_;
-#warning FIXME - replace QLabel with override to do elide
-//http://lists.trolltech.com/pipermail/qt-interest/2010-January/018056.html
QLabel* nameLabel_;
QtTextEdit* statusEdit_;
QToolBar* toolBar_;
diff --git a/Swift/QtUI/QtStatusWidget.cpp b/Swift/QtUI/QtStatusWidget.cpp
index a5eda8b..e909f5c 100644
--- a/Swift/QtUI/QtStatusWidget.cpp
+++ b/Swift/QtUI/QtStatusWidget.cpp
@@ -93,13 +93,16 @@ void QtStatusWidget::handleApplicationFocusChanged(QWidget* /*old*/, QWidget* no
if (stack_->currentIndex() == 0) {
return;
}
- if (now != menu_ && now != statusEdit_) {
+ if (!now || (now != menu_ && now != statusEdit_ && !now->isAncestorOf(statusEdit_) && !now->isAncestorOf(menu_) && !statusEdit_->isAncestorOf(now) && !menu_->isAncestorOf(now))) {
handleEditCancelled();
}
+
}
void QtStatusWidget::mousePressEvent(QMouseEvent*) {
- handleClicked();
+ if (stack_->currentIndex() == 0) {
+ handleClicked();
+ }
}
void QtStatusWidget::generateList() {
diff --git a/Swift/QtUI/QtStatusWidget.h b/Swift/QtUI/QtStatusWidget.h
index 7317ea5..ef8b397 100644
--- a/Swift/QtUI/QtStatusWidget.h
+++ b/Swift/QtUI/QtStatusWidget.h
@@ -4,8 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFT_QtStatusWidget_H
-#define SWIFT_QtStatusWidget_H
+#pragma once
#include "Swiften/Elements/StatusShow.h"
@@ -58,6 +57,3 @@ namespace Swift {
};
}
-#endif
-
-