From 7fbfd4e5ecb550ebe49ccd366bd268868ae682d0 Mon Sep 17 00:00:00 2001 From: Chris Coulson Date: Tue, 28 Jun 2011 17:40:16 +0100 Subject: When there are no removed properties in ItemsPropertiesUpdated, ensure the arguments have the correct signature so that they aren't rejected by the client (LP: #799878) --- libdbusmenu-glib/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index f81b3ed..c7057df 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -976,10 +976,10 @@ menuitem_property_idle (gpointer user_data) gotsomething = TRUE; } else { GError * error = NULL; - megadata[1] = g_variant_parse(G_VARIANT_TYPE("a(ia(s))"), "[ ]", NULL, NULL, &error); + megadata[1] = g_variant_parse(G_VARIANT_TYPE("a(ias)"), "[ ]", NULL, NULL, &error); if (error != NULL) { - g_warning("Unable to parse '[ ]' as a 'a(ia(s))': %s", error->message); + g_warning("Unable to parse '[ ]' as a 'a(ias)': %s", error->message); g_error_free(error); } } -- cgit v1.2.3 From 19995f4cf53da3615e55e8e0d4850654ac23e167 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 24 Aug 2011 16:02:12 -0500 Subject: Making the capturing of colors from the theme GTK3 specific (it is) so that GTK2 can build --- libdbusmenu-gtk/genericmenuitem.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c index 1d2f958..7f837ee 100644 --- a/libdbusmenu-gtk/genericmenuitem.c +++ b/libdbusmenu-gtk/genericmenuitem.c @@ -178,7 +178,7 @@ get_hpadding (GtkWidget * widget) /* Get the value to put in the span for the disposition */ static gchar * -get_text_color (GenericmenuitemDisposition disposition, GtkStyleContext * context) +get_text_color (GenericmenuitemDisposition disposition, GtkWidget * widget) { struct {const gchar * color_name; const gchar * default_color;} values[] = { /* NORMAL */ { NULL, NULL}, @@ -187,11 +187,14 @@ get_text_color (GenericmenuitemDisposition disposition, GtkStyleContext * contex /* ALERT */ { "error-color", "red"} }; +#if GTK_CHECK_VERSION(3, 0, 0) + GtkStyleContext * context = gtk_widget_get_style_context(widget); GdkRGBA color; if (gtk_style_context_lookup_color(context, values[disposition].color_name, &color)) { return g_strdup_printf("rgb(%d, %d, %d)", (gint)(color.red * 255), (gint)(color.green * 255), (gint)(color.blue * 255)); } +#endif return g_strdup(values[disposition].default_color); } @@ -212,7 +215,7 @@ set_label (GtkMenuItem * menu_item, const gchar * in_label) case GENERICMENUITEM_DISPOSITION_INFORMATIONAL: case GENERICMENUITEM_DISPOSITION_WARNING: case GENERICMENUITEM_DISPOSITION_ALERT: { - gchar * color = get_text_color(GENERICMENUITEM(menu_item)->priv->disposition, gtk_widget_get_style_context(GTK_WIDGET(menu_item))); + gchar * color = get_text_color(GENERICMENUITEM(menu_item)->priv->disposition, GTK_WIDGET(menu_item)); local_label = g_markup_printf_escaped("%s", color, in_label); g_free(color); break; -- cgit v1.2.3 From 1b6d024b08c45697093d0805c216fe1c66efb5ba Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 24 Aug 2011 16:08:23 -0500 Subject: 0.4.92 --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e0e9fc9..4befb86 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.4.91, ted@canonical.com) +AC_INIT(libdbusmenu, 0.4.92, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.4.91, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.4.92, [-Wno-portability]) AM_MAINTAINER_MODE @@ -134,7 +134,7 @@ AC_PATH_PROG([XSLT_PROC], [xsltproc]) ########################### LIBDBUSMENU_CURRENT=4 -LIBDBUSMENU_REVISION=1 +LIBDBUSMENU_REVISION=2 LIBDBUSMENU_AGE=0 AC_SUBST(LIBDBUSMENU_CURRENT) -- cgit v1.2.3