Merge lp:~sense/gtk/ubuntu into lp:~ubuntu-desktop/gtk/ubuntu

Proposed by Sense Egbert Hofstede
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~sense/gtk/ubuntu
Merge into: lp:~ubuntu-desktop/gtk/ubuntu
Diff against target: 108 lines (+73/-7)
2 files modified
debian/changelog (+7/-0)
debian/patches/072_indicator_menu_update.patch (+66/-7)
To merge this branch: bzr merge lp:~sense/gtk/ubuntu
Reviewer Review Type Date Requested Status
Cody Russell (community) Approve
Review via email: mp+31617@code.launchpad.net

Description of the change

This only adds the 'submenu-added' and 'submenu-removed' signals.

I didn't look into more places to emit 'child-added', but maybe we could reuse the existing GtkContainer::add signal for that since it is already in place and we now don't need a new one so it can apply to the submenu as well.

To post a comment you must log in.
Revision history for this message
Cody Russell (bratsche) :
review: Approve
Revision history for this message
Cody Russell (bratsche) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-08-02 16:53:24 +0000
3+++ debian/changelog 2010-08-03 08:07:46 +0000
4@@ -1,3 +1,10 @@
5+gtk+2.0 (2.21.5-1ubuntu6) maverick; urgency=low
6+
7+ * debian/patches/072_indicator_menu_update.patch: Adding 'submenu-added' and
8+ 'submenu-removed' signals so Application Indicators now that.
9+
10+ -- Sense Egbert Hofstede <sense@ubuntu.com> Tue, 03 Aug 2010 09:36:03 +0200
11+
12 gtk+2.0 (2.21.5-1ubuntu5) maverick; urgency=low
13
14 * debian/patches/043_ubuntu_menu_proxy.patch:
15
16=== modified file 'debian/patches/072_indicator_menu_update.patch'
17--- debian/patches/072_indicator_menu_update.patch 2010-07-28 16:22:46 +0000
18+++ debian/patches/072_indicator_menu_update.patch 2010-08-03 08:07:46 +0000
19@@ -1,7 +1,12 @@
20-Index: gtk+-2.21.5/gtk/gtkcontainer.c
21+## Description: Adding two signals that are needed for Application Indicator to
22+## keep up-to-date with changed GtkMenu(Item)s.
23+## Origin/Author: Cody Russell <bratsche@gnome.org>,
24+## Sense Hofstede <sense@ubuntu.com>
25+## Bug: unknown and https://launchpad.net/bug/608219
26+Index: gtk+2.0-2.21.5/gtk/gtkcontainer.c
27 ===================================================================
28---- gtk+-2.21.5.orig/gtk/gtkcontainer.c 2010-07-12 18:23:44.000000000 +0200
29-+++ gtk+-2.21.5/gtk/gtkcontainer.c 2010-07-28 18:02:42.568207000 +0200
30+--- gtk+2.0-2.21.5.orig/gtk/gtkcontainer.c 2010-07-12 18:23:44.000000000 +0200
31++++ gtk+2.0-2.21.5/gtk/gtkcontainer.c 2010-08-02 21:19:03.649494139 +0200
32 @@ -48,6 +48,8 @@
33 REMOVE,
34 CHECK_RESIZE,
35@@ -36,11 +41,11 @@
36 }
37
38 static void
39-Index: gtk+-2.21.5/gtk/gtkmenushell.c
40+Index: gtk+2.0-2.21.5/gtk/gtkmenushell.c
41 ===================================================================
42---- gtk+-2.21.5.orig/gtk/gtkmenushell.c 2010-07-28 17:58:24.000000000 +0200
43-+++ gtk+-2.21.5/gtk/gtkmenushell.c 2010-07-28 18:02:53.018207001 +0200
44-@@ -559,6 +559,8 @@
45+--- gtk+2.0-2.21.5.orig/gtk/gtkmenushell.c 2010-08-02 21:19:03.329528983 +0200
46++++ gtk+2.0-2.21.5/gtk/gtkmenushell.c 2010-08-02 21:19:03.649494139 +0200
47+@@ -560,6 +560,8 @@
48 menu_shell,
49 child,
50 position);
51@@ -49,3 +54,57 @@
52 }
53
54 static void
55+Index: gtk+2.0-2.21.5/gtk/gtkmenuitem.c
56+===================================================================
57+--- gtk+2.0-2.21.5.orig/gtk/gtkmenuitem.c 2010-08-02 21:20:04.862829521 +0200
58++++ gtk+2.0-2.21.5/gtk/gtkmenuitem.c 2010-08-02 21:19:51.224314400 +0200
59+@@ -52,6 +52,8 @@
60+ ACTIVATE_ITEM,
61+ TOGGLE_SIZE_REQUEST,
62+ TOGGLE_SIZE_ALLOCATE,
63++ SUBMENU_ADDED,
64++ SUBMENU_REMOVED,
65+ LAST_SIGNAL
66+ };
67+
68+@@ -244,6 +246,25 @@
69+ G_TYPE_NONE, 1,
70+ G_TYPE_INT);
71+
72++ menu_item_signals[SUBMENU_ADDED] =
73++ g_signal_new (I_("submenu-added"),
74++ G_OBJECT_CLASS_TYPE (gobject_class),
75++ G_SIGNAL_RUN_FIRST,
76++ 0,
77++ NULL, NULL,
78++ _gtk_marshal_VOID__OBJECT,
79++ G_TYPE_NONE, 1,
80++ GTK_TYPE_WIDGET);
81++
82++ menu_item_signals[SUBMENU_REMOVED] =
83++ g_signal_new (I_("submenu-removed"),
84++ G_OBJECT_CLASS_TYPE (gobject_class),
85++ G_SIGNAL_RUN_FIRST,
86++ 0,
87++ NULL, NULL,
88++ _gtk_marshal_VOID__VOID,
89++ G_TYPE_NONE, 0);
90++
91+ /**
92+ * GtkMenuItem:right-justified:
93+ *
94+@@ -791,6 +812,14 @@
95+ if (GTK_WIDGET (menu_item)->parent)
96+ gtk_widget_queue_resize (GTK_WIDGET (menu_item));
97+
98++ if(submenu == NULL)
99++ {
100++ g_signal_emit_by_name (menu_item, "submenu-removed");
101++ }
102++ else
103++ {
104++ g_signal_emit_by_name (menu_item, "submenu-added", GTK_WIDGET(submenu));
105++ }
106+ g_object_notify (G_OBJECT (menu_item), "submenu");
107+ }
108+ }

Subscribers

People subscribed via source and target branches