Merge lp:~osomon/unity-2d/escapeAmpersandsPartII into lp:unity-2d/3.0

Proposed by Olivier Tilloy
Status: Merged
Approved by: Ugo Riboni
Approved revision: 440
Merged at revision: 441
Proposed branch: lp:~osomon/unity-2d/escapeAmpersandsPartII
Merge into: lp:unity-2d/3.0
Diff against target: 15 lines (+4/-1)
1 file modified
launcher/UnityApplications/placeentry.cpp (+4/-1)
To merge this branch: bzr merge lp:~osomon/unity-2d/escapeAmpersandsPartII
Reviewer Review Type Date Requested Status
Ugo Riboni (community) Approve
Review via email: mp+52989@code.launchpad.net

Commit message

[launcher] Escape ampersands in place entry section names so that they are not considered as keyboard accelerators.

To post a comment you must log in.
Revision history for this message
Ugo Riboni (uriboni) wrote :

Works and code is ok. Good fix

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/UnityApplications/placeentry.cpp'
--- launcher/UnityApplications/placeentry.cpp 2011-03-10 11:01:04 +0000
+++ launcher/UnityApplications/placeentry.cpp 2011-03-11 10:10:31 +0000
@@ -797,7 +797,10 @@
797797
798 for (int i = 0; i < m_sections->rowCount(); ++i) {798 for (int i = 0; i < m_sections->rowCount(); ++i) {
799 QAction* section = new QAction(m_menu);799 QAction* section = new QAction(m_menu);
800 section->setText(m_sections->data(m_sections->index(i)).toString());800 QString sectionName = m_sections->data(m_sections->index(i)).toString();
801 /* Escape ampersands so that they are not considered as keyboard accelerators. */
802 sectionName.replace("&", "&&");
803 section->setText(sectionName);
801 section->setProperty(SECTION_PROPERTY, QVariant(i));804 section->setProperty(SECTION_PROPERTY, QVariant(i));
802 m_menu->addAction(section);805 m_menu->addAction(section);
803 QObject::connect(section, SIGNAL(triggered()), this, SLOT(onSectionTriggered()));806 QObject::connect(section, SIGNAL(triggered()), this, SLOT(onSectionTriggered()));

Subscribers

People subscribed via source and target branches