Merge lp:~unity-team/unity/njpatel-2010-07-02-bug-fixes into lp:unity

Proposed by Neil J. Patel
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 369
Proposed branch: lp:~unity-team/unity/njpatel-2010-07-02-bug-fixes
Merge into: lp:unity
Diff against target: 371 lines (+94/-39)
12 files modified
.bzrignore (+4/-0)
Makefile.am (+4/-2)
targets/mutter/plugin.vala (+30/-19)
tests/ui/test-home-button.vala (+6/-0)
unity-private/launcher/application-controller.vala (+4/-1)
unity-private/panel/panel-indicator-object-entry-view.vala (+23/-10)
unity-private/panel/panel-menu-manager.vala (+5/-2)
unity-private/places/places-default-renderer-group.vala (+1/-1)
unity-private/places/places-place-bar.vala (+0/-1)
unity-private/places/places-place-model.vala (+6/-3)
unity-private/testing/test-window.vala (+10/-0)
unity/shell.vala (+1/-0)
To merge this branch: bzr merge lp:~unity-team/unity/njpatel-2010-07-02-bug-fixes
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Mirco Müller (community) Needs Fixing
Review via email: mp+29146@code.launchpad.net

Description of the change

Please see the linked bugs for the description of changes. Also, there should be a bugfix-per-commit, to ease review.

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

Selecting the overlay-mode doesn't allow to exit it again. Search doesn't work, selecting indicators doesn't work (no menus show up). One has to exit X11 completely and start gdm to get a responding system again. This is on Lucid.

review: Needs Fixing
Revision history for this message
Gord Allott (gordallott) wrote :

