Merge lp:~unity-team/unity/unity.fix-removing-nofavs into lp:unity

Proposed by Gord Allott
Status: Merged
Merged at revision: 479
Proposed branch: lp:~unity-team/unity/unity.fix-removing-nofavs
Merge into: lp:unity
Diff against target: 42 lines (+17/-3)
2 files modified
unity-private/launcher/application-controller.vala (+1/-1)
unity-private/launcher/scroller-controller.vala (+16/-2)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-removing-nofavs
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+34399@code.launchpad.net

Description of the change

fixes lp:623953 -
summery; launch an application that is not in your launcher, right click the launcher, select keep in launcher, close the application. it should stay on your launcher.

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'unity-private/launcher/application-controller.vala'
--- unity-private/launcher/application-controller.vala 2010-08-25 09:17:16 +0000
+++ unity-private/launcher/application-controller.vala 2010-09-02 11:03:43 +0000
@@ -38,7 +38,7 @@
38 private Dbusmenu.Menuitem cached_menu;38 private Dbusmenu.Menuitem cached_menu;
39 private int menu_items_realized_counter;39 private int menu_items_realized_counter;
4040
41 private bool is_favorite = false;41 public bool is_favorite = false;
4242
43 public ApplicationController (string? desktop_file_, ScrollerChild child_)43 public ApplicationController (string? desktop_file_, ScrollerChild child_)
44 {44 {
4545
=== modified file 'unity-private/launcher/scroller-controller.vala'
--- unity-private/launcher/scroller-controller.vala 2010-09-01 13:26:46 +0000
+++ unity-private/launcher/scroller-controller.vala 2010-09-02 11:03:43 +0000
@@ -135,9 +135,23 @@
135 childcontrollers.add (controller);135 childcontrollers.add (controller);
136 controller.request_removal.connect (on_scroller_controller_closed);136 controller.request_removal.connect (on_scroller_controller_closed);
137 controller.notify["hide"].connect (() => {137 controller.notify["hide"].connect (() => {
138
139 // weird logic here i know, basically more if's than needed because
140 // i don't want to access the controller as a subclass until
141 // i know it is of that subclass type.
138 if (controller.hide && controller.child in model)142 if (controller.hide && controller.child in model)
139 model.remove (controller.child);143 {
140 if (!controller.hide && (controller.child in model) == false)144 if (controller is ApplicationController)
145 {
146 if ((controller as ApplicationController).is_favorite == false)
147 model.remove (controller.child);
148 }
149 else
150 {
151 model.remove (controller.child);
152 }
153 }
154 else if (!controller.hide && (controller.child in model) == false)
141 model.add (controller.child);155 model.add (controller.child);
142 });156 });
143 }157 }