Merge lp:~indicator-applet-developers/indicator-application/lucid into lp:~ubuntu-desktop/indicator-application/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp:~indicator-applet-developers/indicator-application/lucid
Merge into: lp:~ubuntu-desktop/indicator-application/ubuntu
Diff against target: 384 lines (+186/-9)
9 files modified
configure.ac (+2/-0)
debian/changelog (+34/-0)
debian/control (+1/-1)
src/libappindicator/app-indicator.c (+46/-4)
tests/test-libappindicator-dbus-client.c (+32/-0)
tests/test-libappindicator-dbus-server.c (+1/-0)
tests/test-libappindicator-fallback-item.c (+23/-0)
tests/test-libappindicator-fallback-watcher.c (+17/-4)
tests/test-libappindicator-status-client.c (+30/-0)
To merge this branch: bzr merge lp:~indicator-applet-developers/indicator-application/lucid
Reviewer Review Type Date Requested Status
Sebastien Bacher Pending
Review via email: mp+19979@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

I think we're a little out of sync. It's hard to tell with the cherry picks, as Bazaar doesn't seem to mark them, but I think you missed an update that jpeterson did for the dynamically updating menus.

Otherwise, it looks like mostly testing fixes. No ops.

112. By Ted Gould

* Upstream Merge
  * Checking for dbus-glib version 0.82

113. By Ted Gould

debian/control: Checking for dbus-glib >= 0.82

114. By Ted Gould

