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: 159 lines (+53/-9)
4 files modified
configure.ac (+3/-3)
debian/changelog (+12/-0)
libdbusmenu-gtk/client.c (+20/-2)
libdbusmenu-gtk/genericmenuitem.c (+18/-4)
To merge this branch: bzr merge lp:~dbusmenu-team/libdbusmenu/ubuntu
Reviewer Review Type Date Requested Status
DBus Menu Team Pending
Review via email: mp+17231@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

0.2.1

lp:~dbusmenu-team/libdbusmenu/ubuntu updated
57. By Ken VanDine

merged 0.2.1

58. By Ken VanDine

* Upstream release 0.2.1
  - Fix to not destroy the image if we're still using it.
  - Adding code to support icon names that have an implied direction in them.
  - Fix to put a small amount of padding between the icon and the label.

59. By Ken VanDine

merged from lp:~ubuntu-desktop/dbusmenu/ubuntu

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2010-01-08 14:41:29 +0000
+++ configure.ac 2010-01-12 14:53:12 +0000
@@ -1,11 +1,11 @@
11
2AC_INIT(libdbusmenu, 0.2.0, ted@canonical.com)2AC_INIT(libdbusmenu, 0.2.1, 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.2.0)8AM_INIT_AUTOMAKE(libdbusmenu, 0.2.1)
99
10AM_MAINTAINER_MODE10AM_MAINTAINER_MODE
1111
@@ -66,7 +66,7 @@
66###########################66###########################
6767
68LIBDBUSMENU_CURRENT=068LIBDBUSMENU_CURRENT=0
69LIBDBUSMENU_REVISION=1069LIBDBUSMENU_REVISION=11
70LIBDBUSMENU_AGE=070LIBDBUSMENU_AGE=0
7171
72AC_SUBST(LIBDBUSMENU_CURRENT)72AC_SUBST(LIBDBUSMENU_CURRENT)
7373
=== modified file 'debian/changelog'
--- debian/changelog 2010-01-11 15:12:27 +0000
+++ debian/changelog 2010-01-12 14:53:12 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1libdbusmenu (0.2.0-0ubuntu3) lucid; urgency=low2libdbusmenu (0.2.0-0ubuntu3) lucid; urgency=low
23
3 * debian/rules:4 * debian/rules:
@@ -13,6 +14,17 @@
1314
14 -- Ken VanDine <ken.vandine@canonical.com> Sat, 09 Jan 2010 09:05:47 -050015 -- Ken VanDine <ken.vandine@canonical.com> Sat, 09 Jan 2010 09:05:47 -0500
1516
17=======
18libdbusmenu (0.2.1-0ubuntu1~ppa1) karmic; urgency=low
19
20 * Upstream release 0.2.1
21 * Not deleting images that we're still using.
22 * Adding padding between the icon and the label.
23 * Setting direction based on parent widget text direction.
24
25 -- Ted Gould <ted@ubuntu.com> Tue, 12 Jan 2010 08:46:10 -0600
26
27>>>>>>> MERGE-SOURCE
16libdbusmenu (0.2.0-0ubuntu1) lucid; urgency=low28libdbusmenu (0.2.0-0ubuntu1) lucid; urgency=low
1729
18 * Upstream release 0.2.030 * Upstream release 0.2.0
1931
=== modified file 'libdbusmenu-gtk/client.c'
--- libdbusmenu-gtk/client.c 2010-01-07 16:53:27 +0000
+++ libdbusmenu-gtk/client.c 2010-01-12 14:53:12 +0000
@@ -511,13 +511,31 @@
511 icon either. */511 icon either. */
512 gtkimage = NULL;512 gtkimage = NULL;
513 } else {513 } else {
514 /* Look to see if we want to have an icon with the 'ltr' or
515 'rtl' depending on what we're doing. */
516 gchar * finaliconname = g_strdup_printf("%s-%s", iconname,
517 gtk_widget_get_direction(GTK_WIDGET(gimi)) == GTK_TEXT_DIR_RTL ? "rtl" : "ltr");
518 if (!gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), finaliconname)) {
519 /* If we don't have that icon, fall back to having one
520 without the extra bits. */
521 g_free(finaliconname);
522 finaliconname = (gchar *)iconname; /* Dropping const not
523 becaue we don't love it. */
524 }
525
514 /* If we don't have an image, we need to build526 /* If we don't have an image, we need to build
515 one so that we can set the name. Otherwise we527 one so that we can set the name. Otherwise we
516 can just convert it to this name. */528 can just convert it to this name. */
517 if (gtkimage == NULL) {529 if (gtkimage == NULL) {
518 gtkimage = gtk_image_new_from_icon_name(iconname, GTK_ICON_SIZE_MENU);530 gtkimage = gtk_image_new_from_icon_name(finaliconname, GTK_ICON_SIZE_MENU);
519 } else {531 } else {
520 gtk_image_set_from_icon_name(GTK_IMAGE(gtkimage), iconname, GTK_ICON_SIZE_MENU);532 gtk_image_set_from_icon_name(GTK_IMAGE(gtkimage), finaliconname, GTK_ICON_SIZE_MENU);
533 }
534
535 /* If we're using the name with extra bits, then we need
536 to free that string. */
537 if (finaliconname != iconname) {
538 g_free(finaliconname);
521 }539 }
522 }540 }
523 } else {541 } else {
524542
=== modified file 'libdbusmenu-gtk/genericmenuitem.c'
--- libdbusmenu-gtk/genericmenuitem.c 2009-12-17 21:49:27 +0000
+++ libdbusmenu-gtk/genericmenuitem.c 2010-01-12 14:53:12 +0000
@@ -143,6 +143,17 @@
143 return;143 return;
144}144}
145145
146/* A quick little function to grab the padding from the
147 style. It should be considered for caching when
148 optimizing. */
149static gint
150get_hpadding (GtkWidget * widget)
151{
152 gint padding = 0;
153 gtk_widget_style_get(widget, "horizontal-padding", &padding, NULL);
154 return padding;
155}
156
146/* Set the label on the item */157/* Set the label on the item */
147static void158static void
148set_label (GtkMenuItem * menu_item, const gchar * label)159set_label (GtkMenuItem * menu_item, const gchar * label)
@@ -166,7 +177,7 @@
166 GtkWidget * hbox = gtk_hbox_new(FALSE, 0);177 GtkWidget * hbox = gtk_hbox_new(FALSE, 0);
167 g_object_ref(child);178 g_object_ref(child);
168 gtk_container_remove(GTK_CONTAINER(menu_item), child);179 gtk_container_remove(GTK_CONTAINER(menu_item), child);
169 gtk_box_pack_start(GTK_BOX(hbox), child, FALSE, FALSE, 0);180 gtk_box_pack_start(GTK_BOX(hbox), child, FALSE, FALSE, get_hpadding(GTK_WIDGET(menu_item)));
170 gtk_container_add(GTK_CONTAINER(menu_item), hbox);181 gtk_container_add(GTK_CONTAINER(menu_item), hbox);
171 gtk_widget_show(hbox);182 gtk_widget_show(hbox);
172 g_object_unref(child);183 g_object_unref(child);
@@ -190,7 +201,7 @@
190 if (child == NULL) {201 if (child == NULL) {
191 gtk_container_add(GTK_CONTAINER(menu_item), GTK_WIDGET(labelw));202 gtk_container_add(GTK_CONTAINER(menu_item), GTK_WIDGET(labelw));
192 } else {203 } else {
193 gtk_box_pack_end(GTK_BOX(child), GTK_WIDGET(labelw), TRUE, TRUE, 0);204 gtk_box_pack_end(GTK_BOX(child), GTK_WIDGET(labelw), TRUE, TRUE, get_hpadding(GTK_WIDGET(menu_item)));
194 }205 }
195 } else {206 } else {
196 /* Oh, just an update. No biggie. */207 /* Oh, just an update. No biggie. */
@@ -383,7 +394,7 @@
383 GtkWidget * hbox = gtk_hbox_new(FALSE, 0);394 GtkWidget * hbox = gtk_hbox_new(FALSE, 0);
384 g_object_ref(child);395 g_object_ref(child);
385 gtk_container_remove(GTK_CONTAINER(menu_item), child);396 gtk_container_remove(GTK_CONTAINER(menu_item), child);
386 gtk_box_pack_end(GTK_BOX(hbox), child, TRUE, TRUE, 0);397 gtk_box_pack_end(GTK_BOX(hbox), child, TRUE, TRUE, get_hpadding(GTK_WIDGET(menu_item)));
387 gtk_container_add(GTK_CONTAINER(menu_item), hbox);398 gtk_container_add(GTK_CONTAINER(menu_item), hbox);
388 gtk_widget_show(hbox);399 gtk_widget_show(hbox);
389 g_object_unref(child);400 g_object_unref(child);
@@ -393,6 +404,9 @@
393 }404 }
394 }405 }
395406
407 if (image == (GtkWidget *)imagew)
408 return;
409
396 /* No we can see if we need to ethier replace and image or410 /* No we can see if we need to ethier replace and image or
397 just put ourselves into the structures */411 just put ourselves into the structures */
398 if (imagew != NULL) {412 if (imagew != NULL) {
@@ -405,7 +419,7 @@
405 if (child == NULL) {419 if (child == NULL) {
406 gtk_container_add(GTK_CONTAINER(menu_item), GTK_WIDGET(image));420 gtk_container_add(GTK_CONTAINER(menu_item), GTK_WIDGET(image));
407 } else {421 } else {
408 gtk_box_pack_start(GTK_BOX(child), GTK_WIDGET(image), FALSE, FALSE, 0);422 gtk_box_pack_start(GTK_BOX(child), GTK_WIDGET(image), FALSE, FALSE, get_hpadding(GTK_WIDGET(menu_item)));
409 }423 }
410424
411 gtk_widget_show(image);425 gtk_widget_show(image);

Subscribers

People subscribed via source and target branches

to all changes: