Merge lp:~bilalakhtar/unity/waiting-to-install-tooltip-925014 into lp:unity

Proposed by Bilal Akhtar
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2520
Proposed branch: lp:~bilalakhtar/unity/waiting-to-install-tooltip-925014
Merge into: lp:unity
Diff against target: 42 lines (+6/-1)
2 files modified
launcher/SoftwareCenterLauncherIcon.cpp (+3/-1)
launcher/SoftwareCenterLauncherIcon.h (+3/-0)
To merge this branch: bzr merge lp:~bilalakhtar/unity/waiting-to-install-tooltip-925014
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Tim Penhey (community) Approve
Marco Trevisan (Treviño) Approve
Review via email: mp+108858@code.launchpad.net

Commit message

SoftwareCenterLauncherIcon: avoid the "Waiting to Install" tooltip to stay after installation

Be consistent with auto-hiding launcher.

Description of the change

This branch contains a change that checks if the aptdaemon transaction ID was supplied by SC or not. If not, then it doesn't update the tooltip of the SCLauncherIcon to "Waiting to install"

Unity-side of bug fix for bug #925014 .

Merge request for the same bug fix to the Precise SRU branch is here: https://code.launchpad.net/~bilalakhtar/unity/5.0series-sru-software-center-integration-fixes

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Why are you including <string.h> in launcher/SoftwareCenterLauncherIcon.cpp?

In launcher/SoftwareCenterLauncherIcon.h, include <string> (not
<string.h>) and put it before <UnityCore/GLibDBusProxy.h>.

Standard includes first, then other libraries, then locals.

review: Needs Fixing
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Thanks Tim for the review, I've fixed it now.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

This is OT, but about this tooltip, any plan to include there the name of the application? Something like: "Waiting to install: SMPlayer"?

Other than that now is fine ;)
FYI, I've made some cleanup related to this in lp:~3v1n0/unity/launcher-cleanup/+merge/108517

review: Approve
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

@Marco: That's not part of the design spec (though MPT would like to get it changed I guess), but either way, since this branch is targeted at Unity 5.14 for Precise (SRU), string changes like those probably aren't allowed.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

I've moved the fix for this bug for the Precise branch to this merge request:

https://code.launchpad.net/~bilalakhtar/unity/5.0series-sru-software-center-integration-fixes

Revision history for this message
Tim Penhey (thumper) wrote :

Looks OK, but I'm wondering about testing this.

review: Approve
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hi Bilal! As per the Precise SRU branch, please be sure to test with the corresponding Software Center branch at lp:~gary-lasker/software-center/unity-launcher-integration-fixes to make sure that everything is working as you expect with this branch. Please let me know if anything happens that you are not expecting, or if you need me to make any further changes in my branch to support the changes you've made here.

Thanks!!
Gary

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :
review: Needs Fixing
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

After talking with Gary I think the approach will be to test this correct, approve it. (Since this is approved in 5.0...) Then I'll make a new bug to point at having this fixed correctly. (Correctly meaning that unity will be aware of the installing progress before completion, and will have the animation).

The new bug:
https://bugs.launchpad.net/unity/+bug/1028564

Tested this manually and it works as proposed.

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/SoftwareCenterLauncherIcon.cpp'
2--- launcher/SoftwareCenterLauncherIcon.cpp 2012-05-07 19:52:54 +0000
3+++ launcher/SoftwareCenterLauncherIcon.cpp 2012-06-07 01:19:19 +0000
4@@ -43,6 +43,7 @@
5 G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START)
6 , finished_(true)
7 , needs_urgent_(false)
8+, aptdaemon_trans_id_(aptdaemon_trans_id)
9 {
10
11 aptdaemon_trans_.Connect("PropertyChanged", sigc::mem_fun(this, &SoftwareCenterLauncherIcon::OnPropertyChanged));
12@@ -50,7 +51,8 @@
13
14 SetIconType(TYPE_APPLICATION);
15 icon_name = icon_path;
16- tooltip_text = _("Waiting to install");
17+ if (!aptdaemon_trans_id_.empty()) // Application is being installed, or hasn't been installed yet
18+ tooltip_text = _("Waiting to install");
19 }
20
21 void SoftwareCenterLauncherIcon::Animate(nux::ObjectPtr<Launcher> launcher,
22
23=== modified file 'launcher/SoftwareCenterLauncherIcon.h'
24--- launcher/SoftwareCenterLauncherIcon.h 2012-05-07 19:52:54 +0000
25+++ launcher/SoftwareCenterLauncherIcon.h 2012-06-07 01:19:19 +0000
26@@ -21,6 +21,7 @@
27 #ifndef SOFTWARE_CENTER_LAUNCHERICON_H
28 #define SOFTWARE_CENTER_LAUNCHERICON_H
29
30+#include <string>
31 #include <UnityCore/GLibDBusProxy.h>
32 #include "BamfLauncherIcon.h"
33
34@@ -61,6 +62,8 @@
35 nux::ObjectPtr<Launcher> launcher_;
36 bool finished_;
37 bool needs_urgent_;
38+
39+ std::string aptdaemon_trans_id_;
40 };
41
42 }