Merge lp:~albyrock87/awn-extras/extras-with-popup-api into lp:awn-extras

Proposed by Alberto Aldegheri
Status: Merged
Approved by: onox
Approved revision: 1388
Merged at revision: 1386
Proposed branch: lp:~albyrock87/awn-extras/extras-with-popup-api
Merge into: lp:awn-extras
Diff against target: 531 lines (+35/-155)
27 files modified
applets/maintained/awnterm/awn-terminal.vala (+1/-1)
applets/maintained/cairo-menu/cairo-aux-icon.c (+3/-49)
applets/maintained/cairo-menu/cairo-main-icon.c (+3/-48)
applets/maintained/calendar/clockcal.py (+1/-2)
applets/maintained/comics/comics.py (+1/-1)
applets/maintained/dialect/dialect.py (+2/-2)
applets/maintained/digital-clock/digital-clock.vala (+1/-1)
applets/maintained/feeds/feeds.py (+1/-1)
applets/maintained/file-browser-launcher/file-browser-launcher.py (+2/-2)
applets/maintained/garbage/applet.vala (+1/-1)
applets/maintained/indicator-applet/applet.c (+2/-4)
applets/maintained/media-control/media_control.py (+1/-1)
applets/maintained/media-icons/media-icons.py (+1/-1)
applets/maintained/media-player/media_player.py (+1/-1)
applets/maintained/places/applet.c (+2/-2)
applets/maintained/shiny-switcher/shinyswitcherapplet.c (+1/-2)
applets/maintained/showdesktop/applet.vala (+1/-1)
applets/maintained/slickswitcher/slickswitcher.py (+1/-1)
applets/maintained/sysmon/cpuicon.c (+1/-2)
applets/maintained/to-do/to-do.py (+1/-1)
applets/maintained/webapplet/applet.c (+1/-2)
applets/maintained/wobblyzini/applet.c (+1/-2)
applets/maintained/yama/yama.py (+1/-22)
applets/unmaintained/dropper/dropper.py (+1/-1)
applets/unmaintained/main-menu/applet.c (+1/-2)
applets/unmaintained/stacks/stacks_applet.py (+1/-1)
shared/python/awnlib.py (+1/-1)
To merge this branch: bzr merge lp:~albyrock87/awn-extras/extras-with-popup-api
Reviewer Review Type Date Requested Status
onox (community) Approve
Review via email: mp+35071@code.launchpad.net

Description of the change

Adapt all applets to use the new popup menu API in libawn.

Ready to test and review (use with trunk rev 742)

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

Shouldn't you also modify popup() in def show_menu in file-browser-launcher.py?

review: Needs Fixing
1387. By Alberto Aldegheri

Forgot a f-b-l popup

Revision history for this message
Alberto Aldegheri (albyrock87) wrote :

> Shouldn't you also modify popup() in def show_menu in file-browser-
> launcher.py?

Yes, I forgot it.

:) now it's ok!

1388. By Alberto Aldegheri

Fix compile warnings caused by my edits in indicator-applet

Revision history for this message
onox (onox) wrote :

