From a445c4479feff1e9f7d1b9554e5c0671d0a2f957 Mon Sep 17 00:00:00 2001 From: Michal Hruby Date: Fri, 27 Jan 2012 09:12:20 +0100 Subject: Fix non-srcdir build issues --- libdbusmenu-gtk/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am index b1ee91a..fcebd04 100644 --- a/libdbusmenu-gtk/Makefile.am +++ b/libdbusmenu-gtk/Makefile.am @@ -68,7 +68,7 @@ libdbusmenu_gtk_la_CFLAGS = \ -DG_LOG_DOMAIN="\"LIBDBUSMENU-GTK\"" libdbusmenu_gtk_la_LIBADD = \ - ../libdbusmenu-glib/libdbusmenu-glib.la \ + $(top_builddir)/libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGTK_LIBS) # We duplicate these here because Automake won't let us use $(VER) on the left hand side. @@ -118,7 +118,8 @@ DbusmenuGtk_0_4_gir_INCLUDES = \ $(GTKGIR) \ Dbusmenu-0.4 DbusmenuGtk_0_4_gir_CFLAGS = $(DBUSMENUGTK_CFLAGS) -I$(top_srcdir) -DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la +DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la \ + $(top_builddir)/libdbusmenu-glib/libdbusmenu-glib.la DbusmenuGtk_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources)) DbusmenuGtk_0_4_gir_NAMESPACE = DbusmenuGtk$(VER) DbusmenuGtk_0_4_gir_EXPORT_PACKAGES = dbusmenu-gtk$(VER)-0.4 -- cgit v1.2.3 From 1edc78050399e0e88f4ef8b59f66c649e4862b89 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Tue, 31 Jan 2012 18:32:11 +1100 Subject: When parsing an existing GTK menu hierarchy, we should also set the DBUSMENU_MENU_ITEM_ACCESSIBLE_DESC property, if the accessible name for the menu differs from the text of the menu item label. --- libdbusmenu-gtk/parser.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ libdbusmenu-gtk/parser.h | 1 + 2 files changed, 54 insertions(+) diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 0ecfa1e..65a6b57 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -41,6 +41,7 @@ typedef struct _ParserData GtkWidget *widget; GtkWidget *shell; GtkWidget *image; + AtkObject *accessible; } ParserData; typedef struct _RecurseContext @@ -67,6 +68,9 @@ static void image_notify_cb (GtkWidget * widget, static void action_notify_cb (GtkAction * action, GParamSpec * pspec, gpointer data); +static void a11y_name_notify_cb (AtkObject * accessible, + GParamSpec * pspec, + gpointer data); static void item_inserted_cb (GtkContainer * menu, GtkWidget * widget, #ifdef HAVE_GTK3 @@ -200,6 +204,12 @@ parse_data_free (gpointer data) g_object_remove_weak_pointer(G_OBJECT(pdata->image), (gpointer*)&pdata->image); } + if (pdata != NULL && pdata->accessible != NULL) { + g_signal_handlers_disconnect_matched(pdata->accessible, (GSignalMatchType)G_SIGNAL_MATCH_FUNC, + 0, 0, NULL, G_CALLBACK(a11y_name_notify_cb), NULL); + g_object_remove_weak_pointer(G_OBJECT(pdata->accessible), (gpointer*)&pdata->accessible); + } + g_free(pdata); return; @@ -582,6 +592,27 @@ construct_dbusmenu_for_widget (GtkWidget * widget) mi); g_object_add_weak_pointer(G_OBJECT (label), (gpointer*)&pdata->label); + AtkObject *accessible = gtk_widget_get_accessible (widget); + if (accessible) + { + // Getting the accessible name of the Atk object retrieves the text + // of the menu item label, unless the application has set an alternate + // accessible name. + const gchar * label_text = gtk_label_get_text (GTK_LABEL (label)); + const gchar * a11y_name = atk_object_get_name (accessible); + if (g_strcmp0 (a11y_name, label_text)) + dbusmenu_menuitem_property_set (mi, "accessible-desc", a11y_name); + + // An application may set an alternate accessible name in the future, + // so we had better watch out for it. + pdata->accessible = accessible; + g_signal_connect (G_OBJECT (accessible), + "accessible-name", + G_CALLBACK (a11y_name_notify_cb), + mi); + g_object_add_weak_pointer(G_OBJECT (accessible), (gpointer*)&pdata->accessible); + } + if (GTK_IS_ACTIVATABLE (widget)) { GtkActivatable *activatable = GTK_ACTIVATABLE (widget); @@ -947,6 +978,28 @@ action_notify_cb (GtkAction *action, } } +static void +a11y_name_notify_cb (AtkObject *accessible, + GParamSpec *pspec, + gpointer data) +{ + DbusmenuMenuitem *item = (DbusmenuMenuitem *)data; + GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); + GtkWidget *label = find_menu_label (widget); + const gchar *label_text = gtk_label_get_text (GTK_LABEL (label)); + const gchar *name = atk_object_get_name (accessible); + + /* If an application sets the accessible name to NULL, then a subsequent + * call to get the accessible name from the Atk object should return the same + * string as the text of the menu item label, in which case, we want to clear + * the accessible description property of the dbusmenu item. + */ + if (!g_strcmp0 (name, label_text)) + dbusmenu_menuitem_property_set (item, "accessible-desc", NULL); + else + dbusmenu_menuitem_property_set (item, "accessible-desc", name); +} + static void item_activated (DbusmenuMenuitem *item, guint timestamp, gpointer user_data) { diff --git a/libdbusmenu-gtk/parser.h b/libdbusmenu-gtk/parser.h index 97fa9c6..191a8ac 100644 --- a/libdbusmenu-gtk/parser.h +++ b/libdbusmenu-gtk/parser.h @@ -31,6 +31,7 @@ License version 3 and version 2.1 along with this program. If not, see #include #include +#include G_BEGIN_DECLS -- cgit v1.2.3 From 03819d755f5c8380b48bca51599981e205c066f4 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Wed, 1 Feb 2012 09:51:00 +1100 Subject: Fix up monitoring of the atk object, didn't understand that notification was the same as the GTK widgets as well. --- libdbusmenu-gtk/parser.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 65a6b57..06eabba 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -607,7 +607,7 @@ construct_dbusmenu_for_widget (GtkWidget * widget) // so we had better watch out for it. pdata->accessible = accessible; g_signal_connect (G_OBJECT (accessible), - "accessible-name", + "notify", G_CALLBACK (a11y_name_notify_cb), mi); g_object_add_weak_pointer(G_OBJECT (accessible), (gpointer*)&pdata->accessible); @@ -994,10 +994,13 @@ a11y_name_notify_cb (AtkObject *accessible, * string as the text of the menu item label, in which case, we want to clear * the accessible description property of the dbusmenu item. */ - if (!g_strcmp0 (name, label_text)) - dbusmenu_menuitem_property_set (item, "accessible-desc", NULL); - else - dbusmenu_menuitem_property_set (item, "accessible-desc", name); + if (pspec->name == g_intern_static_string ("accessible-name")) + { + if (!g_strcmp0 (name, label_text)) + dbusmenu_menuitem_property_set (item, "accessible-desc", NULL); + else + dbusmenu_menuitem_property_set (item, "accessible-desc", name); + } } static void -- cgit v1.2.3 From ee5c7959fe03f1b532a6d807b00a9ea4857bbe10 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Wed, 1 Feb 2012 14:06:57 +1100 Subject: If the ACCESSIBLE_DESC property is set to NULL, set an empty string as the atk object's accessible name, as per atk docs. --- libdbusmenu-gtk/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 9888cbe..884c11e 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -747,7 +747,7 @@ menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * variant, Db } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_DISPOSITION)) { process_disposition(mi, gmi, variant, gtkclient); } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC)) { - atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)), variant == NULL ? NULL : + atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)), variant == NULL ? "" : g_variant_get_string(variant, NULL)); } -- cgit v1.2.3 From 04086d1dd99dc599cdb0843cc447bd0c31f36a2c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 3 Feb 2012 09:33:47 -0600 Subject: Make it so that critical messages cause the test suite to fail --- tests/Makefile.am | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index 532c14f..3e87480 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -135,6 +135,7 @@ glib_server_nomenu_LDADD = \ test-glib-layout: test-glib-layout-client test-glib-layout-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-layout-client --task-name Client --task ./test-glib-layout-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -168,6 +169,7 @@ test_glib_layout_client_LDADD = \ test-glib-events: test-glib-events-client test-glib-events-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-events-client --task-name Client --task ./test-glib-events-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -199,6 +201,7 @@ test_glib_events_client_LDADD = \ test-json: test-json-client test-json-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --parameter $(top_builddir)/tools/dbusmenu-dumper --parameter test-json-01.output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@ @echo diff $(srcdir)/test-json-01.json test-json-01.output.json \> /dev/null >> $@ @@ -240,6 +243,7 @@ test_json_client_LDADD = \ test-glib-submenu: test-glib-submenu-client test-glib-submenu-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-submenu-client --task-name Client --task ./test-glib-submenu-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -275,6 +279,7 @@ OBJECT_XML_REPORT = test-glib-objects.xml test-glib-objects-test: test-glib-objects Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task gtester --task-name test --parameter --verbose --parameter -k --parameter -o --parameter $(OBJECT_XML_REPORT) --parameter ./test-glib-objects >> $@ @chmod +x $@ @@ -297,6 +302,7 @@ DISTCLEANFILES += $(OBJECT_XML_REPORT) test-glib-properties: test-glib-properties-client test-glib-properties-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-properties-client --task-name Client --task ./test-glib-properties-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -330,6 +336,7 @@ test_glib_properties_client_LDADD = \ test-glib-proxy: test-glib-proxy-client test-glib-proxy-server test-glib-proxy-proxy Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-proxy-client --task-name Client --task ./test-glib-proxy-server --task-name Server --ignore-return \\ >> $@ @echo --task ./test-glib-proxy-proxy --parameter test.proxy.first_proxy --parameter test.proxy.second_proxy --task-name Proxy01 --ignore-return \\ >> $@ @echo --task ./test-glib-proxy-proxy --parameter test.proxy.second_proxy --parameter test.proxy.third_proxy --task-name Proxy02 --ignore-return \\ >> $@ @@ -399,6 +406,7 @@ GTK_OBJECT_XML_REPORT = test-gtk-objects.xml test-gtk-objects-test: test-gtk-objects Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task gtester --task-name test --parameter --verbose --parameter -k --parameter -o --parameter $(GTK_OBJECT_XML_REPORT) --parameter ./test-gtk-objects >> $@ @chmod +x $@ @@ -429,6 +437,7 @@ GTK_PARSER_XML_REPORT = test-gtk-parser.xml test-gtk-parser-test: test-gtk-parser Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo gtester --verbose -k -o $(GTK_PARSER_XML_REPORT) ./test-gtk-parser >> $@ @chmod +x $@ @@ -457,6 +466,7 @@ DISTCLEANFILES += $(GTK_PARSER_XML_REPORT) test-gtk-label: test-gtk-label-client test-gtk-label-server test-gtk-label.json Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-label-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -498,6 +508,7 @@ test_gtk_label_client_LDADD = \ test-gtk-shortcut: test-gtk-shortcut-client test-gtk-shortcut-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -538,6 +549,7 @@ test_gtk_shortcut_client_LDADD = \ test-gtk-shortcut-python: test-gtk-shortcut-server test-gtk-shortcut-client.py Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task $(srcdir)/test-gtk-shortcut-client.py --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -551,6 +563,7 @@ CLEANFILES += test-gtk-shortcut-client.pyc test-gtk-reorder: test-gtk-label-client test-gtk-reorder-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-reorder-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -576,6 +589,7 @@ test_gtk_reorder_server_LDADD = \ test-gtk-submenu: test-gtk-submenu-client test-gtk-submenu-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-gtk-submenu-client --task-name Client --task ./test-gtk-submenu-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -616,6 +630,7 @@ test_gtk_submenu_client_LDADD = \ test-mago: test-gtk-label-client test-gtk-label-server $(srcdir)/dbusmenu-gtk/mago_tests/dbusmenu.xml Makefile.am @echo "#!/bin/bash" > $@ + @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo cd $(srcdir)/dbusmenu-gtk >> $@ @echo /usr/lib/at-spi/at-spi-registryd \& >> $@ -- cgit v1.2.3 From 2b28772d5c86fc4784045c1c65325558ea6a08f3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 7 Feb 2012 10:28:51 -0600 Subject: Removing criticals for submenu test --- tests/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 3e87480..6b70d66 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -243,7 +243,10 @@ test_json_client_LDADD = \ test-glib-submenu: test-glib-submenu-client test-glib-submenu-server Makefile.am @echo "#!/bin/bash" > $@ - @echo export G_DEBUG=fatal_criticals >> $@ +# Removing the check for criticals here as there's one coming from GTK +# in the grabbing code on GTK3. Since we can't add events to the stack +# we can't remove this error from getting thrown :-( +# @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-submenu-client --task-name Client --task ./test-glib-submenu-server --task-name Server --ignore-return >> $@ @chmod +x $@ -- cgit v1.2.3 From 815d4e6515e6c17da0c130f8a4a351d7d59ebca0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 7 Feb 2012 10:29:36 -0600 Subject: Ensuring that we don't just unparent a menu item, we remove it from the list of children that it has --- libdbusmenu-gtk/parser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 0ecfa1e..ac69b2a 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -415,8 +415,11 @@ parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse) /* Oops, let's tell our parents about us */ if (peek == NULL) { - if (dbusmenu_menuitem_get_parent(thisitem) != NULL) { - dbusmenu_menuitem_unparent(thisitem); + g_object_ref(thisitem); + + DbusmenuMenuitem * parent = dbusmenu_menuitem_get_parent(thisitem); + if (parent != NULL) { + dbusmenu_menuitem_child_delete(parent, thisitem); } gint pos = get_child_position (widget); @@ -427,6 +430,8 @@ parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse) else dbusmenu_menuitem_child_append (recurse->parent, thisitem); + + g_object_unref(thisitem); } } -- cgit v1.2.3 From 00fd5940d07b27ccf3385b021145c72c2317e87b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 7 Feb 2012 10:29:57 -0600 Subject: Don't get the string to check if something is being cleared, use whether the variant is NULL or not --- libdbusmenu-gtk/client.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 9888cbe..38f2283 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -1128,12 +1128,7 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, GVariant return; } - const gchar * value = NULL; - if (variant != NULL) { - value = g_variant_get_string(variant, NULL); - } - - if (value == NULL || value[0] == '\0') { + if (variant == NULL) { /* This means that we're unsetting a value. */ /* Try to use the other one */ if (g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON_NAME)) { -- cgit v1.2.3 From 031394edac21d148926e65051149f8dc71f98b68 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 7 Feb 2012 10:31:30 -0600 Subject: Making sure there is no menu proxy in our tests --- tests/Makefile.am | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index 6b70d66..db2d469 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -135,6 +135,7 @@ glib_server_nomenu_LDADD = \ test-glib-layout: test-glib-layout-client test-glib-layout-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-layout-client --task-name Client --task ./test-glib-layout-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -169,6 +170,7 @@ test_glib_layout_client_LDADD = \ test-glib-events: test-glib-events-client test-glib-events-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-events-client --task-name Client --task ./test-glib-events-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -201,6 +203,7 @@ test_glib_events_client_LDADD = \ test-json: test-json-client test-json-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --parameter $(top_builddir)/tools/dbusmenu-dumper --parameter test-json-01.output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@ @@ -243,6 +246,7 @@ test_json_client_LDADD = \ test-glib-submenu: test-glib-submenu-client test-glib-submenu-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ # Removing the check for criticals here as there's one coming from GTK # in the grabbing code on GTK3. Since we can't add events to the stack # we can't remove this error from getting thrown :-( @@ -282,6 +286,7 @@ OBJECT_XML_REPORT = test-glib-objects.xml test-glib-objects-test: test-glib-objects Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task gtester --task-name test --parameter --verbose --parameter -k --parameter -o --parameter $(OBJECT_XML_REPORT) --parameter ./test-glib-objects >> $@ @chmod +x $@ @@ -305,6 +310,7 @@ DISTCLEANFILES += $(OBJECT_XML_REPORT) test-glib-properties: test-glib-properties-client test-glib-properties-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-properties-client --task-name Client --task ./test-glib-properties-server --task-name Server --ignore-return >> $@ @chmod +x $@ @@ -339,6 +345,7 @@ test_glib_properties_client_LDADD = \ test-glib-proxy: test-glib-proxy-client test-glib-proxy-server test-glib-proxy-proxy Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(DBUS_RUNNER) --task ./test-glib-proxy-client --task-name Client --task ./test-glib-proxy-server --task-name Server --ignore-return \\ >> $@ @echo --task ./test-glib-proxy-proxy --parameter test.proxy.first_proxy --parameter test.proxy.second_proxy --task-name Proxy01 --ignore-return \\ >> $@ @@ -409,6 +416,7 @@ GTK_OBJECT_XML_REPORT = test-gtk-objects.xml test-gtk-objects-test: test-gtk-objects Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task gtester --task-name test --parameter --verbose --parameter -k --parameter -o --parameter $(GTK_OBJECT_XML_REPORT) --parameter ./test-gtk-objects >> $@ @@ -440,6 +448,7 @@ GTK_PARSER_XML_REPORT = test-gtk-parser.xml test-gtk-parser-test: test-gtk-parser Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo gtester --verbose -k -o $(GTK_PARSER_XML_REPORT) ./test-gtk-parser >> $@ @@ -469,6 +478,7 @@ DISTCLEANFILES += $(GTK_PARSER_XML_REPORT) test-gtk-label: test-gtk-label-client test-gtk-label-server test-gtk-label.json Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-label-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ @@ -511,6 +521,7 @@ test_gtk_label_client_LDADD = \ test-gtk-shortcut: test-gtk-shortcut-client test-gtk-shortcut-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-gtk-shortcut-client --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ @@ -552,6 +563,7 @@ test_gtk_shortcut_client_LDADD = \ test-gtk-shortcut-python: test-gtk-shortcut-server test-gtk-shortcut-client.py Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task $(srcdir)/test-gtk-shortcut-client.py --task-name Client --task ./test-gtk-shortcut-server --task-name Server --ignore-return >> $@ @@ -566,6 +578,7 @@ CLEANFILES += test-gtk-shortcut-client.pyc test-gtk-reorder: test-gtk-label-client test-gtk-reorder-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-reorder-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ @@ -592,6 +605,7 @@ test_gtk_reorder_server_LDADD = \ test-gtk-submenu: test-gtk-submenu-client test-gtk-submenu-server Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo $(DBUS_RUNNER) --task ./test-gtk-submenu-client --task-name Client --task ./test-gtk-submenu-server --task-name Server --ignore-return >> $@ @@ -633,6 +647,7 @@ test_gtk_submenu_client_LDADD = \ test-mago: test-gtk-label-client test-gtk-label-server $(srcdir)/dbusmenu-gtk/mago_tests/dbusmenu.xml Makefile.am @echo "#!/bin/bash" > $@ + @echo export UBUNTU_MENUPROXY="" >> $@ @echo export G_DEBUG=fatal_criticals >> $@ @echo $(XVFB_RUN) >> $@ @echo cd $(srcdir)/dbusmenu-gtk >> $@ -- cgit v1.2.3 From 62b028c0f6cff245f8781a5a4e769be20b2afba1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 9 Feb 2012 12:44:09 -0600 Subject: Because of the change of inhash above we could have hash_variant be NULL here --- libdbusmenu-glib/menuitem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 30ae277..18db4ef 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -1222,7 +1222,7 @@ dbusmenu_menuitem_property_set_variant (DbusmenuMenuitem * mi, const gchar * pro but we're actually replacing it no matter. This is so that the variant passed in sticks around which the caller may expect. They shouldn't, but it's low cost to remove bugs. */ - if (!inhash || !g_variant_equal(hash_variant, value)) { + if (!inhash || (hash_variant != NULL && !g_variant_equal(hash_variant, value))) { replaced = TRUE; } -- cgit v1.2.3 From c3467a14ee0ff76b51d5771614153cc6810352ac Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 9 Feb 2012 12:58:29 -0600 Subject: Making it so that we ref_sink() the variants so that when we unref them later we're not in a race condition with the gdbus thread --- libdbusmenu-glib/server.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 4890d37..c992085 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -990,6 +990,7 @@ menuitem_property_idle (gpointer user_data) /* these are going to be standard references in all code paths and must be unrefed */ GVariant * megadata[2]; gboolean gotsomething = FALSE; + gboolean error_nosend = FALSE; if (item_init) { megadata[0] = g_variant_builder_end(&itembuilder); @@ -1002,6 +1003,10 @@ menuitem_property_idle (gpointer user_data) if (error != NULL) { g_warning("Unable to parse '[ ]' as a 'a(ia{sv})': %s", error->message); g_error_free(error); + megadata[0] = NULL; + error_nosend = TRUE; + } else { + g_variant_ref_sink(megadata[0]); } } @@ -1016,10 +1021,14 @@ menuitem_property_idle (gpointer user_data) if (error != NULL) { g_warning("Unable to parse '[ ]' as a 'a(ias)': %s", error->message); g_error_free(error); + megadata[1] = NULL; + error_nosend = TRUE; + } else { + g_variant_ref_sink(megadata[1]); } } - if (gotsomething && priv->dbusobject != NULL && priv->bus != NULL) { + if (gotsomething && !error_nosend && priv->dbusobject != NULL && priv->bus != NULL) { g_dbus_connection_emit_signal(priv->bus, NULL, priv->dbusobject, @@ -1029,8 +1038,13 @@ menuitem_property_idle (gpointer user_data) NULL); } - g_variant_unref(megadata[0]); - g_variant_unref(megadata[1]); + if (megadata[0] != NULL) { + g_variant_unref(megadata[0]); + } + + if (megadata[1] != NULL) { + g_variant_unref(megadata[1]); + } /* Clean everything up */ prop_array_teardown(priv->prop_array); -- cgit v1.2.3 From 29a58948a274ca3cff7da3b32ad97d47cef012c8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 9 Feb 2012 16:20:06 -0600 Subject: Ensure that we only return the invocation one way --- libdbusmenu-glib/server.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 4890d37..a9ff311 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -1595,7 +1595,6 @@ bus_event (DbusmenuServer * server, GVariant * params, GDBusMethodInvocation * i DbusmenuMenuitem * mi = dbusmenu_menuitem_find_id(priv->root, id); if (mi == NULL) { - g_dbus_method_invocation_return_error(invocation, error_quark(), INVALID_MENUITEM_ID, @@ -1605,17 +1604,17 @@ bus_event (DbusmenuServer * server, GVariant * params, GDBusMethodInvocation * i g_variant_unref(data); } else { - idle_event_t * event_data = g_new0(idle_event_t, 1); event_data->mi = g_object_ref(mi); - event_data->eventid = etype; + event_data->eventid = etype; /* give away our allocation */ event_data->timestamp = ts; event_data->variant = data; /* give away our reference */ g_timeout_add(0, event_local_handler, event_data); + + g_dbus_method_invocation_return_value(invocation, NULL); } - g_dbus_method_invocation_return_value(invocation, NULL); return; } -- cgit v1.2.3 From 637508a520e01f6b8c7822e37445cda2618087cf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Feb 2012 08:02:10 -0600 Subject: Actually checking the NULL case properly --- libdbusmenu-glib/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index a2330d1..6524f02 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -395,7 +395,7 @@ dbusmenu_client_dispose (GObject *object) /* Only used for queueing up a new command, so we can just drop this array. */ - if (priv->delayed_property_list == NULL) { + if (priv->delayed_property_list != NULL) { gchar ** dataregion = (gchar **)g_array_free(priv->delayed_property_list, FALSE); if (dataregion != NULL) { g_strfreev(dataregion); @@ -403,7 +403,7 @@ dbusmenu_client_dispose (GObject *object) priv->delayed_property_list = NULL; } - if (priv->delayed_property_listeners == NULL) { + if (priv->delayed_property_listeners != NULL) { gint i; GError * localerror = NULL; -- cgit v1.2.3 From 54a15536a0eb93f210eb2aa74272b1bfa3b4284a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Feb 2012 08:24:45 -0600 Subject: Removing useless const on dbusmenu_server_get_icon_paths() --- libdbusmenu-glib/server.c | 2 +- libdbusmenu-glib/server.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 4890d37..a409bd9 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -1809,7 +1809,7 @@ dbusmenu_server_set_status (DbusmenuServer * server, DbusmenuStatus status) * memory managed by the server. Duplicate if you want * to keep them. */ -const GStrv +GStrv dbusmenu_server_get_icon_paths (DbusmenuServer * server) { g_return_val_if_fail(DBUSMENU_IS_SERVER(server), NULL); diff --git a/libdbusmenu-glib/server.h b/libdbusmenu-glib/server.h index 5feb09b..d482a10 100644 --- a/libdbusmenu-glib/server.h +++ b/libdbusmenu-glib/server.h @@ -167,7 +167,7 @@ void dbusmenu_server_set_text_direction (DbusmenuServer * DbusmenuStatus dbusmenu_server_get_status (DbusmenuServer * server); void dbusmenu_server_set_status (DbusmenuServer * server, DbusmenuStatus status); -const GStrv dbusmenu_server_get_icon_paths (DbusmenuServer * server); +GStrv dbusmenu_server_get_icon_paths (DbusmenuServer * server); void dbusmenu_server_set_icon_paths (DbusmenuServer * server, GStrv icon_paths); -- cgit v1.2.3 From 1f23f41e8f29105abad00412ff2776775f969ac4 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Feb 2012 08:26:02 -0600 Subject: Removing useless const on dbusmenu_client_get_icon_paths() --- libdbusmenu-glib/client.c | 2 +- libdbusmenu-glib/client.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index a2330d1..ff5c51a 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -2210,7 +2210,7 @@ dbusmenu_client_get_status (DbusmenuClient * client) * memory managed by the client. Duplicate if you want * to keep them. */ -const GStrv +GStrv dbusmenu_client_get_icon_paths (DbusmenuClient * client) { g_return_val_if_fail(DBUSMENU_IS_CLIENT(client), NULL); diff --git a/libdbusmenu-glib/client.h b/libdbusmenu-glib/client.h index 1cb9ee5..d0fca32 100644 --- a/libdbusmenu-glib/client.h +++ b/libdbusmenu-glib/client.h @@ -212,7 +212,7 @@ gboolean dbusmenu_client_add_type_handler_full (DbusmenuClient * cli GDestroyNotify destroy_func); DbusmenuTextDirection dbusmenu_client_get_text_direction (DbusmenuClient * client); DbusmenuStatus dbusmenu_client_get_status (DbusmenuClient * client); -const GStrv dbusmenu_client_get_icon_paths (DbusmenuClient * client); +GStrv dbusmenu_client_get_icon_paths (DbusmenuClient * client); /** SECTION:client -- cgit v1.2.3 From 4b30d2a7628d7e9b117da392a8f93325e4aa2e38 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Feb 2012 10:16:45 -0600 Subject: Adding a detail hint on the notify signal --- libdbusmenu-gtk/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 06eabba..4fb366a 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -607,7 +607,7 @@ construct_dbusmenu_for_widget (GtkWidget * widget) // so we had better watch out for it. pdata->accessible = accessible; g_signal_connect (G_OBJECT (accessible), - "notify", + "notify::accessible-name", G_CALLBACK (a11y_name_notify_cb), mi); g_object_add_weak_pointer(G_OBJECT (accessible), (gpointer*)&pdata->accessible); -- cgit v1.2.3 From 7174e85c2dd89f6b3ae2fa5a3ba5a70d06b3ca1a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Feb 2012 10:19:20 -0600 Subject: Use the #define property name instead of a string --- libdbusmenu-gtk/parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 4fb366a..3cf09b2 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -601,7 +601,7 @@ construct_dbusmenu_for_widget (GtkWidget * widget) const gchar * label_text = gtk_label_get_text (GTK_LABEL (label)); const gchar * a11y_name = atk_object_get_name (accessible); if (g_strcmp0 (a11y_name, label_text)) - dbusmenu_menuitem_property_set (mi, "accessible-desc", a11y_name); + dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC, a11y_name); // An application may set an alternate accessible name in the future, // so we had better watch out for it. @@ -997,9 +997,9 @@ a11y_name_notify_cb (AtkObject *accessible, if (pspec->name == g_intern_static_string ("accessible-name")) { if (!g_strcmp0 (name, label_text)) - dbusmenu_menuitem_property_set (item, "accessible-desc", NULL); + dbusmenu_menuitem_property_set (item, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC, NULL); else - dbusmenu_menuitem_property_set (item, "accessible-desc", name); + dbusmenu_menuitem_property_set (item, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC, name); } } -- cgit v1.2.3 From c0f0a8f2cc4adf48ea56ea0296037c00fe6c2c5c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Feb 2012 10:22:34 -0600 Subject: Don't pass a NULL name to set_name --- libdbusmenu-gtk/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 14c71ab..71b2456 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -747,7 +747,7 @@ menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * variant, Db } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_DISPOSITION)) { process_disposition(mi, gmi, variant, gtkclient); } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC)) { - atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)), variant == NULL ? NULL : + atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)), variant == NULL ? "" : g_variant_get_string(variant, NULL)); } -- cgit v1.2.3 From 74aa7ec5b2b0854fd053f627fed224c6035147d5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Feb 2012 10:27:31 -0600 Subject: Refactor setting the ATK Object name into a function that can do all the error handling needed. --- libdbusmenu-gtk/client.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 71b2456..927f0ae 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -725,6 +725,26 @@ process_disposition (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * varian return; } +/* Process the accessible description */ +static void +process_a11y_desc (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant, DbusmenuGtkClient * gtkclient) +{ + AtkObject * aobj = gtk_widget_get_accessible(GTK_WIDGET(gmi)); + + if (aobj == NULL) { + return; + } + + const gchar * setname = NULL; + + if (variant != NULL) { + setname = g_variant_get_string(variant, NULL); + } + + atk_object_set_name(aobj, setname); + return; +} + /* Whenever we have a property change on a DbusmenuMenuitem we need to be responsive to that. */ static void @@ -747,8 +767,7 @@ menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * variant, Db } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_DISPOSITION)) { process_disposition(mi, gmi, variant, gtkclient); } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC)) { - atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)), variant == NULL ? "" : - g_variant_get_string(variant, NULL)); + process_a11y_desc(mi, gmi, variant, gtkclient); } return; @@ -894,8 +913,7 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * process_toggle_state(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE)); process_submenu(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY), client); process_disposition(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_DISPOSITION), client); - atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)), - g_variant_get_string(dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC), NULL)); + process_a11y_desc(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC), client); refresh_shortcut(client, item); /* Oh, we're a child, let's deal with that */ -- cgit v1.2.3 From 344a334ed85f1c820f641374f8d41422da74c973 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 10 Feb 2012 10:30:17 -0600 Subject: Heh, wrote the code but forgot to handle the error --- libdbusmenu-gtk/client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 927f0ae..5bf7469 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -741,6 +741,10 @@ process_a11y_desc (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant, setname = g_variant_get_string(variant, NULL); } + if (setname == NULL) { + setname = ""; + } + atk_object_set_name(aobj, setname); return; } -- cgit v1.2.3 From e091289a3ad1323b565d70411b622ecb9ffced2a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 12 Feb 2012 12:42:49 -0600 Subject: Making sure our strings come from defines to avoid typos --- libdbusmenu-gtk/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index aefbd05..efa8485 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -584,7 +584,7 @@ construct_dbusmenu_for_widget (GtkWidget * widget) // Sometimes, an app will directly find and modify the label // (like empathy), so watch the label especially for that. gchar * text = sanitize_label (GTK_LABEL (label)); - dbusmenu_menuitem_property_set (mi, "label", text); + dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_LABEL, text); g_free (text); pdata->label = label; -- cgit v1.2.3 From aef71fa6d08309a29df51d94bcb2c7713e9c04ee Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 15 Feb 2012 11:24:07 -0600 Subject: 0.5.91 --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index ce321bc..aef35a0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.5.90, ted@canonical.com) +AC_INIT(libdbusmenu, 0.5.91, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.5.90, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.5.91, [-Wno-portability]) AM_MAINTAINER_MODE @@ -165,7 +165,7 @@ AC_PATH_PROG([XSLT_PROC], [xsltproc]) ########################### LIBDBUSMENU_CURRENT=4 -LIBDBUSMENU_REVISION=7 +LIBDBUSMENU_REVISION=8 LIBDBUSMENU_AGE=0 AC_SUBST(LIBDBUSMENU_CURRENT) -- cgit v1.2.3