diff options
author | Tobias Markmann <tm@ayena.de> | 2014-09-29 08:07:05 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2014-10-17 20:11:30 (GMT) |
commit | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (patch) | |
tree | 78bb8ce9a6bcbc397805bcd433b96b3b23994f09 /Swift/QtUI/QtRosterHeader.cpp | |
parent | 1722d220533a78e8b2acbcd571631960656e78f8 (diff) | |
download | swift-contrib-38b0cb785fea8eae5e48fae56440695fdfd10ee1.zip swift-contrib-38b0cb785fea8eae5e48fae56440695fdfd10ee1.tar.bz2 |
Disable online only actions when offline.
Disabling action, menu items and drag 'n' drop which require an online
connection when the user is offline.
Test-Information:
Checked by going offline and checking the relevant actions and menu items.
Change-Id: Iacfa2c9f815d3b9bbad9ca4c2d0d04f95ce9a9e4
Diffstat (limited to 'Swift/QtUI/QtRosterHeader.cpp')
-rw-r--r-- | Swift/QtUI/QtRosterHeader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Swift/QtUI/QtRosterHeader.cpp b/Swift/QtUI/QtRosterHeader.cpp index 69a0ef6..d5029ad 100644 --- a/Swift/QtUI/QtRosterHeader.cpp +++ b/Swift/QtUI/QtRosterHeader.cpp @@ -82,6 +82,14 @@ void QtRosterHeader::setStatusText(const QString& statusMessage) { void QtRosterHeader::setStatusType(StatusShow::Type type) { statusWidget_->setStatusType(type); + if (type == StatusShow::None) { + nameWidget_->setOnline(false); + disconnect(avatarLabel_, SIGNAL(clicked()), this, SIGNAL(onEditProfileRequest())); + } + else { + nameWidget_->setOnline(true); + connect(avatarLabel_, SIGNAL(clicked()), this, SIGNAL(onEditProfileRequest()), Qt::UniqueConnection); + } } void QtRosterHeader::setConnecting() { |