aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
-rw-r--r--docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt3
-rw-r--r--libdbusmenu-gtk/Makefile.am5
-rw-r--r--libdbusmenu-gtk/client.c5
-rw-r--r--libdbusmenu-gtk/parser.c2
-rw-r--r--libdbusmenu-gtk/parser.h1
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/json-loader.c23
-rw-r--r--tests/test-glib-proxy-client.c1
9 files changed, 33 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 5ed709d..ce321bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
-AC_INIT(libdbusmenu, 0.5.1, ted@canonical.com)
+AC_INIT(libdbusmenu, 0.5.90, ted@canonical.com)
AC_COPYRIGHT([Copyright 2009,2010 Canonical])
AC_PREREQ(2.62)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libdbusmenu, 0.5.1, [-Wno-portability])
+AM_INIT_AUTOMAKE(libdbusmenu, 0.5.90, [-Wno-portability])
AM_MAINTAINER_MODE
@@ -165,7 +165,7 @@ AC_PATH_PROG([XSLT_PROC], [xsltproc])
###########################
LIBDBUSMENU_CURRENT=4
-LIBDBUSMENU_REVISION=6
+LIBDBUSMENU_REVISION=7
LIBDBUSMENU_AGE=0
AC_SUBST(LIBDBUSMENU_CURRENT)
diff --git a/docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt b/docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt
index d95ec4c..7f11278 100644
--- a/docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt
+++ b/docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt
@@ -60,6 +60,7 @@ DBUSMENU_MENUITEM_PROP_TOGGLE_STATE
DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY
DBUSMENU_MENUITEM_PROP_SHORTCUT
DBUSMENU_MENUITEM_PROP_DISPOSITION
+DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC
DBUSMENU_MENUITEM_TOGGLE_CHECK
DBUSMENU_MENUITEM_TOGGLE_RADIO
DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED
@@ -98,10 +99,12 @@ dbusmenu_menuitem_child_find
dbusmenu_menuitem_find_id
dbusmenu_menuitem_property_set
dbusmenu_menuitem_property_set_bool
+dbusmenu_menuitem_property_set_byte_array
dbusmenu_menuitem_property_set_int
dbusmenu_menuitem_property_set_variant
dbusmenu_menuitem_property_get
dbusmenu_menuitem_property_get_bool
+dbusmenu_menuitem_property_get_byte_array
dbusmenu_menuitem_property_get_int
dbusmenu_menuitem_property_get_variant
dbusmenu_menuitem_property_exist
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
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 5bf7469..30ded29 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -920,6 +920,11 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem *
process_a11y_desc(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC), client);
refresh_shortcut(client, item);
+ const gchar * a11y_desc = dbusmenu_menuitem_property_get(item, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC);
+ if (a11y_desc != NULL) {
+ atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)), a11y_desc);
+ }
+
/* Oh, we're a child, let's deal with that */
if (parent != NULL) {
new_child(parent, item, dbusmenu_menuitem_get_position(item, parent), DBUSMENU_GTKCLIENT(client));
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c
index 3cf09b2..aefbd05 100644
--- a/libdbusmenu-gtk/parser.c
+++ b/libdbusmenu-gtk/parser.c
@@ -26,6 +26,8 @@ License version 3 and version 2.1 along with this program. If not, see
<http://www.gnu.org/licenses/>
*/
+#include <atk/atk.h>
+
#include "parser.h"
#include "menuitem.h"
#include "client.h"
diff --git a/libdbusmenu-gtk/parser.h b/libdbusmenu-gtk/parser.h
index 191a8ac..97fa9c6 100644
--- a/libdbusmenu-gtk/parser.h
+++ b/libdbusmenu-gtk/parser.h
@@ -31,7 +31,6 @@ License version 3 and version 2.1 along with this program. If not, see
#include <libdbusmenu-glib/menuitem.h>
#include <gtk/gtk.h>
-#include <atk/atk.h>
G_BEGIN_DECLS
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a227916..532c14f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,5 @@
-DBUS_RUNNER=dbus-test-runner
+DBUS_RUNNER=dbus-test-runner --max-wait=0
CLEANFILES=
DISTCLEANFILES=
diff --git a/tests/json-loader.c b/tests/json-loader.c
index 36157dc..7f0ec8e 100644
--- a/tests/json-loader.c
+++ b/tests/json-loader.c
@@ -21,13 +21,13 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "json-loader.h"
-static GVariant * node2variant (JsonNode * node);
+static GVariant * node2variant (JsonNode * node, const gchar * name);
static void
array_foreach (JsonArray * array, guint index, JsonNode * node, gpointer user_data)
{
GVariantBuilder * builder = (GVariantBuilder *)user_data;
- GVariant * variant = node2variant(node);
+ GVariant * variant = node2variant(node, NULL);
if (variant != NULL) {
g_variant_builder_add_value(builder, variant);
}
@@ -38,7 +38,7 @@ static void
object_foreach (JsonObject * array, const gchar * member, JsonNode * node, gpointer user_data)
{
GVariantBuilder * builder = (GVariantBuilder *)user_data;
- GVariant * variant = node2variant(node);
+ GVariant * variant = node2variant(node, member);
if (variant != NULL) {
g_variant_builder_add(builder, "{sv}", member, variant);
}
@@ -46,7 +46,7 @@ object_foreach (JsonObject * array, const gchar * member, JsonNode * node, gpoin
}
static GVariant *
-node2variant (JsonNode * node)
+node2variant (JsonNode * node, const gchar * name)
{
if (node == NULL) {
return NULL;
@@ -62,8 +62,17 @@ node2variant (JsonNode * node)
return g_variant_new_double(json_node_get_double(node));
case G_TYPE_BOOLEAN:
return g_variant_new_boolean(json_node_get_boolean(node));
- case G_TYPE_STRING:
- return g_variant_new_string(json_node_get_string(node));
+ case G_TYPE_STRING: {
+ if (g_strcmp0(name, DBUSMENU_MENUITEM_PROP_ICON_DATA) != 0) {
+ return g_variant_new_string(json_node_get_string(node));
+ } else {
+ gsize length;
+ guchar * b64 = g_base64_decode(json_node_get_string(node), &length);
+ GVariant * retval = g_variant_new_fixed_array(G_VARIANT_TYPE_BYTE, b64, length, sizeof(guchar));
+ g_free(b64);
+ return retval;
+ }
+ }
default:
g_assert_not_reached();
}
@@ -105,7 +114,7 @@ set_props (DbusmenuMenuitem * mi, JsonObject * node)
if (!g_strcmp0(member, "submenu")) { continue; }
JsonNode * lnode = json_object_get_member(node, member);
- GVariant * variant = node2variant(lnode);
+ GVariant * variant = node2variant(lnode, member);
if (variant != NULL) {
dbusmenu_menuitem_property_set_variant(mi, member, variant);
diff --git a/tests/test-glib-proxy-client.c b/tests/test-glib-proxy-client.c
index 2e1e2d2..d20c27c 100644
--- a/tests/test-glib-proxy-client.c
+++ b/tests/test-glib-proxy-client.c
@@ -152,7 +152,6 @@ layout_verify_timer (gpointer data)
GVariant * value = g_variant_new("i", 0);
dbusmenu_menuitem_handle_event(menuroot, "clicked", value, layouton);
- g_variant_unref(value);
return FALSE;
}