Merge lp:~osomon/unity-2d/dynamic-places-fixes into lp:unity-2d/3.0

Proposed by Olivier Tilloy
Status: Merged
Approved by: Florian Boucault
Approved revision: 519
Merged at revision: 519
Proposed branch: lp:~osomon/unity-2d/dynamic-places-fixes
Merge into: lp:unity-2d/3.0
Diff against target: 33 lines (+7/-2)
2 files modified
launcher/UnityApplications/place.cpp (+3/-0)
launcher/UnityApplications/placeentry.cpp (+4/-2)
To merge this branch: bzr merge lp:~osomon/unity-2d/dynamic-places-fixes
Reviewer Review Type Date Requested Status
Florian Boucault (community) Approve
Review via email: mp+56717@code.launchpad.net

Commit message

[launcher] Pick up newly installed lenses and display them.

Description of the change

Note to the reviewer: this has been tested with the AskUbuntu lens, available in the askubuntu-tools PPA (see instructions at http://www.omgubuntu.co.uk/2011/03/unity-askubuntu-lens-installable-via-ppa/).

Testing with other lenses is welcome (it may uncover other issues…).

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

Nicely spotted!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/UnityApplications/place.cpp'
2--- launcher/UnityApplications/place.cpp 2011-04-01 12:07:53 +0000
3+++ launcher/UnityApplications/place.cpp 2011-04-07 10:04:23 +0000
4@@ -114,7 +114,10 @@
5 connect(entry, SIGNAL(positionChanged(uint)),
6 SLOT(onEntryPositionChanged(uint)));
7 m_static_entries[entry->dbusObjectPath()] = entry;
8+ int index = m_entries.size();
9+ beginInsertRows(QModelIndex(), index, index);
10 m_entries.append(entry);
11+ endInsertRows();
12 }
13
14 /* Monitor the corresponding D-Bus place service */
15
16=== modified file 'launcher/UnityApplications/placeentry.cpp'
17--- launcher/UnityApplications/placeentry.cpp 2011-03-23 08:32:51 +0000
18+++ launcher/UnityApplications/placeentry.cpp 2011-04-07 10:04:23 +0000
19@@ -925,10 +925,12 @@
20 void
21 PlaceEntry::updateInfo(const PlaceEntryInfoStruct& info)
22 {
23- if (info.name != "") {
24+ if (!info.name.isEmpty()) {
25 setName(info.name);
26 }
27- setIcon(info.icon);
28+ if (!info.icon.isEmpty()) {
29+ setIcon(info.icon);
30+ }
31 setPosition(info.position);
32 setMimetypes(info.mimetypes);
33 setSensitive(info.sensitive);

Subscribers

People subscribed via source and target branches