diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-05-24 18:38:41 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-05-24 18:49:26 (GMT) |
commit | 95ff0fccf5fdefc395091a16e278bf3c2cd9d865 (patch) | |
tree | d7517592dec8944af7b5db12c86ee0d66b9203a0 /Swift/QtUI | |
parent | ff464cee022c75258405ab01ebeedf7bc1c79aa0 (diff) | |
download | swift-contrib-95ff0fccf5fdefc395091a16e278bf3c2cd9d865.zip swift-contrib-95ff0fccf5fdefc395091a16e278bf3c2cd9d865.tar.bz2 |
Various cleanups
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtRosterHeader.h | 2 | ||||
-rw-r--r-- | Swift/QtUI/QtStatusWidget.cpp | 7 | ||||
-rw-r--r-- | Swift/QtUI/QtStatusWidget.h | 6 |
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 - - |