=== modified file 'plugins/unityshell/src/Launcher.cpp' --- plugins/unityshell/src/Launcher.cpp 2012-06-21 16:10:54 +0000 +++ plugins/unityshell/src/Launcher.cpp 2012-06-28 02:08:18 +0000 @@ -3030,6 +3030,8 @@ &self->_sc_icon_aptdaemon_task, NULL); g_dbus_method_invocation_return_value(invocation, nullptr); + + self->EnsureAnimation(); } } === modified file 'plugins/unityshell/src/LauncherController.cpp' --- plugins/unityshell/src/LauncherController.cpp 2012-06-21 17:30:08 +0000 +++ plugins/unityshell/src/LauncherController.cpp 2012-06-28 02:08:18 +0000 @@ -457,6 +457,11 @@ return; } + // Check if desktop file was supplied, or if it's set to SC's agent + // See https://bugs.launchpad.net/unity/+bug/1002440 + if (path.empty() || path == "software-center-agent") + return; + SoftwareCenterLauncherIcon::Ptr result = CreateSCLauncherIcon(path, aptdaemon_trans_id, icon_path); launcher_->ForceReveal(true); === modified file 'plugins/unityshell/src/SoftwareCenterLauncherIcon.cpp' --- plugins/unityshell/src/SoftwareCenterLauncherIcon.cpp 2012-04-17 09:03:31 +0000 +++ plugins/unityshell/src/SoftwareCenterLauncherIcon.cpp 2012-06-28 02:08:18 +0000 @@ -43,6 +43,7 @@ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START) , finished_(true) , needs_urgent_(false) +, aptdaemon_trans_id_(aptdaemon_trans_id) { aptdaemon_trans_.Connect("PropertyChanged", sigc::mem_fun(this, &SoftwareCenterLauncherIcon::OnPropertyChanged)); @@ -50,7 +51,12 @@ SetIconType(TYPE_APPLICATION); icon_name = icon_path; - tooltip_text = _("Installation in Progress..."); + if (!aptdaemon_trans_id_.empty()) // Application is being installed, or hasn't been installed yet + tooltip_text = _("Installation in Progress..."); + else { + SetQuirk(QUIRK_URGENT, true); + needs_urgent_ = true; + tooltip_text = _((%AppName%).desktop); + } } void SoftwareCenterLauncherIcon::Animate(nux::ObjectPtr launcher, === modified file 'plugins/unityshell/src/SoftwareCenterLauncherIcon.h' --- plugins/unityshell/src/SoftwareCenterLauncherIcon.h 2012-04-17 09:03:31 +0000 +++ plugins/unityshell/src/SoftwareCenterLauncherIcon.h 2012-06-28 02:08:18 +0000 @@ -21,6 +21,7 @@ #ifndef SOFTWARE_CENTER_LAUNCHERICON_H #define SOFTWARE_CENTER_LAUNCHERICON_H +#include #include #include "BamfLauncherIcon.h" @@ -61,6 +62,8 @@ nux::ObjectPtr launcher_; bool finished_; bool needs_urgent_; + + std::string aptdaemon_trans_id_; }; } === modified file 'tests/autopilot/autopilot/tests/test_launcher.py' --- tests/autopilot/autopilot/tests/test_launcher.py 2012-06-21 17:30:08 +0000 +++ tests/autopilot/autopilot/tests/test_launcher.py 2012-06-28 02:08:18 +0000 @@ -471,6 +471,33 @@ self.assertThat(calc_icon, NotEquals(None)) self.assertThat(calc_icon.visible, Eventually(Equals(True))) + def test_software_center_add_icon(self): + """ Test the ability to add a SoftwareCenterLauncherIcon """ + sleep(.5) + + # Check if SC is pinned to the launcher already + icon = self.launcher.model.get_icon_by_desktop_id("ubuntu-software-center.desktop") + if icon != None: + self.launcher_instance.unlock_from_launcher(icon) + sleep(2.0) + + self.launcher.add_launcher_item_from_position("Unity Test", + "softwarecenter", + 100, + 100, + 32, + "/usr/share/applications/ubuntu-software-center.desktop", + "") + + sleep(2.0) + + icon = self.launcher.model.get_icon_by_desktop_id("ubuntu-software-center.desktop") + + # Check if the icon tooltip is NOT empty and NOT "waiting to install" + self.assertThat(icon.tooltip_text == "Installation in Progress", Equals(False)) + self.assertThat(len(icon.tooltip_text) == 0, Equals(False)) + sleep(.5) + class LauncherDragIconsBehavior(LauncherTestCase): """Tests interation with dragging icons with the Launcher""" @@ -525,7 +552,6 @@ get_launcher_icons_for_monitor(self.launcher_monitor)[-3] self.assertThat(moved_icon.id, Equals(calc_icon.id)) - class LauncherRevealTests(LauncherTestCase): """Test the launcher reveal behavior when in autohide mode."""