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
1=== modified file 'configure.ac'
2--- configure.ac 2010-01-08 14:41:29 +0000
3+++ configure.ac 2010-01-12 14:53:12 +0000
4@@ -1,11 +1,11 @@
5
6-AC_INIT(libdbusmenu, 0.2.0, ted@canonical.com)
7+AC_INIT(libdbusmenu, 0.2.1, 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.2.0)
14+AM_INIT_AUTOMAKE(libdbusmenu, 0.2.1)
15
16 AM_MAINTAINER_MODE
17
18@@ -66,7 +66,7 @@
19 ###########################
20
21 LIBDBUSMENU_CURRENT=0
22-LIBDBUSMENU_REVISION=10
23+LIBDBUSMENU_REVISION=11
24 LIBDBUSMENU_AGE=0
25
26 AC_SUBST(LIBDBUSMENU_CURRENT)
27
28=== modified file 'debian/changelog'
29--- debian/changelog 2010-01-11 15:12:27 +0000
30+++ debian/changelog 2010-01-12 14:53:12 +0000
31@@ -1,3 +1,4 @@
32+<<<<<<< TREE
33 libdbusmenu (0.2.0-0ubuntu3) lucid; urgency=low
34
35 * debian/rules:
36@@ -13,6 +14,17 @@
37
38 -- Ken VanDine <ken.vandine@canonical.com> Sat, 09 Jan 2010 09:05:47 -0500
39
40+=======
41+libdbusmenu (0.2.1-0ubuntu1~ppa1) karmic; urgency=low
42+
43+ * Upstream release 0.2.1
44+ * Not deleting images that we're still using.
45+ * Adding padding between the icon and the label.
46+ * Setting direction based on parent widget text direction.
47+
48+ -- Ted Gould <ted@ubuntu.com> Tue, 12 Jan 2010 08:46:10 -0600
49+
50+>>>>>>> MERGE-SOURCE
51 libdbusmenu (0.2.0-0ubuntu1) lucid; urgency=low
52
53 * Upstream release 0.2.0
54
55=== modified file 'libdbusmenu-gtk/client.c'
56--- libdbusmenu-gtk/client.c 2010-01-07 16:53:27 +0000
57+++ libdbusmenu-gtk/client.c 2010-01-12 14:53:12 +0000
58@@ -511,13 +511,31 @@
59 icon either. */
60 gtkimage = NULL;
61 } else {
62+ /* Look to see if we want to have an icon with the 'ltr' or
63+ 'rtl' depending on what we're doing. */
64+ gchar * finaliconname = g_strdup_printf("%s-%s", iconname,
65+ gtk_widget_get_direction(GTK_WIDGET(gimi)) == GTK_TEXT_DIR_RTL ? "rtl" : "ltr");
66+ if (!gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), finaliconname)) {
67+ /* If we don't have that icon, fall back to having one
68+ without the extra bits. */
69+ g_free(finaliconname);
70+ finaliconname = (gchar *)iconname; /* Dropping const not
71+ becaue we don't love it. */
72+ }
73+
74 /* If we don't have an image, we need to build
75 one so that we can set the name. Otherwise we
76 can just convert it to this name. */
77 if (gtkimage == NULL) {
78- gtkimage = gtk_image_new_from_icon_name(iconname, GTK_ICON_SIZE_MENU);
79+ gtkimage = gtk_image_new_from_icon_name(finaliconname, GTK_ICON_SIZE_MENU);
80 } else {
81- gtk_image_set_from_icon_name(GTK_IMAGE(gtkimage), iconname, GTK_ICON_SIZE_MENU);
82+ gtk_image_set_from_icon_name(GTK_IMAGE(gtkimage), finaliconname, GTK_ICON_SIZE_MENU);
83+ }
84+
85+ /* If we're using the name with extra bits, then we need
86+ to free that string. */
87+ if (finaliconname != iconname) {
88+ g_free(finaliconname);
89 }
90 }
91 } else {
92
93=== modified file 'libdbusmenu-gtk/genericmenuitem.c'
94--- libdbusmenu-gtk/genericmenuitem.c 2009-12-17 21:49:27 +0000
95+++ libdbusmenu-gtk/genericmenuitem.c 2010-01-12 14:53:12 +0000
96@@ -143,6 +143,17 @@
97 return;
98 }
99
100+/* A quick little function to grab the padding from the
101+ style. It should be considered for caching when
102+ optimizing. */
103+static gint
104+get_hpadding (GtkWidget * widget)
105+{
106+ gint padding = 0;
107+ gtk_widget_style_get(widget, "horizontal-padding", &padding, NULL);
108+ return padding;
109+}
110+
111 /* Set the label on the item */
112 static void
113 set_label (GtkMenuItem * menu_item, const gchar * label)
114@@ -166,7 +177,7 @@
115 GtkWidget * hbox = gtk_hbox_new(FALSE, 0);
116 g_object_ref(child);
117 gtk_container_remove(GTK_CONTAINER(menu_item), child);
118- gtk_box_pack_start(GTK_BOX(hbox), child, FALSE, FALSE, 0);
119+ gtk_box_pack_start(GTK_BOX(hbox), child, FALSE, FALSE, get_hpadding(GTK_WIDGET(menu_item)));
120 gtk_container_add(GTK_CONTAINER(menu_item), hbox);
121 gtk_widget_show(hbox);
122 g_object_unref(child);
123@@ -190,7 +201,7 @@
124 if (child == NULL) {
125 gtk_container_add(GTK_CONTAINER(menu_item), GTK_WIDGET(labelw));
126 } else {
127- gtk_box_pack_end(GTK_BOX(child), GTK_WIDGET(labelw), TRUE, TRUE, 0);
128+ gtk_box_pack_end(GTK_BOX(child), GTK_WIDGET(labelw), TRUE, TRUE, get_hpadding(GTK_WIDGET(menu_item)));
129 }
130 } else {
131 /* Oh, just an update. No biggie. */
132@@ -383,7 +394,7 @@
133 GtkWidget * hbox = gtk_hbox_new(FALSE, 0);
134 g_object_ref(child);
135 gtk_container_remove(GTK_CONTAINER(menu_item), child);
136- gtk_box_pack_end(GTK_BOX(hbox), child, TRUE, TRUE, 0);
137+ gtk_box_pack_end(GTK_BOX(hbox), child, TRUE, TRUE, get_hpadding(GTK_WIDGET(menu_item)));
138 gtk_container_add(GTK_CONTAINER(menu_item), hbox);
139 gtk_widget_show(hbox);
140 g_object_unref(child);
141@@ -393,6 +404,9 @@
142 }
143 }
144
145+ if (image == (GtkWidget *)imagew)
146+ return;
147+
148 /* No we can see if we need to ethier replace and image or
149 just put ourselves into the structures */
150 if (imagew != NULL) {
151@@ -405,7 +419,7 @@
152 if (child == NULL) {
153 gtk_container_add(GTK_CONTAINER(menu_item), GTK_WIDGET(image));
154 } else {
155- gtk_box_pack_start(GTK_BOX(child), GTK_WIDGET(image), FALSE, FALSE, 0);
156+ gtk_box_pack_start(GTK_BOX(child), GTK_WIDGET(image), FALSE, FALSE, get_hpadding(GTK_WIDGET(menu_item)));
157 }
158
159 gtk_widget_show(image);

Subscribers

People subscribed via source and target branches

to all changes: