Merge lp:~osomon/unity-2d/nautilus-changes-icon into lp:unity-2d/3.0

Proposed by Olivier Tilloy
Status: Merged
Approved by: Aurélien Gâteau
Approved revision: 529
Merged at revision: 528
Proposed branch: lp:~osomon/unity-2d/nautilus-changes-icon
Merge into: lp:unity-2d/3.0
Diff against target: 36 lines (+12/-1)
1 file modified
launcher/UnityApplications/launcherapplication.cpp (+12/-1)
To merge this branch: bzr merge lp:~osomon/unity-2d/nautilus-changes-icon
Reviewer Review Type Date Requested Status
Aurélien Gâteau (community) Approve
Review via email: mp+57329@code.launchpad.net

Commit message

[launcher] Give priority to the contents of a favorite’s desktop file over the information provided by the running application.

Description of the change

Note to the reviewer: at this point in the schedule, it’s capital that the launcher is stress-tested to ensure that this change doesn’t introduce regressions. I’ve tested it thoroughly myself, but two pairs of eyes always do a better job than just one.

To post a comment you must log in.
Revision history for this message
Olivier Tilloy (osomon) wrote :

Note: this branch also partly fixes bug #753382: the icon doesn’t change any more, but the information about synaptic running is still lost aftor closing the software properties window.
This issue likely has a separate root cause though, so it’s ok if this branch doesn’t fix it completely.

Revision history for this message
Aurélien Gâteau (agateau) wrote :

Works fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/UnityApplications/launcherapplication.cpp'
--- launcher/UnityApplications/launcherapplication.cpp 2011-04-07 09:16:50 +0000
+++ launcher/UnityApplications/launcherapplication.cpp 2011-04-12 14:14:28 +0000
@@ -170,6 +170,10 @@
170QString170QString
171LauncherApplication::name() const171LauncherApplication::name() const
172{172{
173 if (sticky() && (m_appInfo != NULL)) {
174 return QString::fromUtf8(g_app_info_get_name(m_appInfo.data()));
175 }
176
173 if (m_application != NULL) {177 if (m_application != NULL) {
174 return m_application->name();178 return m_application->name();
175 }179 }
@@ -188,6 +192,11 @@
188QString192QString
189LauncherApplication::icon() const193LauncherApplication::icon() const
190{194{
195 if (sticky() && (m_appInfo != NULL)) {
196 GCharPointer ptr(g_icon_to_string(g_app_info_get_icon(m_appInfo.data())));
197 return QString::fromUtf8(ptr.data());
198 }
199
191 if (m_application != NULL) {200 if (m_application != NULL) {
192 return m_application->icon();201 return m_application->icon();
193 }202 }
@@ -368,7 +377,9 @@
368 }377 }
369378
370 m_application = application;379 m_application = application;
371 setDesktopFile(application->desktop_file());380 if (!sticky()) {
381 setDesktopFile(application->desktop_file());
382 }
372383
373 QObject::connect(application, SIGNAL(ActiveChanged(bool)), this, SIGNAL(activeChanged(bool)));384 QObject::connect(application, SIGNAL(ActiveChanged(bool)), this, SIGNAL(activeChanged(bool)));
374385

Subscribers

People subscribed via source and target branches