diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-09 13:20:04 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-09 13:20:04 (GMT) |
commit | 8921c929a190c3ae4d7a10e5e58c8e720a0121c3 (patch) | |
tree | ee032d7bfccefa62d700e92906c2f87ad97b4932 /Swift/QtUI | |
parent | 54351d4b9d8d3580c4f60306c3e1dfcba304777b (diff) | |
download | swift-contrib-8921c929a190c3ae4d7a10e5e58c8e720a0121c3.zip swift-contrib-8921c929a190c3ae4d7a10e5e58c8e720a0121c3.tar.bz2 |
Prevent renaming of 'Contacts' roster group used for groupless contacts.
Test-Information:
Verified by running Swift and checking that you cannot rename 'Contacts' group
anymore. Other groups are still renameable.
Change-Id: I97a79feb92d65d6dcdf914fb47b13ee268d271c3
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/Roster/QtRosterWidget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Swift/QtUI/Roster/QtRosterWidget.cpp b/Swift/QtUI/Roster/QtRosterWidget.cpp index fff0ccd..4a3c9f3 100644 --- a/Swift/QtUI/Roster/QtRosterWidget.cpp +++ b/Swift/QtUI/Roster/QtRosterWidget.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Kevin Smith + * Copyright (c) 2011-2014 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -132,6 +132,9 @@ void QtRosterWidget::contextMenuEvent(QContextMenuEvent* event) { } else if (GroupRosterItem* group = dynamic_cast<GroupRosterItem*>(item)) { QAction* renameGroupAction = contextMenu.addAction(tr("Rename")); + if (P2QSTRING(group->getDisplayName()) == tr("Contacts")) { + renameGroupAction->setEnabled(false); + } QAction* result = contextMenu.exec(event->globalPos()); if (result == renameGroupAction) { renameGroup(group); |