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
1=== modified file 'launcher/UnityApplications/launcherapplication.cpp'
2--- launcher/UnityApplications/launcherapplication.cpp 2011-04-07 09:16:50 +0000
3+++ launcher/UnityApplications/launcherapplication.cpp 2011-04-12 14:14:28 +0000
4@@ -170,6 +170,10 @@
5 QString
6 LauncherApplication::name() const
7 {
8+ if (sticky() && (m_appInfo != NULL)) {
9+ return QString::fromUtf8(g_app_info_get_name(m_appInfo.data()));
10+ }
11+
12 if (m_application != NULL) {
13 return m_application->name();
14 }
15@@ -188,6 +192,11 @@
16 QString
17 LauncherApplication::icon() const
18 {
19+ if (sticky() && (m_appInfo != NULL)) {
20+ GCharPointer ptr(g_icon_to_string(g_app_info_get_icon(m_appInfo.data())));
21+ return QString::fromUtf8(ptr.data());
22+ }
23+
24 if (m_application != NULL) {
25 return m_application->icon();
26 }
27@@ -368,7 +377,9 @@
28 }
29
30 m_application = application;
31- setDesktopFile(application->desktop_file());
32+ if (!sticky()) {
33+ setDesktopFile(application->desktop_file());
34+ }
35
36 QObject::connect(application, SIGNAL(ActiveChanged(bool)), this, SIGNAL(activeChanged(bool)));
37

Subscribers

People subscribed via source and target branches