releasing version 0.0.13-0ubuntu8~ppa1

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-02-11 16:19:50 +0000
3+++ configure.ac 2010-02-23 16:33:20 +0000
4@@ -41,10 +41,12 @@
5 INDICATOR_REQUIRED_VERSION=0.3.1
6 DBUSMENUGTK_REQUIRED_VERSION=0.2.2
7 JSON_GLIB_REQUIRED_VERSION=0.7.6
8+DBUS_GLIB_REQUIRED_VERSION=0.82
9
10 PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION
11 indicator >= $INDICATOR_REQUIRED_VERSION
12 json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
13+ dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
14 dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION)
15
16 AC_SUBST(INDICATOR_CFLAGS)
17
18=== modified file 'debian/changelog'
19--- debian/changelog 2010-02-22 16:50:42 +0000
20+++ debian/changelog 2010-02-23 16:33:20 +0000
21@@ -1,3 +1,11 @@
22+indicator-application (0.0.13-0ubuntu8~ppa1) lucid; urgency=low
23+
24+ * Upstream Merge
25+ * Checking for dbus-glib version 0.82
26+ * debian/control: Checking for dbus-glib >= 0.82
27+
28+ -- Ted Gould <ted@ubuntu.com> Tue, 23 Feb 2010 10:30:27 -0600
29+
30 indicator-application (0.0.13-0ubuntu7) lucid; urgency=low
31
32 * Backported upstream change to fix menu item sensitivity update,
33@@ -35,6 +43,31 @@
34
35 -- Sebastien Bacher <seb128@ubuntu.com> Tue, 16 Feb 2010 16:22:31 +0100
36
37+indicator-application (0.0.13-0ubuntu3~ppa4) lucid; urgency=low
38+
39+ * Upstream merge
40+ * Fixing automatic updating of menus
41+ * Improve testing to be more reliable
42+ * Handle null string attention icons
43+ * Handling the visibility of menus better
44+
45+ -- Ted Gould <ted@ubuntu.com> Tue, 23 Feb 2010 09:49:56 -0600
46+
47+indicator-application (0.0.13-0ubuntu3~ppa2) lucid; urgency=low
48+
49+ * Upstream Merge
50+ * Fixing a crash by checking for NULL
51+
52+ -- Ted Gould <ted@ubuntu.com> Tue, 16 Feb 2010 10:31:30 -0600
53+
54+indicator-application (0.0.13-0ubuntu3~ppa1) lucid; urgency=low
55+
56+ * Upstream Merge
57+ * Submenu support
58+ * Updating menus
59+
60+ -- Ted Gould <ted@ubuntu.com> Tue, 16 Feb 2010 09:59:44 -0600
61+
62 indicator-application (0.0.13-0ubuntu2) lucid; urgency=low
63
64 * Backported lp:~bratsche/indicator-application/submenus to make the submenus
65@@ -282,3 +315,4 @@
66 * Development packaging edition.
67
68 -- Robert Collins <robert@canonical.com> Thu, 29 Oct 2009 15:44:14 +1100
69+
70
71=== modified file 'debian/control'
72--- debian/control 2010-02-16 15:23:53 +0000
73+++ debian/control 2010-02-23 16:33:20 +0000
74@@ -7,7 +7,7 @@
75 cdbs (>= 0.4.41),
76 python-central (>= 0.6),
77 libgtk2.0-dev (>= 2.12.0),
78- libdbus-glib-1-dev,
79+ libdbus-glib-1-dev (>= 0.82),
80 libjson-glib-dev,
81 gnome-doc-utils,
82 gtk-doc-tools,
83
84=== modified file 'src/libappindicator/app-indicator.c'
85--- src/libappindicator/app-indicator.c 2010-02-22 16:50:42 +0000
86+++ src/libappindicator/app-indicator.c 2010-02-23 16:33:20 +0000
87@@ -142,6 +142,7 @@
88 static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon);
89 static void watcher_proxy_destroyed (GObject * object, gpointer data);
90 static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicator *indicator);
91+static void submenu_changed (GtkWidget *widget, GtkWidget *child, gpointer data);
92
93 /* GObject type */
94 G_DEFINE_TYPE (AppIndicator, app_indicator, G_TYPE_OBJECT);
95@@ -1157,6 +1158,10 @@
96 const gchar *label = NULL;
97 gboolean label_set = FALSE;
98
99+ if (GTK_IS_TEAROFF_MENU_ITEM(widget)) {
100+ return;
101+ }
102+
103 child = dbusmenu_menuitem_new ();
104
105 if (GTK_IS_SEPARATOR_MENU_ITEM (widget))
106@@ -1239,15 +1244,28 @@
107 submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget));
108 if (submenu != NULL)
109 {
110- gtk_container_forall (GTK_CONTAINER (submenu),
111+ gtk_container_foreach (GTK_CONTAINER (submenu),
112 container_iterate,
113 child);
114+ g_signal_connect_object (submenu,
115+ "add",
116+ G_CALLBACK (submenu_changed),
117+ child,
118+ 0);
119+ g_signal_connect_object (submenu,
120+ "remove",
121+ G_CALLBACK (submenu_changed),
122+ child,
123+ 0);
124 }
125 }
126
127 dbusmenu_menuitem_property_set_bool (child,
128 DBUSMENU_MENUITEM_PROP_ENABLED,
129 GTK_WIDGET_IS_SENSITIVE (widget));
130+ dbusmenu_menuitem_property_set_bool (child,
131+ DBUSMENU_MENUITEM_PROP_VISIBLE,
132+ gtk_widget_get_visible (widget));
133
134 g_signal_connect (widget, "notify",
135 G_CALLBACK (widget_notify_cb), child);
136@@ -1259,6 +1277,27 @@
137 }
138
139 static void
140+submenu_changed (GtkWidget *widget,
141+ GtkWidget *child,
142+ gpointer data)
143+{
144+ DbusmenuMenuitem *root = (DbusmenuMenuitem *)data;
145+ GList *children, *l;
146+ children = dbusmenu_menuitem_get_children (root);
147+
148+ for (l = children; l;)
149+ {
150+ DbusmenuMenuitem *c = (DbusmenuMenuitem *)l->data;
151+ l = l->next;
152+ dbusmenu_menuitem_child_delete (root, c);
153+ }
154+
155+ gtk_container_foreach (GTK_CONTAINER (widget),
156+ container_iterate,
157+ root);
158+}
159+
160+static void
161 setup_dbusmenu (AppIndicator *self)
162 {
163 AppIndicatorPrivate *priv;
164@@ -1267,9 +1306,12 @@
165 priv = self->priv;
166 root = dbusmenu_menuitem_new ();
167
168- gtk_container_forall (GTK_CONTAINER (priv->menu),
169- container_iterate,
170- root);
171+ if (priv->menu)
172+ {
173+ gtk_container_foreach (GTK_CONTAINER (priv->menu),
174+ container_iterate,
175+ root);
176+ }
177
178 if (priv->menuservice == NULL)
179 {
180
181=== modified file 'tests/test-libappindicator-dbus-client.c'
182--- tests/test-libappindicator-dbus-client.c 2010-02-10 16:37:53 +0000
183+++ tests/test-libappindicator-dbus-client.c 2010-02-23 16:33:20 +0000
184@@ -23,9 +23,13 @@
185
186 #include <glib.h>
187 #include <dbus/dbus-glib.h>
188+#include <dbus/dbus-glib-bindings.h>
189+#include <dbus/dbus-glib-lowlevel.h>
190 #include <libappindicator/app-indicator.h>
191 #include "test-defines.h"
192
193+#include "../src/dbus-shared.h"
194+
195 static GMainLoop * mainloop = NULL;
196 static gboolean passed = TRUE;
197 static int propcount = 0;
198@@ -184,6 +188,19 @@
199 return FALSE;
200 }
201
202+static DBusHandlerResult
203+dbus_filter (DBusConnection * connection, DBusMessage * message, void * user_data)
204+{
205+ if (dbus_message_is_method_call(message, NOTIFICATION_WATCHER_DBUS_ADDR, "RegisterStatusNotifierItem")) {
206+ DBusMessage * reply = dbus_message_new_method_return(message);
207+ dbus_connection_send(connection, reply, NULL);
208+ dbus_message_unref(reply);
209+ return DBUS_HANDLER_RESULT_HANDLED;
210+ }
211+
212+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
213+}
214+
215 gint
216 main (gint argc, gchar * argv[])
217 {
218@@ -198,6 +215,21 @@
219 return 1;
220 }
221
222+ DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
223+ guint nameret = 0;
224+
225+ if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) {
226+ g_error("Unable to call to request name");
227+ return 1;
228+ }
229+
230+ if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
231+ g_error("Unable to get name");
232+ return 1;
233+ }
234+
235+ dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_filter, NULL, NULL);
236+
237 DBusGProxy * props = dbus_g_proxy_new_for_name_owner(session_bus,
238 ":1.0",
239 "/org/ayatana/NotificationItem/my_id",
240
241=== modified file 'tests/test-libappindicator-dbus-server.c'
242--- tests/test-libappindicator-dbus-server.c 2010-02-10 16:37:53 +0000
243+++ tests/test-libappindicator-dbus-server.c 2010-02-23 16:33:20 +0000
244@@ -44,6 +44,7 @@
245 g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
246
247 AppIndicator * ci = app_indicator_new (TEST_ID, TEST_ICON_NAME, TEST_CATEGORY);
248+
249 app_indicator_set_status (ci, TEST_STATE);
250 app_indicator_set_attention_icon (ci, TEST_ATTENTION_ICON_NAME);
251
252
253=== modified file 'tests/test-libappindicator-fallback-item.c'
254--- tests/test-libappindicator-fallback-item.c 2010-01-27 16:37:51 +0000
255+++ tests/test-libappindicator-fallback-item.c 2010-02-23 16:33:20 +0000
256@@ -1,5 +1,7 @@
257 #include <glib.h>
258 #include <glib-object.h>
259+#include <dbus/dbus-glib.h>
260+#include <dbus/dbus-glib-bindings.h>
261 #include <libappindicator/app-indicator.h>
262
263 #define TEST_LIBAPPINDICATOR_FALLBACK_ITEM_TYPE (test_libappindicator_fallback_item_get_type ())
264@@ -106,6 +108,27 @@
265 {
266 gtk_init(&argc, &argv);
267
268+ GError * error = NULL;
269+ DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
270+ if (error != NULL) {
271+ g_error("Unable to get session bus: %s", error->message);
272+ return 1;
273+ }
274+
275+ DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
276+
277+ guint nameret = 0;
278+
279+ if (!org_freedesktop_DBus_request_name(bus_proxy, "org.test", 0, &nameret, NULL)) {
280+ g_error("Unable to call to request name");
281+ return 1;
282+ }
283+
284+ if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
285+ g_error("Unable to get name");
286+ return 1;
287+ }
288+
289 TestLibappindicatorFallbackItem * item = g_object_new(TEST_LIBAPPINDICATOR_FALLBACK_ITEM_TYPE,
290 "id", "test-id",
291 "category", "Other",
292
293=== modified file 'tests/test-libappindicator-fallback-watcher.c'
294--- tests/test-libappindicator-fallback-watcher.c 2010-01-12 22:36:26 +0000
295+++ tests/test-libappindicator-fallback-watcher.c 2010-02-23 16:33:20 +0000
296@@ -56,10 +56,6 @@
297
298 g_debug("Waiting to init.");
299
300- /* Wait 1/4 a second, which should trigger the fallback */
301- g_usleep(250000);
302-
303- g_debug("Initing");
304
305 GError * error = NULL;
306 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
307@@ -69,6 +65,23 @@
308 }
309
310 DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
311+
312+ gboolean has_owner = FALSE;
313+ gint owner_count = 0;
314+ while (!has_owner && owner_count < 10000) {
315+ org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL);
316+ owner_count++;
317+ }
318+
319+ if (owner_count == 10000) {
320+ g_error("Unable to get name owner after 10000 tries");
321+ return 1;
322+ }
323+
324+ g_usleep(250000);
325+
326+ g_debug("Initing");
327+
328 guint nameret = 0;
329
330 if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) {
331
332=== modified file 'tests/test-libappindicator-status-client.c'
333--- tests/test-libappindicator-status-client.c 2010-02-06 17:41:25 +0000
334+++ tests/test-libappindicator-status-client.c 2010-02-23 16:33:20 +0000
335@@ -23,6 +23,7 @@
336
337 #include <glib.h>
338 #include <dbus/dbus-glib.h>
339+#include <dbus/dbus-glib-bindings.h>
340 #include <dbus/dbus-glib-lowlevel.h>
341 #include "../src/dbus-shared.h"
342
343@@ -37,6 +38,20 @@
344 #define ATTN_STR "NeedsAttention"
345
346 static DBusHandlerResult
347+dbus_reg_filter (DBusConnection * connection, DBusMessage * message, void * user_data)
348+{
349+ if (dbus_message_is_method_call(message, NOTIFICATION_WATCHER_DBUS_ADDR, "RegisterStatusNotifierItem")) {
350+ DBusMessage * reply = dbus_message_new_method_return(message);
351+ dbus_connection_send(connection, reply, NULL);
352+ dbus_message_unref(reply);
353+ return DBUS_HANDLER_RESULT_HANDLED;
354+ }
355+
356+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
357+}
358+
359+
360+static DBusHandlerResult
361 dbus_filter (DBusConnection * connection, DBusMessage * message, void * user_data)
362 {
363 if (!dbus_message_is_signal(message, NOTIFICATION_ITEM_DBUS_IFACE, "NewStatus")) {
364@@ -103,6 +118,21 @@
365 return 1;
366 }
367
368+ DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
369+ guint nameret = 0;
370+
371+ if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) {
372+ g_error("Unable to call to request name");
373+ return 1;
374+ }
375+
376+ if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
377+ g_error("Unable to get name");
378+ return 1;
379+ }
380+
381+ dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_reg_filter, NULL, NULL);
382+
383 dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_filter, NULL, NULL);
384 dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL);
385

Subscribers

People subscribed via source and target branches

to all changes: