Merge lp:~dbusmenu-team/libdbusmenu/ubuntu into lp:~ubuntu-desktop/libdbusmenu/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp:~dbusmenu-team/libdbusmenu/ubuntu
Merge into: lp:~ubuntu-desktop/libdbusmenu/ubuntu
Diff against target: None lines
To merge this branch: bzr merge lp:~dbusmenu-team/libdbusmenu/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+11526@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Upstream update to 0.1.3 to fix a reordering bug.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2009-09-03 20:35:17 +0000
3+++ configure.ac 2009-09-10 13:35:07 +0000
4@@ -1,11 +1,11 @@
5
6-AC_INIT(libdbusmenu, 0.1.2, ted@canonical.com)
7+AC_INIT(libdbusmenu, 0.1.3, ted@canonical.com)
8 AC_COPYRIGHT([Copyright 2009 Canonical])
9
10 AC_PREREQ(2.53)
11
12 AM_CONFIG_HEADER(config.h)
13-AM_INIT_AUTOMAKE(libdbusmenu, 0.1.2)
14+AM_INIT_AUTOMAKE(libdbusmenu, 0.1.3)
15
16 AM_MAINTAINER_MODE
17
18
19=== modified file 'debian/changelog'
20--- debian/changelog 2009-09-04 09:27:29 +0000
21+++ debian/changelog 2009-09-10 13:49:20 +0000
22@@ -1,3 +1,16 @@
23+libdbusmenu (0.1.3-0ubuntu1~ppa2) karmic; urgency=low
24+
25+ * Merging in ~ubuntu-desktop branch.
26+
27+ -- Ted Gould <ted@ubuntu.com> Thu, 10 Sep 2009 08:49:16 -0500
28+
29+libdbusmenu (0.1.3-0ubuntu1~ppa1) karmic; urgency=low
30+
31+ * Upstream update 0.1.3
32+ * Fixes reordering of menu item issue
33+
34+ -- Ted Gould <ted@ubuntu.com> Thu, 10 Sep 2009 08:43:47 -0500
35+
36 libdbusmenu (0.1.2-0ubuntu1) karmic; urgency=low
37
38 * debian/rules:
39
40=== modified file 'libdbusmenu-gtk/client.c'
41--- libdbusmenu-gtk/client.c 2009-09-03 19:16:01 +0000
42+++ libdbusmenu-gtk/client.c 2009-09-09 21:50:48 +0000
43@@ -55,6 +55,7 @@
44 /* GObject Stuff */
45 G_DEFINE_TYPE (DbusmenuGtkClient, dbusmenu_gtkclient, DBUSMENU_TYPE_CLIENT);
46
47+/* Basic build for the class. Only a finalize and dispose handler. */
48 static void
49 dbusmenu_gtkclient_class_init (DbusmenuGtkClientClass *klass)
50 {
51@@ -66,6 +67,8 @@
52 return;
53 }
54
55+/* Registers the three times of menuitems that we're going to handle
56+ for the gtk world. And tracks when a new item gets added. */
57 static void
58 dbusmenu_gtkclient_init (DbusmenuGtkClient *self)
59 {
60@@ -78,6 +81,7 @@
61 return;
62 }
63
64+/* Just calling the super class. Future use. */
65 static void
66 dbusmenu_gtkclient_dispose (GObject *object)
67 {
68@@ -86,6 +90,7 @@
69 return;
70 }
71
72+/* Just calling the super class. Future use. */
73 static void
74 dbusmenu_gtkclient_finalize (GObject *object)
75 {
76@@ -159,9 +164,9 @@
77 return;
78 }
79
80-/* This takes a new DbusmenuMenuitem and attaches the
81- various things that we need to make it work in a
82- GTK World. */
83+/* The new menuitem signal only happens if we don't have a type handler
84+ for the type of the item. This should be an error condition and we're
85+ printing out a message. */
86 static void
87 new_menuitem (DbusmenuClient * client, DbusmenuMenuitem * mi, gpointer userdata)
88 {
89@@ -171,6 +176,22 @@
90 return;
91 }
92
93+/**
94+ dbusmenu_gtkclient_newitem_base:
95+ @client: The client handling everything on this connection
96+ @item: The #DbusmenuMenuitem to attach the GTK-isms to
97+ @gmi: A #GtkMenuItem representing the GTK world's view of this menuitem
98+ @parent: The parent #DbusmenuMenuitem
99+
100+ This function provides some of the basic connectivity for being in
101+ the GTK world. Things like visibility and sensitivity of the item are
102+ handled here so that the subclasses don't have to. If you're building
103+ your on GTK menu item you can use this function to apply those basic
104+ attributes so that you don't have to deal with them either.
105+
106+ This also handles passing the "activate" signal back to the
107+ #DbusmenuMenuitem side of thing.
108+*/
109 void
110 dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * item, GtkMenuItem * gmi, DbusmenuMenuitem * parent)
111 {
112@@ -224,6 +245,7 @@
113 static void
114 delete_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, DbusmenuGtkClient * gtkclient)
115 {
116+ /* If it's a root item, we shouldn't be dealing with it here. */
117 if (dbusmenu_menuitem_get_root(mi)) { return; }
118
119 if (g_list_length(dbusmenu_menuitem_get_children(mi)) == 0) {
120@@ -242,6 +264,7 @@
121 static void
122 move_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint new, guint old, DbusmenuGtkClient * gtkclient)
123 {
124+ /* If it's a root item, we shouldn't be dealing with it here. */
125 if (dbusmenu_menuitem_get_root(mi)) { return; }
126
127 gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);
128
129=== modified file 'libdbusmenu-gtk/menu.c'
130--- libdbusmenu-gtk/menu.c 2009-08-27 13:49:11 +0000
131+++ libdbusmenu-gtk/menu.c 2009-09-09 22:09:10 +0000
132@@ -185,6 +185,9 @@
133
134 /* Internal Functions */
135
136+/* Called when a new child of the root item is
137+ added. Sets up a signal for when it's actually
138+ realized. */
139 static void
140 root_child_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint position, DbusmenuGtkMenu * menu)
141 {
142@@ -193,6 +196,8 @@
143 return;
144 }
145
146+/* When one of the children move we need to react to that and
147+ move it on the GTK side as well. */
148 static void
149 root_child_moved (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint newposition, guint oldposition, DbusmenuGtkMenu * menu)
150 {
151@@ -202,6 +207,7 @@
152 return;
153 }
154
155+/* When a root child item disappears. */
156 static void
157 root_child_delete (DbusmenuMenuitem * root, DbusmenuMenuitem * child, DbusmenuGtkMenu * menu)
158 {
159@@ -212,6 +218,8 @@
160 return;
161 }
162
163+/* Called when the child is realized, and thus has all of it's
164+ properties and GTK-isms. We can put it in our menu here. */
165 static void
166 child_realized (DbusmenuMenuitem * child, gpointer userdata)
167 {
168@@ -220,10 +228,20 @@
169 DbusmenuGtkMenu * menu = DBUSMENU_GTKMENU(userdata);
170 DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu);
171
172- gtk_menu_append(menu, GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child)));
173+ GtkWidget * child_widget = GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child));
174+
175+ if (child_widget != NULL) {
176+ gtk_menu_append(menu, child_widget);
177+ gtk_menu_reorder_child(GTK_MENU(menu), child_widget, dbusmenu_menuitem_get_position(child, dbusmenu_client_get_root(DBUSMENU_CLIENT(priv->client))));
178+ } else {
179+ g_warning("Child is realized, but doesn't have a GTK Widget!");
180+ }
181+
182 return;
183 }
184
185+/* When the root menuitem changes we need to resetup things so that
186+ we're back in the game. */
187 static void
188 root_changed (DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, DbusmenuGtkMenu * menu) {
189 if (newroot == NULL) {

Subscribers

People subscribed via source and target branches

to all changes: