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
=== modified file 'configure.ac'
--- configure.ac 2009-09-03 20:35:17 +0000
+++ configure.ac 2009-09-10 13:35:07 +0000
@@ -1,11 +1,11 @@
11
2AC_INIT(libdbusmenu, 0.1.2, ted@canonical.com)2AC_INIT(libdbusmenu, 0.1.3, ted@canonical.com)
3AC_COPYRIGHT([Copyright 2009 Canonical])3AC_COPYRIGHT([Copyright 2009 Canonical])
44
5AC_PREREQ(2.53)5AC_PREREQ(2.53)
66
7AM_CONFIG_HEADER(config.h)7AM_CONFIG_HEADER(config.h)
8AM_INIT_AUTOMAKE(libdbusmenu, 0.1.2)8AM_INIT_AUTOMAKE(libdbusmenu, 0.1.3)
99
10AM_MAINTAINER_MODE10AM_MAINTAINER_MODE
1111
1212
=== modified file 'debian/changelog'
--- debian/changelog 2009-09-04 09:27:29 +0000
+++ debian/changelog 2009-09-10 13:49:20 +0000
@@ -1,3 +1,16 @@
1libdbusmenu (0.1.3-0ubuntu1~ppa2) karmic; urgency=low
2
3 * Merging in ~ubuntu-desktop branch.
4
5 -- Ted Gould <ted@ubuntu.com> Thu, 10 Sep 2009 08:49:16 -0500
6
7libdbusmenu (0.1.3-0ubuntu1~ppa1) karmic; urgency=low
8
9 * Upstream update 0.1.3
10 * Fixes reordering of menu item issue
11
12 -- Ted Gould <ted@ubuntu.com> Thu, 10 Sep 2009 08:43:47 -0500
13
1libdbusmenu (0.1.2-0ubuntu1) karmic; urgency=low14libdbusmenu (0.1.2-0ubuntu1) karmic; urgency=low
215
3 * debian/rules:16 * debian/rules:
417
=== modified file 'libdbusmenu-gtk/client.c'
--- libdbusmenu-gtk/client.c 2009-09-03 19:16:01 +0000
+++ libdbusmenu-gtk/client.c 2009-09-09 21:50:48 +0000
@@ -55,6 +55,7 @@
55/* GObject Stuff */55/* GObject Stuff */
56G_DEFINE_TYPE (DbusmenuGtkClient, dbusmenu_gtkclient, DBUSMENU_TYPE_CLIENT);56G_DEFINE_TYPE (DbusmenuGtkClient, dbusmenu_gtkclient, DBUSMENU_TYPE_CLIENT);
5757
58/* Basic build for the class. Only a finalize and dispose handler. */
58static void59static void
59dbusmenu_gtkclient_class_init (DbusmenuGtkClientClass *klass)60dbusmenu_gtkclient_class_init (DbusmenuGtkClientClass *klass)
60{61{
@@ -66,6 +67,8 @@
66 return;67 return;
67}68}
6869
70/* Registers the three times of menuitems that we're going to handle
71 for the gtk world. And tracks when a new item gets added. */
69static void72static void
70dbusmenu_gtkclient_init (DbusmenuGtkClient *self)73dbusmenu_gtkclient_init (DbusmenuGtkClient *self)
71{74{
@@ -78,6 +81,7 @@
78 return;81 return;
79}82}
8083
84/* Just calling the super class. Future use. */
81static void85static void
82dbusmenu_gtkclient_dispose (GObject *object)86dbusmenu_gtkclient_dispose (GObject *object)
83{87{
@@ -86,6 +90,7 @@
86 return;90 return;
87}91}
8892
93/* Just calling the super class. Future use. */
89static void94static void
90dbusmenu_gtkclient_finalize (GObject *object)95dbusmenu_gtkclient_finalize (GObject *object)
91{96{
@@ -159,9 +164,9 @@
159 return;164 return;
160}165}
161166
162/* This takes a new DbusmenuMenuitem and attaches the167/* The new menuitem signal only happens if we don't have a type handler
163 various things that we need to make it work in a 168 for the type of the item. This should be an error condition and we're
164 GTK World. */169 printing out a message. */
165static void170static void
166new_menuitem (DbusmenuClient * client, DbusmenuMenuitem * mi, gpointer userdata)171new_menuitem (DbusmenuClient * client, DbusmenuMenuitem * mi, gpointer userdata)
167{172{
@@ -171,6 +176,22 @@
171 return;176 return;
172}177}
173178
179/**
180 dbusmenu_gtkclient_newitem_base:
181 @client: The client handling everything on this connection
182 @item: The #DbusmenuMenuitem to attach the GTK-isms to
183 @gmi: A #GtkMenuItem representing the GTK world's view of this menuitem
184 @parent: The parent #DbusmenuMenuitem
185
186 This function provides some of the basic connectivity for being in
187 the GTK world. Things like visibility and sensitivity of the item are
188 handled here so that the subclasses don't have to. If you're building
189 your on GTK menu item you can use this function to apply those basic
190 attributes so that you don't have to deal with them either.
191
192 This also handles passing the "activate" signal back to the
193 #DbusmenuMenuitem side of thing.
194*/
174void195void
175dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * item, GtkMenuItem * gmi, DbusmenuMenuitem * parent)196dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * item, GtkMenuItem * gmi, DbusmenuMenuitem * parent)
176{197{
@@ -224,6 +245,7 @@
224static void245static void
225delete_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, DbusmenuGtkClient * gtkclient)246delete_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, DbusmenuGtkClient * gtkclient)
226{247{
248 /* If it's a root item, we shouldn't be dealing with it here. */
227 if (dbusmenu_menuitem_get_root(mi)) { return; }249 if (dbusmenu_menuitem_get_root(mi)) { return; }
228250
229 if (g_list_length(dbusmenu_menuitem_get_children(mi)) == 0) {251 if (g_list_length(dbusmenu_menuitem_get_children(mi)) == 0) {
@@ -242,6 +264,7 @@
242static void264static void
243move_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint new, guint old, DbusmenuGtkClient * gtkclient)265move_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint new, guint old, DbusmenuGtkClient * gtkclient)
244{266{
267 /* If it's a root item, we shouldn't be dealing with it here. */
245 if (dbusmenu_menuitem_get_root(mi)) { return; }268 if (dbusmenu_menuitem_get_root(mi)) { return; }
246269
247 gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);270 gpointer ann_menu = g_object_get_data(G_OBJECT(mi), data_menu);
248271
=== modified file 'libdbusmenu-gtk/menu.c'
--- libdbusmenu-gtk/menu.c 2009-08-27 13:49:11 +0000
+++ libdbusmenu-gtk/menu.c 2009-09-09 22:09:10 +0000
@@ -185,6 +185,9 @@
185185
186/* Internal Functions */186/* Internal Functions */
187187
188/* Called when a new child of the root item is
189 added. Sets up a signal for when it's actually
190 realized. */
188static void191static void
189root_child_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint position, DbusmenuGtkMenu * menu)192root_child_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint position, DbusmenuGtkMenu * menu)
190{193{
@@ -193,6 +196,8 @@
193 return;196 return;
194}197}
195198
199/* When one of the children move we need to react to that and
200 move it on the GTK side as well. */
196static void201static void
197root_child_moved (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint newposition, guint oldposition, DbusmenuGtkMenu * menu)202root_child_moved (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint newposition, guint oldposition, DbusmenuGtkMenu * menu)
198{203{
@@ -202,6 +207,7 @@
202 return;207 return;
203}208}
204209
210/* When a root child item disappears. */
205static void211static void
206root_child_delete (DbusmenuMenuitem * root, DbusmenuMenuitem * child, DbusmenuGtkMenu * menu)212root_child_delete (DbusmenuMenuitem * root, DbusmenuMenuitem * child, DbusmenuGtkMenu * menu)
207{213{
@@ -212,6 +218,8 @@
212 return;218 return;
213}219}
214220
221/* Called when the child is realized, and thus has all of it's
222 properties and GTK-isms. We can put it in our menu here. */
215static void223static void
216child_realized (DbusmenuMenuitem * child, gpointer userdata)224child_realized (DbusmenuMenuitem * child, gpointer userdata)
217{225{
@@ -220,10 +228,20 @@
220 DbusmenuGtkMenu * menu = DBUSMENU_GTKMENU(userdata);228 DbusmenuGtkMenu * menu = DBUSMENU_GTKMENU(userdata);
221 DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu);229 DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu);
222230
223 gtk_menu_append(menu, GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child)));231 GtkWidget * child_widget = GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child));
232
233 if (child_widget != NULL) {
234 gtk_menu_append(menu, child_widget);
235 gtk_menu_reorder_child(GTK_MENU(menu), child_widget, dbusmenu_menuitem_get_position(child, dbusmenu_client_get_root(DBUSMENU_CLIENT(priv->client))));
236 } else {
237 g_warning("Child is realized, but doesn't have a GTK Widget!");
238 }
239
224 return;240 return;
225}241}
226242
243/* When the root menuitem changes we need to resetup things so that
244 we're back in the game. */
227static void245static void
228root_changed (DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, DbusmenuGtkMenu * menu) {246root_changed (DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, DbusmenuGtkMenu * menu) {
229 if (newroot == NULL) {247 if (newroot == NULL) {

Subscribers

People subscribed via source and target branches

to all changes: