Merge lp:~bilalakhtar/unity/software-center-integration-for-o into lp:unity
Status: | Superseded |
---|---|
Proposed branch: | lp:~bilalakhtar/unity/software-center-integration-for-o |
Merge into: | lp:unity |
Diff against target: |
330 lines (+223/-4) 6 files modified
plugins/unityshell/src/Launcher.cpp (+3/-3) plugins/unityshell/src/Launcher.h (+1/-0) plugins/unityshell/src/LauncherController.cpp (+55/-1) plugins/unityshell/src/LauncherController.h (+2/-0) plugins/unityshell/src/SoftwareCenterLauncherIcon.cpp (+102/-0) plugins/unityshell/src/SoftwareCenterLauncherIcon.h (+60/-0) |
To merge this branch: | bzr merge lp:~bilalakhtar/unity/software-center-integration-for-o |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mikkel Kamstrup Erlandsen (community) | Needs Fixing | ||
Neil J. Patel (community) | Needs Fixing | ||
Unity Team | Pending | ||
Review via email: mp+71905@code.launchpad.net |
This proposal has been superseded by a proposal from 2012-01-20.
Description of the change
This branch contains the first phase of the implementation of software-center integration with Unity. The complete spec on how it should be implemented, is located at:
https:/
This branch brings the following changes:
1) An app being installed is shown in the launcher with a tooltip "Waiting to install"
2) A progress bar on the launcher item displays the download/install progress.
3) When the app gets installed, the launcher items becomes usable, and the tooltip gets changed to the app name.
Things which are still to be implemented, in the next phases:
1) Animate the movement of the icon from the USC window to the Unity launcher.
2) Make the launcher icon wiggle when installation is complete
3) Stop the launcher icon from blinking when clicked in "waiting to install" state.
In the meantime, you can merge this branch into Unity while I implement the remaining aspects
Branch Testing instructions:
1) Make sure Unity built from my branch is running.
2) Get software-center from bzr branch lp:~gary-lasker/software-center/launcher-integration-lp761851
3) In the software center branch dir, run PYTHONPATH=. python ./software-center
4) Make sure that in the software center View menu, "New Applications In Launcher" is CHECKED.
5) Install a package using software-center that contains a desktop file (like gnome-color-
6) Watch the Unity launcher :-)
Hey Bilal, great work so far! I have some points which will hopefully reduce the code and make it a bit nicer to merge:
+ We try and not do anything _sync() in Unity, as it effects startup time and, if done after startup, painting time of Compiz. I see that you are connecting to the apt daemon via D-Bus, to make the code cleaner and automatically async, I suggest you use unity:: glib::DBusProxy in <UnityCore/ GLibDBusProxy. h> I added, which wraps the GIO DBusProxy bits in a C++ wrapper that:
- Connects to your chosen bus and object asynchronously
- Let's you use the Connect() method that allows you to connect to signals from the proxy individually [instead of
having a if (signal_name == foo) else if () etc etc], and also allows you to use a sigc::mem_fun instead of a
static function, which should make the code nicer.
You also forgot to store the proxy pointer and unref it on destruction (as well as disconnecting the signal). Using the glib::DBusProxy will handle all this for you internally, so you'll only need to delete the proxy instance once your done with it.
+ You shouldn't be g_variant_unref'ing the "params" value, as it is passed as a function argument and not expected to be unref'd. I think you wanted to unref "property_value".
+ When you start using glib::DBusProxy, you should be able to incorporate initialize_ tooltip_ text(); into your constructor as the constructor won't be as large anymore.
+ Instead of if (!app), do if (!BAMF_ IS_APPLICATION( app))