works well for me, approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2010-06-28 14:28:48 +0000
+++ .bzrignore 2010-07-03 13:30:43 +0000
@@ -317,3 +317,7 @@
317targets/mutter/spaces-manager.c317targets/mutter/spaces-manager.c
318unity/unity-pixbuf-cache.c318unity/unity-pixbuf-cache.c
319tests/unit/test-unity-pixbuf-cache.c319tests/unit/test-unity-pixbuf-cache.c
320tests/unit/test-appinfo-manager.c
321tests/unit/test-io.c
322unity/unity-appinfo-manager.c
323unity/unity-io.c
320324
=== modified file 'Makefile.am'
--- Makefile.am 2010-06-09 14:24:08 +0000
+++ Makefile.am 2010-07-03 13:30:43 +0000
@@ -28,5 +28,7 @@
28EXTRA_DIST = \28EXTRA_DIST = \
29 autogen.sh \29 autogen.sh \
30 COPYING \30 COPYING \
31 unity.pc.in \31 COPYING.LGPL \
32 COPYING.LGPL32 HACKING \
33 unity.pc.in
34
3335
=== modified file 'targets/mutter/plugin.vala'
--- targets/mutter/plugin.vala 2010-06-25 15:33:40 +0000
+++ targets/mutter/plugin.vala 2010-07-03 13:30:43 +0000
@@ -196,7 +196,7 @@
196196
197 this.wm = new WindowManagement (this);197 this.wm = new WindowManagement (this);
198 this.maximus = new Maximus ();198 this.maximus = new Maximus ();
199 199
200 END_FUNCTION ();200 END_FUNCTION ();
201 }201 }
202202
@@ -239,7 +239,7 @@
239239
240 this.launcher = new Launcher.Launcher (this);240 this.launcher = new Launcher.Launcher (this);
241 this.launcher.get_view ().opacity = 0;241 this.launcher.get_view ().opacity = 0;
242 242
243 this.spaces_manager = new SpacesManager (this);243 this.spaces_manager = new SpacesManager (this);
244 this.spaces_manager.set_padding (50, 50, 125, 50);244 this.spaces_manager.set_padding (50, 50, 125, 50);
245245
@@ -584,27 +584,38 @@
584 expose_manager.end_expose ();584 expose_manager.end_expose ();
585 }585 }
586586
587 public void hide_unity ()
588 {
589 if (places_showing == false)
590 return;
591
592 places_showing = false;
593
594 var anim = dark_box.animate (Clutter.AnimationMode.EASE_IN_QUAD, 100, "opacity", 0);
595 anim.completed.connect ((an) => {
596 (an.get_object () as Clutter.Actor).destroy ();
597 });
598
599 plugin.get_normal_window_group ().animate (Clutter.AnimationMode.EASE_OUT_QUAD, 100, "opacity", 255);
600
601 anim = places.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 100,
602 "opacity", 0);
603 anim.completed.connect ((an) => {
604 (an.get_object () as Clutter.Actor).hide ();
605 });
606
607 panel.set_indicator_mode (false);
608 ensure_input_region ();
609
610 while (Gtk.events_pending ())
611 Gtk.main_iteration ();
612 }
613
587 public void show_unity ()614 public void show_unity ()
588 {615 {
589 if (this.places_showing)616 if (this.places_showing)
590 {617 {
591 this.places_showing = false;618 hide_unity ();
592
593 var anim = dark_box.animate (Clutter.AnimationMode.EASE_IN_QUAD, 100, "opacity", 0);
594 anim.completed.connect ((an) => {
595 (an.get_object () as Clutter.Actor).destroy ();
596 });
597
598 plugin.get_normal_window_group ().animate (Clutter.AnimationMode.EASE_OUT_QUAD, 100, "opacity", 255);
599
600 anim = places.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 100,
601 "opacity", 0);
602 anim.completed.connect ((an) => {
603 (an.get_object () as Clutter.Actor).hide ();
604 });
605
606 this.panel.set_indicator_mode (false);
607 this.ensure_input_region ();
608 }619 }
609 else620 else
610 {621 {
611622
=== modified file 'tests/ui/test-home-button.vala'
--- tests/ui/test-home-button.vala 2010-06-22 17:18:49 +0000
+++ tests/ui/test-home-button.vala 2010-07-03 13:30:43 +0000
@@ -85,6 +85,12 @@
85 g_flag = true;85 g_flag = true;
86 }86 }
8787
88 public void
89 hide_unity ()
90 {
91
92 }
93
88 public int94 public int
89 get_indicators_width ()95 get_indicators_width ()
90 {96 {
9197
=== modified file 'unity-private/launcher/application-controller.vala'
--- unity-private/launcher/application-controller.vala 2010-07-01 11:09:37 +0000
+++ unity-private/launcher/application-controller.vala 2010-07-03 13:30:43 +0000
@@ -49,12 +49,13 @@
49 context.set_timestamp (Gdk.CURRENT_TIME);49 context.set_timestamp (Gdk.CURRENT_TIME);
5050
51 appinfo.launch (null, context);51 appinfo.launch (null, context);
52
53 global_shell.hide_unity ();
52 }54 }
53 catch (Error e)55 catch (Error e)
54 {56 {
55 warning (e.message);57 warning (e.message);
56 }58 }
57
58 }59 }
59 }60 }
6061
@@ -383,6 +384,8 @@
383384
384 public override void activate ()385 public override void activate ()
385 {386 {
387 global_shell.hide_unity ();
388
386 if (app is Bamf.Application)389 if (app is Bamf.Application)
387 {390 {
388 if (app.is_running ())391 if (app.is_running ())
389392
=== modified file 'unity-private/panel/panel-indicator-object-entry-view.vala'
--- unity-private/panel/panel-indicator-object-entry-view.vala 2010-06-23 21:18:02 +0000
+++ unity-private/panel/panel-indicator-object-entry-view.vala 2010-07-03 13:30:43 +0000
@@ -30,7 +30,6 @@
30 private bool menu_is_open = false;30 private bool menu_is_open = false;
3131
32 private uint32 click_time;32 private uint32 click_time;
33 private float last_found_entry_x = 0.0f;
3433
35 private float last_width = 0;34 private float last_width = 0;
36 private float last_height = 0;35 private float last_height = 0;
@@ -44,6 +43,11 @@
44 reactive:true);43 reactive:true);
45 }44 }
4645
46 ~IndicatorObjectEntryView ()
47 {
48 bg.unparent ();
49 }
50
47 construct51 construct
48 {52 {
49 /* Figure out if you need a label, text or both, create the ctk53 /* Figure out if you need a label, text or both, create the ctk
@@ -86,7 +90,7 @@
86 {90 {
87 image.hide ();91 image.hide ();
88 }92 }
89 93
90 entry.image.notify["visible"].connect (() =>94 entry.image.notify["visible"].connect (() =>
91 {95 {
92 if (entry.image != null)96 if (entry.image != null)
@@ -140,7 +144,7 @@
140 {144 {
141 text.text = entry.label.label;145 text.text = entry.label.label;
142 });146 });
143 147
144 if ((entry.label.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)148 if ((entry.label.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
145 {149 {
146 text.show ();150 text.show ();
@@ -149,7 +153,7 @@
149 {153 {
150 text.hide ();154 text.hide ();
151 }155 }
152 156
153 entry.label.notify["visible"].connect (() =>157 entry.label.notify["visible"].connect (() =>
154 {158 {
155 if (entry.label != null)159 if (entry.label != null)
@@ -163,7 +167,7 @@
163 text.hide ();167 text.hide ();
164 }168 }
165 }169 }
166 }); 170 });
167 }171 }
168 }172 }
169173
@@ -173,14 +177,19 @@
173 out bool push_in)177 out bool push_in)
174 {178 {
175 y = (int)height;179 y = (int)height;
176 x = (int)last_found_entry_x;180
181 float xx;
182 get_transformed_position (out xx, null);
183
184 x = (int)xx;
177 }185 }
178186
179 public void show_menu ()187 public void show_menu ()
180 {188 {
181 if (entry.menu is Gtk.Menu)189 if (entry.menu is Gtk.Menu)
182 {190 {
183 last_found_entry_x = x + get_parent ().x + get_parent ().get_parent ().x;191 global_shell.hide_unity ();
192
184 MenuManager.get_default ().register_visible_menu (entry.menu);193 MenuManager.get_default ().register_visible_menu (entry.menu);
185 entry.menu.popup (null,194 entry.menu.popup (null,
186 null,195 null,
@@ -188,6 +197,7 @@
188 1,197 1,
189 Clutter.get_current_event_time ());198 Clutter.get_current_event_time ());
190 click_time = Clutter.get_current_event_time ();199 click_time = Clutter.get_current_event_time ();
200 menu_is_open = true;
191 menu_shown ();201 menu_shown ();
192 }202 }
193 }203 }
@@ -216,7 +226,8 @@
216 }226 }
217 else227 else
218 {228 {
219 last_found_entry_x = x + get_parent ().x + get_parent ().get_parent ().x;229 global_shell.hide_unity ();
230
220 MenuManager.get_default ().register_visible_menu (entry.menu);231 MenuManager.get_default ().register_visible_menu (entry.menu);
221 entry.menu.popup (null,232 entry.menu.popup (null,
222 null,233 null,
@@ -233,7 +244,9 @@
233244
234 public bool on_motion_event (Clutter.Event e)245 public bool on_motion_event (Clutter.Event e)
235 {246 {
236 if ((entry.menu is Gtk.Menu) && MenuManager.get_default ().menu_is_open ())247 if ((entry.menu is Gtk.Menu)
248 && MenuManager.get_default ().menu_is_open ()
249 && menu_is_open == false)
237 {250 {
238 show_menu ();251 show_menu ();
239 return true;252 return true;
@@ -310,7 +323,7 @@
310 {323 {
311 return (entry.menu.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0;324 return (entry.menu.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0;
312 }325 }
313 326
314 private override void paint ()327 private override void paint ()
315 {328 {
316 bg.paint ();329 bg.paint ();
317330
=== modified file 'unity-private/panel/panel-menu-manager.vala'
--- unity-private/panel/panel-menu-manager.vala 2010-06-18 15:42:52 +0000
+++ unity-private/panel/panel-menu-manager.vala 2010-07-03 13:30:43 +0000
@@ -33,7 +33,9 @@
3333
34 public void register_visible_menu (Gtk.Menu menu)34 public void register_visible_menu (Gtk.Menu menu)
35 {35 {
36 if (current_menu is Gtk.Menu && (current_menu.visible == true) && (current_menu != menu))36 if (current_menu is Gtk.Menu
37 && (current_menu.visible == true)
38 && (current_menu != menu))
37 current_menu.popdown ();39 current_menu.popdown ();
3840
39 current_menu = menu;41 current_menu = menu;
@@ -41,7 +43,8 @@
4143
42 public void popdown_current_menu ()44 public void popdown_current_menu ()
43 {45 {
44 current_menu.popdown ();46 if (current_menu is Gtk.Menu)
47 current_menu.popdown ();
45 }48 }
4649
47 public bool menu_is_open ()50 public bool menu_is_open ()
4851
=== modified file 'unity-private/places/places-default-renderer-group.vala'
--- unity-private/places/places-default-renderer-group.vala 2010-07-01 15:49:26 +0000
+++ unity-private/places/places-default-renderer-group.vala 2010-07-03 13:30:43 +0000
@@ -216,7 +216,7 @@
216216
217 private async void clicked_handler ()217 private async void clicked_handler ()
218 {218 {
219 debug (@"Launching $uri");219 global_shell.hide_unity ();
220220
221 if (uri.has_prefix ("application://"))221 if (uri.has_prefix ("application://"))
222 {222 {
223223
=== modified file 'unity-private/places/places-place-bar.vala'
--- unity-private/places/places-place-bar.vala 2010-06-22 14:00:31 +0000
+++ unity-private/places/places-place-bar.vala 2010-07-03 13:30:43 +0000
@@ -46,7 +46,6 @@
46 set_background (bg);46 set_background (bg);
47 bg.show ();47 bg.show ();
4848
49 /* Enable once clutk bug is fixed */
50 glow = new Ctk.EffectGlow ();49 glow = new Ctk.EffectGlow ();
51 glow.set_color ({ 255, 255, 255, 255 });50 glow.set_color ({ 255, 255, 255, 255 });
52 glow.set_factor (1.0f);51 glow.set_factor (1.0f);
5352
=== modified file 'unity-private/places/places-place-model.vala'
--- unity-private/places/places-place-model.vala 2010-06-24 07:43:05 +0000
+++ unity-private/places/places-place-model.vala 2010-07-03 13:30:43 +0000
@@ -95,9 +95,12 @@
95 if (place is Place)95 if (place is Place)
96 {96 {
97 place.connect ();97 place.connect ();
98 (place as GLib.Object).ref ();98 if (place.online == true)
99 add (place);99 {
100 place_added (place);100 (place as GLib.Object).ref ();
101 add (place);
102 place_added (place);
103 }
101 }104 }
102 }105 }
103 }106 }
104107
=== modified file 'unity-private/testing/test-window.vala'
--- unity-private/testing/test-window.vala 2010-06-22 17:18:49 +0000
+++ unity-private/testing/test-window.vala 2010-07-03 13:30:43 +0000
@@ -312,6 +312,16 @@
312 this.places.do_queue_redraw ();312 this.places.do_queue_redraw ();
313 }313 }
314314
315 public void hide_unity ()
316 {
317 if (showing_places == false)
318 {
319 showing_places = true;
320 panel.set_indicator_mode (false);
321 places.opacity = 0;
322 }
323 }
324
315 public void about_to_show_places ()325 public void about_to_show_places ()
316 {326 {
317 places.about_to_show ();327 places.about_to_show ();
318328
=== modified file 'unity/shell.vala'
--- unity/shell.vala 2010-06-22 17:18:49 +0000
+++ unity/shell.vala 2010-07-03 13:30:43 +0000
@@ -38,6 +38,7 @@
38 public abstract ShellMode get_mode ();38 public abstract ShellMode get_mode ();
39 public abstract Clutter.Stage get_stage ();39 public abstract Clutter.Stage get_stage ();
40 public abstract void show_unity ();40 public abstract void show_unity ();
41 public abstract void hide_unity ();
41 public abstract int get_indicators_width ();42 public abstract int get_indicators_width ();
42 public abstract int get_launcher_width_foobar (); // _foobar is used to avoid a symbol-clash43 public abstract int get_launcher_width_foobar (); // _foobar is used to avoid a symbol-clash
43 public abstract int get_panel_height_foobar (); // with unity/targets/mutter/main.c44 public abstract int get_panel_height_foobar (); // with unity/targets/mutter/main.c