Looks ok.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'applets/maintained/awnterm/awn-terminal.vala'
2--- applets/maintained/awnterm/awn-terminal.vala 2010-08-28 12:15:32 +0000
3+++ applets/maintained/awnterm/awn-terminal.vala 2010-09-12 12:44:45 +0000
4@@ -396,7 +396,7 @@
5 this.menu.append (about_item as MenuItem);
6 }
7 this.menu.set_screen (null);
8- this.menu.popup (null, null, null, evt.button, evt.time);
9+ this.get_icon ().popup_gtk_menu (this.menu, evt.button, evt.time);
10 }
11
12 private void
13
14=== modified file 'applets/maintained/cairo-menu/cairo-aux-icon.c'
15--- applets/maintained/cairo-menu/cairo-aux-icon.c 2010-09-03 16:32:07 +0000
16+++ applets/maintained/cairo-menu/cairo-aux-icon.c 2010-09-12 12:44:45 +0000
17@@ -267,52 +267,6 @@
18 cairo_menu_applet_remove_icon (AWN_CAIRO_MENU_APPLET(priv->applet),AWN_THEMED_ICON(icon));
19 }
20
21-static void
22-_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,CairoAuxIcon * icon)
23-{
24- GtkRequisition requisition;
25- gint applet_x, applet_y;
26- CairoAuxIconPrivate * priv = GET_PRIVATE (icon);
27- gint screen_height;
28- gint screen_width;
29- GdkScreen * def_screen = gdk_screen_get_default ();
30-
31- screen_height = gdk_screen_get_height (def_screen);
32- screen_width = gdk_screen_get_width (def_screen);
33- gtk_widget_size_request (GTK_WIDGET(menu),&requisition);
34- gdk_window_get_origin(GTK_WIDGET(icon)->window, &applet_x, &applet_y);
35- switch (awn_applet_get_pos_type (priv->applet))
36- {
37- case GTK_POS_BOTTOM:
38- *x=applet_x;
39- *y=applet_y - requisition.height + awn_applet_get_size (priv->applet);
40- break;
41- case GTK_POS_TOP:
42- *x=applet_x;
43- *y=applet_y + awn_applet_get_size (priv->applet) + awn_applet_get_offset (priv->applet);
44- break;
45- case GTK_POS_LEFT:
46- *x=applet_x + awn_applet_get_size (priv->applet) + awn_applet_get_offset (priv->applet);
47- *y=applet_y;
48- break;
49- case GTK_POS_RIGHT:
50- *x=applet_x - requisition.width + awn_applet_get_size (priv->applet);
51- *y=applet_y;
52- break;
53- }
54- if (*x + requisition.width > screen_width)
55- {
56- *x = screen_width - requisition.width;
57- }
58- if (*y + requisition.height > screen_height)
59- {
60- *y = screen_height - requisition.height;
61- }
62-// *push_in = TRUE; doesn't quite do what I want.
63-
64-}
65-
66-
67 static gboolean
68 _button_clicked_event (CairoAuxIcon *icon, GdkEventButton *event, gpointer null)
69 {
70@@ -322,8 +276,8 @@
71
72 if (event->button == 1)
73 {
74- gtk_menu_popup(GTK_MENU(priv->menu), NULL, NULL, (GtkMenuPositionFunc)_position,icon,
75- event->button, event->time);
76+ awn_icon_popup_gtk_menu (AWN_ICON (icon), priv->menu, event->button, event->time);
77+
78 if (!priv->autohide_cookie)
79 {
80 priv->autohide_cookie = awn_applet_inhibit_autohide (AWN_APPLET(priv->applet),"CairoMenu" );
81@@ -369,7 +323,7 @@
82 {
83 priv->autohide_cookie = awn_applet_inhibit_autohide (AWN_APPLET(priv->applet),"CairoMenu" );
84 }
85- gtk_menu_popup(GTK_MENU(priv->context_menu), NULL, NULL, NULL, NULL,event_button->button, event_button->time);
86+ awn_icon_popup_gtk_menu (AWN_ICON (icon), priv->context_menu, event->button, event->time);
87 g_object_set(awn_overlayable_get_effects (AWN_OVERLAYABLE(icon)), "depressed", FALSE,NULL);
88 }
89 else
90
91=== modified file 'applets/maintained/cairo-menu/cairo-main-icon.c'
92--- applets/maintained/cairo-menu/cairo-main-icon.c 2010-09-03 16:32:07 +0000
93+++ applets/maintained/cairo-menu/cairo-main-icon.c 2010-09-12 12:44:45 +0000
94@@ -252,51 +252,6 @@
95 NULL);
96 }
97
98-static void
99-_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,CairoMainIcon * icon)
100-{
101- GtkRequisition requisition;
102- gint applet_x, applet_y;
103- CairoMainIconPrivate * priv = GET_PRIVATE (icon);
104- gint screen_height;
105- gint screen_width;
106- GdkScreen * def_screen = gdk_screen_get_default ();
107-
108- screen_height = gdk_screen_get_height (def_screen);
109- screen_width = gdk_screen_get_width (def_screen);
110- gtk_widget_size_request (GTK_WIDGET(menu),&requisition);
111- gdk_window_get_origin(GTK_WIDGET(icon)->window, &applet_x, &applet_y);
112- switch (awn_applet_get_pos_type (priv->applet))
113- {
114- case GTK_POS_BOTTOM:
115- *x=applet_x;
116- *y=applet_y - requisition.height + awn_applet_get_size (priv->applet);
117- break;
118- case GTK_POS_TOP:
119- *x=applet_x;
120- *y=applet_y + awn_applet_get_size (priv->applet) + awn_applet_get_offset (priv->applet);
121- break;
122- case GTK_POS_LEFT:
123- *x=applet_x + awn_applet_get_size (priv->applet) + awn_applet_get_offset (priv->applet);
124- *y=applet_y;
125- break;
126- case GTK_POS_RIGHT:
127- *x=applet_x - requisition.width + awn_applet_get_size (priv->applet);
128- *y=applet_y;
129- break;
130- }
131- if (*x + requisition.width > screen_width)
132- {
133- *x = screen_width - requisition.width;
134- }
135- if (*y + requisition.height > screen_height)
136- {
137- *y = screen_height - requisition.height;
138- }
139-// *push_in = TRUE; doesn't quite do what I want.
140-
141-}
142-
143 static gboolean
144 _button_clicked_event (CairoMainIcon *icon, GdkEventButton *event, gpointer null)
145 {
146@@ -305,8 +260,8 @@
147
148 if (event->button == 1)
149 {
150- gtk_menu_popup(GTK_MENU(priv->menu), NULL, NULL, (GtkMenuPositionFunc)_position,icon,
151- event->button, event->time);
152+ awn_icon_popup_gtk_menu (AWN_ICON (icon), priv->menu, event->button, event->time);
153+
154 if (!priv->autohide_cookie)
155 {
156 priv->autohide_cookie = awn_applet_inhibit_autohide (AWN_APPLET(priv->applet),"CairoMenu" );
157@@ -341,7 +296,7 @@
158 {
159 priv->autohide_cookie = awn_applet_inhibit_autohide (AWN_APPLET(priv->applet),"CairoMenu" );
160 }
161- gtk_menu_popup(GTK_MENU(priv->context_menu), NULL, NULL, NULL, NULL,event->button, event->time);
162+ awn_icon_popup_gtk_menu (AWN_ICON (icon), priv->context_menu, event->button, event->time);
163 g_object_set(awn_overlayable_get_effects (AWN_OVERLAYABLE(icon)), "depressed", FALSE,NULL);
164 awn_utils_show_menu_images (GTK_MENU (priv->context_menu));
165 }
166
167=== modified file 'applets/maintained/calendar/clockcal.py'
168--- applets/maintained/calendar/clockcal.py 2010-08-19 20:51:33 +0000
169+++ applets/maintained/calendar/clockcal.py 2010-09-12 12:44:45 +0000
170@@ -265,8 +265,7 @@
171 self.dialog.hide()
172 else:
173 if event.button == 3: # right click
174- self.popup_menu.popup(None, None, None, event.button,
175- event.time)
176+ self.get_icon().popup_gtk_menu(self.popup_menu, event.button, event.time)
177 else:
178 self.build_calendar_dialog()
179 self.dialog.show_all()
180
181=== modified file 'applets/maintained/comics/comics.py'
182--- applets/maintained/comics/comics.py 2010-03-25 20:55:37 +0000
183+++ applets/maintained/comics/comics.py 2010-09-12 12:44:45 +0000
184@@ -226,7 +226,7 @@
185 def on_button3_pressed(self, event):
186 menu = self.make_menu()
187 if menu:
188- menu.popup(None, None, None, event.button, event.time)
189+ self.popup_gtk_menu (menu, event.button, event.time)
190
191 def on_button_press(self, widget, event):
192 if event.button == 1:
193
194=== modified file 'applets/maintained/dialect/dialect.py'
195--- applets/maintained/dialect/dialect.py 2010-03-29 21:55:55 +0000
196+++ applets/maintained/dialect/dialect.py 2010-09-12 12:44:45 +0000
197@@ -536,12 +536,12 @@
198 if event.button == 2:
199 button = self.middle
200 if button == 1:
201- self.gtk['umenu'].popup(None, None, None, 0, event.time)
202+ self.popup_gtk_menu (self.gtk['umenu'], 0, event.time)
203 return True
204 elif button < 3:
205 self.change_group(button - 1)
206 else:
207- self.cmenu.popup(None, None, None, 0, event.time)
208+ self.popup_gtk_menu (self.cmenu, 0, event.time)
209 return True
210 return False
211
212
213=== modified file 'applets/maintained/digital-clock/digital-clock.vala'
214--- applets/maintained/digital-clock/digital-clock.vala 2010-03-25 11:01:44 +0000
215+++ applets/maintained/digital-clock/digital-clock.vala 2010-09-12 12:44:45 +0000
216@@ -416,7 +416,7 @@
217 this._menu.append (about_item as Gtk.MenuItem);
218 }
219 this._menu.set_screen (null);
220- this._menu.popup (null, null, null, event.button, event.time);
221+ this.get_icon ().popup_gtk_menu(this._menu, event.button, event.time);
222 }
223 }
224
225
226=== modified file 'applets/maintained/feeds/feeds.py'
227--- applets/maintained/feeds/feeds.py 2010-06-29 21:16:37 +0000
228+++ applets/maintained/feeds/feeds.py 2010-09-12 12:44:45 +0000
229@@ -1056,7 +1056,7 @@
230 self.menu.append(item)
231
232 self.menu.show_all()
233- self.menu.popup(None, None, None, event.button, event.time)
234+ self.popup_gtk_menu (self.menu, event.button, event.time)
235
236 def toggle_show_only_new(self, item):
237 self.client.set_value(GROUP_DEFAULT, "show_only_new", item.get_active())
238
239=== modified file 'applets/maintained/file-browser-launcher/file-browser-launcher.py'
240--- applets/maintained/file-browser-launcher/file-browser-launcher.py 2010-09-11 20:24:11 +0000
241+++ applets/maintained/file-browser-launcher/file-browser-launcher.py 2010-09-12 12:44:45 +0000
242@@ -1086,7 +1086,7 @@
243 menu.append(about)
244
245 menu.show_all()
246- menu.popup(None, None, None, event.button, event.time)
247+ icon.popup_gtk_menu (menu, event.button, event.time)
248
249 def docklet_menu_eject(self, menu, num):
250 self.unmount(num)
251@@ -1266,7 +1266,7 @@
252 self.menu.append(prefs)
253 self.menu.append(about)
254 self.menu.show_all()
255- self.menu.popup(None, None, None, event.button, event.time)
256+ self.popup_gtk_menu (self.menu, event.button, event.time)
257
258 #Show the preferences window
259 def open_prefs(self, widget):
260
261=== modified file 'applets/maintained/garbage/applet.vala'
262--- applets/maintained/garbage/applet.vala 2010-08-28 12:15:32 +0000
263+++ applets/maintained/garbage/applet.vala 2010-09-12 12:44:45 +0000
264@@ -223,7 +223,7 @@
265 }
266 ctx_menu = (Menu)this.menu;
267 ctx_menu.set_screen (null);
268- ctx_menu.popup (null, null, null, evt.button, evt.time);
269+ this.get_icon ().popup_gtk_menu (ctx_menu, evt.button, evt.time);
270 }
271 private void
272 on_menu_empty_activate ()
273
274=== modified file 'applets/maintained/indicator-applet/applet.c'
275--- applets/maintained/indicator-applet/applet.c 2010-08-21 17:25:42 +0000
276+++ applets/maintained/indicator-applet/applet.c 2010-09-12 12:44:45 +0000
277@@ -891,8 +891,7 @@
278
279 iapplet->popup_num = (gint)g_object_get_data(G_OBJECT(icon), "num");
280
281- gtk_menu_popup(GTK_MENU(g_list_nth_data(iapplet->shown_menus, iapplet->popup_num)), NULL, NULL,
282- (GtkMenuPositionFunc)icon_menu_position, (gpointer)iapplet, 1, event->time);
283+ awn_icon_popup_gtk_menu (icon, GTK_WIDGET (g_list_nth_data(iapplet->shown_menus, iapplet->popup_num)), 1, event->time);
284
285 return FALSE;
286 }
287@@ -915,8 +914,7 @@
288 gtk_widget_show_all(iapplet->awn_menu);
289 }
290
291- gtk_menu_popup(GTK_MENU(iapplet->awn_menu), NULL, NULL, NULL, NULL,
292- event->button, event->time);
293+ awn_icon_popup_gtk_menu (icon, GTK_WIDGET (iapplet->awn_menu), event->button, event->time);
294
295 return FALSE;
296 }
297
298=== modified file 'applets/maintained/media-control/media_control.py'
299--- applets/maintained/media-control/media_control.py 2010-08-18 17:52:47 +0000
300+++ applets/maintained/media-control/media_control.py 2010-09-12 12:44:45 +0000
301@@ -352,7 +352,7 @@
302 self.dialog.show_all()
303
304 def menu_popup(self, widget, event):
305- self.popup_menu.popup(None, None, None, event.button, event.time)
306+ self.popup_gtk_menu (self.popup_menu, event.button, event.time)
307
308 def wheel_turn (self, widget, event):
309 if event.direction == gtk.gdk.SCROLL_UP:
310
311=== modified file 'applets/maintained/media-icons/media-icons.py'
312--- applets/maintained/media-icons/media-icons.py 2009-09-20 01:00:57 +0000
313+++ applets/maintained/media-icons/media-icons.py 2010-09-12 12:44:45 +0000
314@@ -95,7 +95,7 @@
315
316 def menu_popup(self, widget, event):
317 self.popup_menu.show_all()
318- self.popup_menu.popup(None, None, None, event.button, event.time)
319+ self.popup_gtk_menu (self.popup_menu, event.button, event.time)
320
321 def what_app(self):
322 self.player_name = mediaplayers.get_app_name()
323
324=== modified file 'applets/maintained/media-player/media_player.py'
325--- applets/maintained/media-player/media_player.py 2010-08-18 17:55:21 +0000
326+++ applets/maintained/media-player/media_player.py 2010-09-12 12:44:45 +0000
327@@ -282,7 +282,7 @@
328 self.showApplet()
329
330 def menu_popup(self, widget, event):
331- self.popup_menu.popup(None, None, None, event.button, event.time)
332+ self.popup_gtk_menu (self.popup_menu, event.button, event.time)
333
334 def button_press(self, widget, event):
335 if event.button == 2:
336
337=== modified file 'applets/maintained/places/applet.c'
338--- applets/maintained/places/applet.c 2010-04-09 23:18:24 +0000
339+++ applets/maintained/places/applet.c 2010-09-12 12:44:45 +0000
340@@ -1206,8 +1206,8 @@
341 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
342 awn_utils_show_menu_images (menu);
343 }
344-
345- gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event_button->button, event_button->time);
346+
347+ awn_applet_popup_gtk_menu (AWN_APPLET(places->applet), menu, event_button->button, event_button->time);
348 }
349
350 return TRUE;
351
352=== modified file 'applets/maintained/shiny-switcher/shinyswitcherapplet.c'
353--- applets/maintained/shiny-switcher/shinyswitcherapplet.c 2010-08-20 15:43:18 +0000
354+++ applets/maintained/shiny-switcher/shinyswitcherapplet.c 2010-09-12 12:44:45 +0000
355@@ -661,8 +661,7 @@
356
357 if (menu)
358 {
359- gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
360- event->button, event->time);
361+ awn_applet_popup_gtk_menu (AWN_APPLET(shinyswitcher), menu, event->button, event->time);
362 }
363 }
364 return FALSE;
365
366=== modified file 'applets/maintained/showdesktop/applet.vala'
367--- applets/maintained/showdesktop/applet.vala 2010-08-28 12:15:32 +0000
368+++ applets/maintained/showdesktop/applet.vala 2010-09-12 12:44:45 +0000
369@@ -82,7 +82,7 @@
370 this._menu.append (about_item as Gtk.MenuItem);
371 }
372 this._menu.set_screen (null);
373- this._menu.popup (null, null, null, event.button, event.time);
374+ this.get_icon ().popup_gtk_menu (this._menu, event.button, event.time);
375 }
376
377 private void
378
379=== modified file 'applets/maintained/slickswitcher/slickswitcher.py'
380--- applets/maintained/slickswitcher/slickswitcher.py 2010-04-09 23:30:52 +0000
381+++ applets/maintained/slickswitcher/slickswitcher.py 2010-09-12 12:44:45 +0000
382@@ -259,7 +259,7 @@
383 menu.append(prefs_menu)
384 menu.append(about_menu)
385 menu.show_all()
386- menu.popup(None, None, None, event.button, event.time)
387+ applet.popup_gtk_menu (menu, event.button, event.time)
388
389 #When the user scrolls on the applet icon (switch viewport)
390 def scroll(self, applet, event):
391
392=== modified file 'applets/maintained/sysmon/cpuicon.c'
393--- applets/maintained/sysmon/cpuicon.c 2010-08-21 18:02:02 +0000
394+++ applets/maintained/sysmon/cpuicon.c 2010-09-12 12:44:45 +0000
395@@ -620,7 +620,6 @@
396
397 gtk_widget_show_all (priv->context_menu);
398 awn_utils_show_menu_images (GTK_MENU(priv->context_menu));
399- gtk_menu_popup(GTK_MENU(priv->context_menu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time() );
400-
401+ awn_applet_popup_gtk_menu (applet, priv->context_menu, 0, gtk_get_current_event_time());
402 }
403
404
405=== modified file 'applets/maintained/to-do/to-do.py'
406--- applets/maintained/to-do/to-do.py 2010-08-18 09:48:58 +0000
407+++ applets/maintained/to-do/to-do.py 2010-09-12 12:44:45 +0000
408@@ -201,7 +201,7 @@
409 menu.append(prefs_menu)
410 menu.append(about_menu)
411 menu.show_all()
412- menu.popup(None, None, None, event.button, event.time)
413+ self.popup_gtk_menu (menu, event.button, event.time)
414
415 #Show the preferences menu
416 def show_prefs(self, *args):
417
418=== modified file 'applets/maintained/webapplet/applet.c'
419--- applets/maintained/webapplet/applet.c 2010-01-12 02:06:31 +0000
420+++ applets/maintained/webapplet/applet.c 2010-09-12 12:44:45 +0000
421@@ -473,8 +473,7 @@
422 NULL);
423 gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
424 }
425- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
426- event->button, event->time);
427+ awn_applet_popup_gtk_menu (webapplet->applet, menu, event->button, event->time);
428 }
429 return TRUE;
430 }
431
432=== modified file 'applets/maintained/wobblyzini/applet.c'
433--- applets/maintained/wobblyzini/applet.c 2009-07-02 18:14:47 +0000
434+++ applets/maintained/wobblyzini/applet.c 2010-09-12 12:44:45 +0000
435@@ -39,8 +39,7 @@
436 menu = awn_applet_create_default_menu (applet);
437 }
438 gtk_menu_set_screen (GTK_MENU (menu), NULL);
439- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
440- event->button, event->time);
441+ awn_applet_popup_gtk_menu (applet, menu, event->button, event->time);
442 }
443 return TRUE;
444 }
445
446=== modified file 'applets/maintained/yama/yama.py'
447--- applets/maintained/yama/yama.py 2010-09-11 20:36:06 +0000
448+++ applets/maintained/yama/yama.py 2010-09-12 12:44:45 +0000
449@@ -172,28 +172,7 @@
450 self.session_items.append(shutdown_item)
451
452 def clicked_cb(self, widget):
453- def get_position(menu):
454- magic_extra_offset = 5
455-
456- icon_x, icon_y = self.applet.get_icon().window.get_origin()
457- menu_width, menu_height = self.menu.size_request()
458- orientation = self.applet.get_pos_type()
459-
460- if orientation == gtk.POS_BOTTOM:
461- icon_y = icon_y - menu_height + self.applet.get_size()
462- elif orientation == gtk.POS_TOP:
463- icon_y = icon_y + self.applet.get_size() + self.applet.get_offset() + magic_extra_offset
464- elif orientation == gtk.POS_RIGHT:
465- icon_x = icon_x - menu_width + self.applet.get_size()
466- elif orientation == gtk.POS_LEFT:
467- icon_x = icon_x + self.applet.get_size() + self.applet.get_offset() + magic_extra_offset
468-
469- # Make sure the menu fits on the screen completely
470- icon_x = min(icon_x, self.menu.get_screen().get_width() - menu_width)
471- icon_y = min(icon_y, self.menu.get_screen().get_height() - menu_height)
472-
473- return (icon_x, icon_y, False)
474- self.menu.popup(None, None, get_position, 0, 0)
475+ self.applet.popup_gtk_menu (self.menu, 0, gtk.get_current_event_time())
476
477 def setup_context_menu(self):
478 """Add "Edit Menus" to the context menu.
479
480=== modified file 'applets/unmaintained/dropper/dropper.py'
481--- applets/unmaintained/dropper/dropper.py 2009-10-11 22:15:59 +0000
482+++ applets/unmaintained/dropper/dropper.py 2010-09-12 12:44:45 +0000
483@@ -327,7 +327,7 @@
484 return True
485
486 def menu_popup(self, widget, event):
487- self.popup_menu.popup(None, None, None, event.button, event.time)
488+ self.popup_gtk_menu (self.popup_menu, event.button, event.time)
489
490 def applet_drag_motion_cb(self, widget, context, x, y, time):
491 self.get_effects().start(awn.EFFECT_LAUNCHING)
492
493=== modified file 'applets/unmaintained/main-menu/applet.c'
494--- applets/unmaintained/main-menu/applet.c 2009-10-27 19:49:34 +0000
495+++ applets/unmaintained/main-menu/applet.c 2010-09-12 12:44:45 +0000
496@@ -371,8 +371,7 @@
497 }
498 else if (event->button == 3)
499 {
500- gtk_menu_popup(GTK_MENU(app->menu), NULL, NULL, NULL, NULL,event->button,
501- event->time);
502+ awn_applet_popup_gtk_menu (AWN_APPLET (eb), app->menu, event->button, event->time);
503 }
504 return TRUE;
505 }
506
507=== modified file 'applets/unmaintained/stacks/stacks_applet.py'
508--- applets/unmaintained/stacks/stacks_applet.py 2010-07-18 17:42:38 +0000
509+++ applets/unmaintained/stacks/stacks_applet.py 2010-09-12 12:44:45 +0000
510@@ -185,7 +185,7 @@
511 pref_item.connect_object("activate",self.applet_menu_pref_cb,self)
512 about_item.connect_object("activate",self.applet_menu_about_cb,self)
513 popup_menu.show_all()
514- popup_menu.popup(None, None, None, event.button, event.time)
515+ self.popup_gtk_menu (popup_menu, event.button, event.time)
516 elif event.button == 2:
517 # middle click
518 self.backend.open()
519
520=== modified file 'shared/python/awnlib.py'
521--- shared/python/awnlib.py 2010-08-12 17:08:16 +0000
522+++ shared/python/awnlib.py 2010-09-12 12:44:45 +0000
523@@ -224,7 +224,7 @@
524
525 if dialog == "menu":
526 self.__register["menu"].show_all()
527- self.__register["menu"].popup(None, None, None, event.button, event.time)
528+ self.__parent.popup_gtk_menu(self.__register["menu"], event.button, event.time)
529 elif dialog == "about":
530 self.__register["about"].show()
531 self.__register["about"].deiconify()

Subscribers

People subscribed via source and target branches