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
=== modified file 'configure.ac'
--- configure.ac 2010-02-11 16:19:50 +0000
+++ configure.ac 2010-02-23 16:33:20 +0000
@@ -41,10 +41,12 @@
41INDICATOR_REQUIRED_VERSION=0.3.141INDICATOR_REQUIRED_VERSION=0.3.1
42DBUSMENUGTK_REQUIRED_VERSION=0.2.242DBUSMENUGTK_REQUIRED_VERSION=0.2.2
43JSON_GLIB_REQUIRED_VERSION=0.7.643JSON_GLIB_REQUIRED_VERSION=0.7.6
44DBUS_GLIB_REQUIRED_VERSION=0.82
4445
45PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION46PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION
46 indicator >= $INDICATOR_REQUIRED_VERSION47 indicator >= $INDICATOR_REQUIRED_VERSION
47 json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION48 json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
49 dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
48 dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION)50 dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION)
4951
50AC_SUBST(INDICATOR_CFLAGS)52AC_SUBST(INDICATOR_CFLAGS)
5153
=== modified file 'debian/changelog'
--- debian/changelog 2010-02-22 16:50:42 +0000
+++ debian/changelog 2010-02-23 16:33:20 +0000
@@ -1,3 +1,11 @@
1indicator-application (0.0.13-0ubuntu8~ppa1) lucid; urgency=low
2
3 * Upstream Merge
4 * Checking for dbus-glib version 0.82
5 * debian/control: Checking for dbus-glib >= 0.82
6
7 -- Ted Gould <ted@ubuntu.com> Tue, 23 Feb 2010 10:30:27 -0600
8
1indicator-application (0.0.13-0ubuntu7) lucid; urgency=low9indicator-application (0.0.13-0ubuntu7) lucid; urgency=low
210
3 * Backported upstream change to fix menu item sensitivity update,11 * Backported upstream change to fix menu item sensitivity update,
@@ -35,6 +43,31 @@
3543
36 -- Sebastien Bacher <seb128@ubuntu.com> Tue, 16 Feb 2010 16:22:31 +010044 -- Sebastien Bacher <seb128@ubuntu.com> Tue, 16 Feb 2010 16:22:31 +0100
3745
46indicator-application (0.0.13-0ubuntu3~ppa4) lucid; urgency=low
47
48 * Upstream merge
49 * Fixing automatic updating of menus
50 * Improve testing to be more reliable
51 * Handle null string attention icons
52 * Handling the visibility of menus better
53
54 -- Ted Gould <ted@ubuntu.com> Tue, 23 Feb 2010 09:49:56 -0600
55
56indicator-application (0.0.13-0ubuntu3~ppa2) lucid; urgency=low
57
58 * Upstream Merge
59 * Fixing a crash by checking for NULL
60
61 -- Ted Gould <ted@ubuntu.com> Tue, 16 Feb 2010 10:31:30 -0600
62
63indicator-application (0.0.13-0ubuntu3~ppa1) lucid; urgency=low
64
65 * Upstream Merge
66 * Submenu support
67 * Updating menus
68
69 -- Ted Gould <ted@ubuntu.com> Tue, 16 Feb 2010 09:59:44 -0600
70
38indicator-application (0.0.13-0ubuntu2) lucid; urgency=low71indicator-application (0.0.13-0ubuntu2) lucid; urgency=low
3972
40 * Backported lp:~bratsche/indicator-application/submenus to make the submenus73 * Backported lp:~bratsche/indicator-application/submenus to make the submenus
@@ -282,3 +315,4 @@
282 * Development packaging edition.315 * Development packaging edition.
283316
284 -- Robert Collins <robert@canonical.com> Thu, 29 Oct 2009 15:44:14 +1100317 -- Robert Collins <robert@canonical.com> Thu, 29 Oct 2009 15:44:14 +1100
318
285319
=== modified file 'debian/control'
--- debian/control 2010-02-16 15:23:53 +0000
+++ debian/control 2010-02-23 16:33:20 +0000
@@ -7,7 +7,7 @@
7 cdbs (>= 0.4.41),7 cdbs (>= 0.4.41),
8 python-central (>= 0.6),8 python-central (>= 0.6),
9 libgtk2.0-dev (>= 2.12.0),9 libgtk2.0-dev (>= 2.12.0),
10 libdbus-glib-1-dev,10 libdbus-glib-1-dev (>= 0.82),
11 libjson-glib-dev,11 libjson-glib-dev,
12 gnome-doc-utils,12 gnome-doc-utils,
13 gtk-doc-tools,13 gtk-doc-tools,
1414
=== modified file 'src/libappindicator/app-indicator.c'
--- src/libappindicator/app-indicator.c 2010-02-22 16:50:42 +0000
+++ src/libappindicator/app-indicator.c 2010-02-23 16:33:20 +0000
@@ -142,6 +142,7 @@
142static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon);142static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon);
143static void watcher_proxy_destroyed (GObject * object, gpointer data);143static void watcher_proxy_destroyed (GObject * object, gpointer data);
144static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicator *indicator);144static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicator *indicator);
145static void submenu_changed (GtkWidget *widget, GtkWidget *child, gpointer data);
145146
146/* GObject type */147/* GObject type */
147G_DEFINE_TYPE (AppIndicator, app_indicator, G_TYPE_OBJECT);148G_DEFINE_TYPE (AppIndicator, app_indicator, G_TYPE_OBJECT);
@@ -1157,6 +1158,10 @@
1157 const gchar *label = NULL;1158 const gchar *label = NULL;
1158 gboolean label_set = FALSE;1159 gboolean label_set = FALSE;
11591160
1161 if (GTK_IS_TEAROFF_MENU_ITEM(widget)) {
1162 return;
1163 }
1164
1160 child = dbusmenu_menuitem_new ();1165 child = dbusmenu_menuitem_new ();
11611166
1162 if (GTK_IS_SEPARATOR_MENU_ITEM (widget))1167 if (GTK_IS_SEPARATOR_MENU_ITEM (widget))
@@ -1239,15 +1244,28 @@
1239 submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget));1244 submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget));
1240 if (submenu != NULL)1245 if (submenu != NULL)
1241 {1246 {
1242 gtk_container_forall (GTK_CONTAINER (submenu),1247 gtk_container_foreach (GTK_CONTAINER (submenu),
1243 container_iterate,1248 container_iterate,
1244 child);1249 child);
1250 g_signal_connect_object (submenu,
1251 "add",
1252 G_CALLBACK (submenu_changed),
1253 child,
1254 0);
1255 g_signal_connect_object (submenu,
1256 "remove",
1257 G_CALLBACK (submenu_changed),
1258 child,
1259 0);
1245 }1260 }
1246 }1261 }
12471262
1248 dbusmenu_menuitem_property_set_bool (child,1263 dbusmenu_menuitem_property_set_bool (child,
1249 DBUSMENU_MENUITEM_PROP_ENABLED,1264 DBUSMENU_MENUITEM_PROP_ENABLED,
1250 GTK_WIDGET_IS_SENSITIVE (widget));1265 GTK_WIDGET_IS_SENSITIVE (widget));
1266 dbusmenu_menuitem_property_set_bool (child,
1267 DBUSMENU_MENUITEM_PROP_VISIBLE,
1268 gtk_widget_get_visible (widget));
12511269
1252 g_signal_connect (widget, "notify",1270 g_signal_connect (widget, "notify",
1253 G_CALLBACK (widget_notify_cb), child);1271 G_CALLBACK (widget_notify_cb), child);
@@ -1259,6 +1277,27 @@
1259}1277}
12601278
1261static void1279static void
1280submenu_changed (GtkWidget *widget,
1281 GtkWidget *child,
1282 gpointer data)
1283{
1284 DbusmenuMenuitem *root = (DbusmenuMenuitem *)data;
1285 GList *children, *l;
1286 children = dbusmenu_menuitem_get_children (root);
1287
1288 for (l = children; l;)
1289 {
1290 DbusmenuMenuitem *c = (DbusmenuMenuitem *)l->data;
1291 l = l->next;
1292 dbusmenu_menuitem_child_delete (root, c);
1293 }
1294
1295 gtk_container_foreach (GTK_CONTAINER (widget),
1296 container_iterate,
1297 root);
1298}
1299
1300static void
1262setup_dbusmenu (AppIndicator *self)1301setup_dbusmenu (AppIndicator *self)
1263{1302{
1264 AppIndicatorPrivate *priv;1303 AppIndicatorPrivate *priv;
@@ -1267,9 +1306,12 @@
1267 priv = self->priv;1306 priv = self->priv;
1268 root = dbusmenu_menuitem_new ();1307 root = dbusmenu_menuitem_new ();
12691308
1270 gtk_container_forall (GTK_CONTAINER (priv->menu),1309 if (priv->menu)
1271 container_iterate,1310 {
1272 root);1311 gtk_container_foreach (GTK_CONTAINER (priv->menu),
1312 container_iterate,
1313 root);
1314 }
12731315
1274 if (priv->menuservice == NULL)1316 if (priv->menuservice == NULL)
1275 {1317 {
12761318
=== modified file 'tests/test-libappindicator-dbus-client.c'
--- tests/test-libappindicator-dbus-client.c 2010-02-10 16:37:53 +0000
+++ tests/test-libappindicator-dbus-client.c 2010-02-23 16:33:20 +0000
@@ -23,9 +23,13 @@
2323
24#include <glib.h>24#include <glib.h>
25#include <dbus/dbus-glib.h>25#include <dbus/dbus-glib.h>
26#include <dbus/dbus-glib-bindings.h>
27#include <dbus/dbus-glib-lowlevel.h>
26#include <libappindicator/app-indicator.h>28#include <libappindicator/app-indicator.h>
27#include "test-defines.h"29#include "test-defines.h"
2830
31#include "../src/dbus-shared.h"
32
29static GMainLoop * mainloop = NULL;33static GMainLoop * mainloop = NULL;
30static gboolean passed = TRUE;34static gboolean passed = TRUE;
31static int propcount = 0;35static int propcount = 0;
@@ -184,6 +188,19 @@
184 return FALSE;188 return FALSE;
185}189}
186190
191static DBusHandlerResult
192dbus_filter (DBusConnection * connection, DBusMessage * message, void * user_data)
193{
194 if (dbus_message_is_method_call(message, NOTIFICATION_WATCHER_DBUS_ADDR, "RegisterStatusNotifierItem")) {
195 DBusMessage * reply = dbus_message_new_method_return(message);
196 dbus_connection_send(connection, reply, NULL);
197 dbus_message_unref(reply);
198 return DBUS_HANDLER_RESULT_HANDLED;
199 }
200
201 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
202}
203
187gint204gint
188main (gint argc, gchar * argv[])205main (gint argc, gchar * argv[])
189{206{
@@ -198,6 +215,21 @@
198 return 1;215 return 1;
199 }216 }
200217
218 DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
219 guint nameret = 0;
220
221 if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) {
222 g_error("Unable to call to request name");
223 return 1;
224 }
225
226 if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
227 g_error("Unable to get name");
228 return 1;
229 }
230
231 dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_filter, NULL, NULL);
232
201 DBusGProxy * props = dbus_g_proxy_new_for_name_owner(session_bus,233 DBusGProxy * props = dbus_g_proxy_new_for_name_owner(session_bus,
202 ":1.0",234 ":1.0",
203 "/org/ayatana/NotificationItem/my_id",235 "/org/ayatana/NotificationItem/my_id",
204236
=== modified file 'tests/test-libappindicator-dbus-server.c'
--- tests/test-libappindicator-dbus-server.c 2010-02-10 16:37:53 +0000
+++ tests/test-libappindicator-dbus-server.c 2010-02-23 16:33:20 +0000
@@ -44,6 +44,7 @@
44 g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));44 g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
4545
46 AppIndicator * ci = app_indicator_new (TEST_ID, TEST_ICON_NAME, TEST_CATEGORY);46 AppIndicator * ci = app_indicator_new (TEST_ID, TEST_ICON_NAME, TEST_CATEGORY);
47
47 app_indicator_set_status (ci, TEST_STATE);48 app_indicator_set_status (ci, TEST_STATE);
48 app_indicator_set_attention_icon (ci, TEST_ATTENTION_ICON_NAME);49 app_indicator_set_attention_icon (ci, TEST_ATTENTION_ICON_NAME);
4950
5051
=== modified file 'tests/test-libappindicator-fallback-item.c'
--- tests/test-libappindicator-fallback-item.c 2010-01-27 16:37:51 +0000
+++ tests/test-libappindicator-fallback-item.c 2010-02-23 16:33:20 +0000
@@ -1,5 +1,7 @@
1#include <glib.h>1#include <glib.h>
2#include <glib-object.h>2#include <glib-object.h>
3#include <dbus/dbus-glib.h>
4#include <dbus/dbus-glib-bindings.h>
3#include <libappindicator/app-indicator.h>5#include <libappindicator/app-indicator.h>
46
5#define TEST_LIBAPPINDICATOR_FALLBACK_ITEM_TYPE (test_libappindicator_fallback_item_get_type ())7#define TEST_LIBAPPINDICATOR_FALLBACK_ITEM_TYPE (test_libappindicator_fallback_item_get_type ())
@@ -106,6 +108,27 @@
106{108{
107 gtk_init(&argc, &argv);109 gtk_init(&argc, &argv);
108110
111 GError * error = NULL;
112 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
113 if (error != NULL) {
114 g_error("Unable to get session bus: %s", error->message);
115 return 1;
116 }
117
118 DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
119
120 guint nameret = 0;
121
122 if (!org_freedesktop_DBus_request_name(bus_proxy, "org.test", 0, &nameret, NULL)) {
123 g_error("Unable to call to request name");
124 return 1;
125 }
126
127 if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
128 g_error("Unable to get name");
129 return 1;
130 }
131
109 TestLibappindicatorFallbackItem * item = g_object_new(TEST_LIBAPPINDICATOR_FALLBACK_ITEM_TYPE,132 TestLibappindicatorFallbackItem * item = g_object_new(TEST_LIBAPPINDICATOR_FALLBACK_ITEM_TYPE,
110 "id", "test-id",133 "id", "test-id",
111 "category", "Other",134 "category", "Other",
112135
=== modified file 'tests/test-libappindicator-fallback-watcher.c'
--- tests/test-libappindicator-fallback-watcher.c 2010-01-12 22:36:26 +0000
+++ tests/test-libappindicator-fallback-watcher.c 2010-02-23 16:33:20 +0000
@@ -56,10 +56,6 @@
5656
57 g_debug("Waiting to init.");57 g_debug("Waiting to init.");
5858
59 /* Wait 1/4 a second, which should trigger the fallback */
60 g_usleep(250000);
61
62 g_debug("Initing");
6359
64 GError * error = NULL;60 GError * error = NULL;
65 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);61 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
@@ -69,6 +65,23 @@
69 }65 }
7066
71 DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);67 DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
68
69 gboolean has_owner = FALSE;
70 gint owner_count = 0;
71 while (!has_owner && owner_count < 10000) {
72 org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL);
73 owner_count++;
74 }
75
76 if (owner_count == 10000) {
77 g_error("Unable to get name owner after 10000 tries");
78 return 1;
79 }
80
81 g_usleep(250000);
82
83 g_debug("Initing");
84
72 guint nameret = 0;85 guint nameret = 0;
7386
74 if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) {87 if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) {
7588
=== modified file 'tests/test-libappindicator-status-client.c'
--- tests/test-libappindicator-status-client.c 2010-02-06 17:41:25 +0000
+++ tests/test-libappindicator-status-client.c 2010-02-23 16:33:20 +0000
@@ -23,6 +23,7 @@
2323
24#include <glib.h>24#include <glib.h>
25#include <dbus/dbus-glib.h>25#include <dbus/dbus-glib.h>
26#include <dbus/dbus-glib-bindings.h>
26#include <dbus/dbus-glib-lowlevel.h>27#include <dbus/dbus-glib-lowlevel.h>
27#include "../src/dbus-shared.h"28#include "../src/dbus-shared.h"
2829
@@ -37,6 +38,20 @@
37#define ATTN_STR "NeedsAttention"38#define ATTN_STR "NeedsAttention"
3839
39static DBusHandlerResult40static DBusHandlerResult
41dbus_reg_filter (DBusConnection * connection, DBusMessage * message, void * user_data)
42{
43 if (dbus_message_is_method_call(message, NOTIFICATION_WATCHER_DBUS_ADDR, "RegisterStatusNotifierItem")) {
44 DBusMessage * reply = dbus_message_new_method_return(message);
45 dbus_connection_send(connection, reply, NULL);
46 dbus_message_unref(reply);
47 return DBUS_HANDLER_RESULT_HANDLED;
48 }
49
50 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
51}
52
53
54static DBusHandlerResult
40dbus_filter (DBusConnection * connection, DBusMessage * message, void * user_data)55dbus_filter (DBusConnection * connection, DBusMessage * message, void * user_data)
41{56{
42 if (!dbus_message_is_signal(message, NOTIFICATION_ITEM_DBUS_IFACE, "NewStatus")) {57 if (!dbus_message_is_signal(message, NOTIFICATION_ITEM_DBUS_IFACE, "NewStatus")) {
@@ -103,6 +118,21 @@
103 return 1;118 return 1;
104 }119 }
105120
121 DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
122 guint nameret = 0;
123
124 if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) {
125 g_error("Unable to call to request name");
126 return 1;
127 }
128
129 if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
130 g_error("Unable to get name");
131 return 1;
132 }
133
134 dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_reg_filter, NULL, NULL);
135
106 dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_filter, NULL, NULL);136 dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_filter, NULL, NULL);
107 dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL);137 dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL);
108138

Subscribers

People subscribed via source and target branches

to all changes: