From 27a7bb9a2b8518f2ff02e14fac1aaabca4aafaf5 Mon Sep 17 00:00:00 2001 From: Jan Arne Petersen Date: Mon, 8 Mar 2010 13:53:17 +0100 Subject: Listen also to label changes on actions related to menu items to workaround a gtk+ bug. --- src/libappindicator/app-indicator.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c index ef9f5c0..5edc9fe 100644 --- a/src/libappindicator/app-indicator.c +++ b/src/libappindicator/app-indicator.c @@ -1159,6 +1159,21 @@ widget_notify_cb (GtkWidget *widget, } } +static void +action_notify_cb (GtkAction *action, + GParamSpec *pspec, + gpointer data) +{ + DbusmenuMenuitem *child = (DbusmenuMenuitem *)data; + + if (pspec->name == g_intern_static_string ("label")) + { + dbusmenu_menuitem_property_set (child, + DBUSMENU_MENUITEM_PROP_LABEL, + gtk_action_get_label (action)); + } +} + static void container_iterate (GtkWidget *widget, gpointer data) @@ -1281,6 +1296,24 @@ container_iterate (GtkWidget *widget, g_signal_connect (widget, "notify", G_CALLBACK (widget_notify_cb), child); + if (GTK_IS_ACTIVATABLE (widget)) + { + GtkActivatable *activatable = GTK_ACTIVATABLE (widget); + + if (gtk_activatable_get_use_action_appearance (activatable)) + { + GtkAction *action = gtk_activatable_get_related_action (activatable); + + if (action) + { + g_signal_connect_object (action, "notify", + G_CALLBACK (action_notify_cb), + child, + G_CONNECT_AFTER); + } + } + } + g_signal_connect (G_OBJECT (child), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_menuitem), widget); -- cgit v1.2.3 From 249bcd9577a8cb9c1ab2a17662037abeb2e38619 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 10 Mar 2010 17:14:04 -0600 Subject: Switching to using the libindicator image helper --- src/indicator-application.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/indicator-application.c b/src/indicator-application.c index d89874e..dd3d0ad 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -35,6 +35,7 @@ with this program. If not, see . #include #include #include +#include /* Local Stuff */ #include "dbus-shared.h" @@ -452,11 +453,7 @@ application_added (DBusGProxy * proxy, const gchar * iconname, gint position, co icon is available we want to use it. Otherwise we'll just use the name we were given. */ gchar * longname = g_strdup_printf("%s-%s", iconname, PANEL_ICON_SUFFIX); - if (gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), longname)) { - app->entry.image = GTK_IMAGE(gtk_image_new_from_icon_name(longname, DESIGN_TEAM_SIZE)); - } else { - app->entry.image = GTK_IMAGE(gtk_image_new_from_icon_name(iconname, DESIGN_TEAM_SIZE)); - } + app->entry.image = indicator_image_helper(longname); g_free(longname); app->entry.label = NULL; -- cgit v1.2.3 From e7852842c50a30da42b6da0b415fe84946931cd0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 10 Mar 2010 22:40:30 -0600 Subject: Also using the helper when changing icons. --- src/indicator-application.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/indicator-application.c b/src/indicator-application.c index dd3d0ad..5243e8f 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -531,14 +531,10 @@ application_icon_changed (DBusGProxy * proxy, gint position, const gchar * iconn icon is available we want to use it. Otherwise we'll just use the name we were given. */ gchar * longname = g_strdup_printf("%s-%s", iconname, PANEL_ICON_SUFFIX); - if (gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), longname)) { - g_debug("Setting icon on %d to %s", position, longname); - gtk_image_set_from_icon_name(app->entry.image, longname, DESIGN_TEAM_SIZE); - } else { - g_debug("Setting icon on %d to %s", position, iconname); - gtk_image_set_from_icon_name(app->entry.image, iconname, DESIGN_TEAM_SIZE); - } + GtkImage * tempimage = indicator_image_helper(longname); g_free(longname); + gtk_image_set_from_pixbuf(app->entry.image, gtk_image_get_pixbuf(tempimage)); + g_object_ref_sink(tempimage); return; } -- cgit v1.2.3 From c9b8c0aef6f5edf98b1b42b42da7f88cce70a7f4 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 10 Mar 2010 22:41:04 -0600 Subject: Removing design team size --- src/indicator-application.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/indicator-application.c b/src/indicator-application.c index 5243e8f..8fb553b 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -90,9 +90,6 @@ struct _ApplicationEntry { gchar * dbusaddress; }; -#define DESIGN_TEAM_SIZE design_team_size -static GtkIconSize design_team_size; - #define INDICATOR_APPLICATION_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_APPLICATION_TYPE, IndicatorApplicationPrivate)) @@ -147,8 +144,6 @@ indicator_application_class_init (IndicatorApplicationClass *klass) G_TYPE_STRING, G_TYPE_INVALID); - design_team_size = gtk_icon_size_register("design-team-size", 22, 22); - return; } -- cgit v1.2.3 From b3f9c444feb4b394bda3802c8fe15ea0578f509b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 11 Mar 2010 15:35:20 -0600 Subject: Upping libindicator required version to 0.3.5 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bf404e1..2365f4e 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,7 @@ AC_CONFIG_MACRO_DIR(m4) ########################### GTK_REQUIRED_VERSION=2.12 -INDICATOR_REQUIRED_VERSION=0.3.1 +INDICATOR_REQUIRED_VERSION=0.3.5 DBUSMENUGTK_REQUIRED_VERSION=0.2.2 JSON_GLIB_REQUIRED_VERSION=0.7.6 DBUS_GLIB_REQUIRED_VERSION=0.82 -- cgit v1.2.3 From 6b6a72dc7a143cec7280bd779ca04110cd7ea851 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 11 Mar 2010 15:37:53 -0600 Subject: Switching to use the update function. --- src/indicator-application.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/indicator-application.c b/src/indicator-application.c index 8fb553b..b681a24 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -526,10 +526,8 @@ application_icon_changed (DBusGProxy * proxy, gint position, const gchar * iconn icon is available we want to use it. Otherwise we'll just use the name we were given. */ gchar * longname = g_strdup_printf("%s-%s", iconname, PANEL_ICON_SUFFIX); - GtkImage * tempimage = indicator_image_helper(longname); + indicator_image_helper_update(app->entry.image, longname); g_free(longname); - gtk_image_set_from_pixbuf(app->entry.image, gtk_image_get_pixbuf(tempimage)); - g_object_ref_sink(tempimage); return; } -- cgit v1.2.3 From 1720ce3e9f6d881686efc57088fc2cdd111dc671 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 11 Mar 2010 16:13:48 -0600 Subject: Adding a two second wait to make seting up Xvfb more reliable. This is similar to xvfb-run. --- tests/run-xvfb.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/run-xvfb.sh b/tests/run-xvfb.sh index 3622dbf..35737c2 100644 --- a/tests/run-xvfb.sh +++ b/tests/run-xvfb.sh @@ -4,4 +4,5 @@ XID=`for id in 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 3 { Xvfb -ac -noreset -screen 0 800x600x16 :$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & trap "kill -15 $! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } DISPLAY=:$XID export DISPLAY +sleep 2 fi -- cgit v1.2.3 From bf1f1526eb6d0c220dba945d42ab72c6f6a1d636 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 11 Mar 2010 16:15:07 -0600 Subject: 0.0.16 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2365f4e..f260512 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(indicator-application, 0.0.15, ted@canonical.com) +AC_INIT(indicator-application, 0.0.16, ted@canonical.com) AC_COPYRIGHT([Copyright 2009, 2010 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-application, 0.0.15) +AM_INIT_AUTOMAKE(indicator-application, 0.0.16) AM_MAINTAINER_MODE -- cgit v1.2.3 From 079ae0377eed08ee2e521011b6258c8c7650ed4d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 11 Mar 2010 16:19:37 -0600 Subject: debian/control: Increasing the libindicator-dev dependency to 0.3.5 to match upstream. --- debian/changelog | 2 ++ debian/control | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 581733c..2a64030 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ indicator-application (0.0.16-0ubuntu1~ppa1) UNRELEASED; urgency=low * Use libindicator icon loading helper * Workaround for label changes on GtkActions * Testing fix for using xvfb + * debian/control: Increasing the libindicator-dev dependency to + 0.3.5 to match upstream. -- Ted Gould Thu, 11 Mar 2010 16:17:51 -0600 diff --git a/debian/control b/debian/control index 68893c8..8b1e17f 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 5.0), python-gtk2-dev, libindicate-dev (>= 0.2.0), libindicate-gtk-dev (>= 0.2.0), - libindicator-dev (>= 0.3.1), + libindicator-dev (>= 0.3.5), libdbusmenu-gtk-dev (>= 0.2.2), libdbusmenu-glib-dev (>= 0.2.2), cli-common-dev (>= 0.5.7), -- cgit v1.2.3 From 0be5c8bcef961b60a8748ebdc63adc9a98cb8aef Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 11 Mar 2010 16:22:08 -0600 Subject: releasing version 0.0.16-0ubuntu1~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2a64030..108153d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -indicator-application (0.0.16-0ubuntu1~ppa1) UNRELEASED; urgency=low +indicator-application (0.0.16-0ubuntu1~ppa1) lucid; urgency=low * Upstream release 0.0.16 * Use libindicator icon loading helper @@ -7,7 +7,7 @@ indicator-application (0.0.16-0ubuntu1~ppa1) UNRELEASED; urgency=low * debian/control: Increasing the libindicator-dev dependency to 0.3.5 to match upstream. - -- Ted Gould Thu, 11 Mar 2010 16:17:51 -0600 + -- Ted Gould Thu, 11 Mar 2010 16:22:06 -0600 indicator-application (0.0.15-0ubuntu1) lucid; urgency=low -- cgit v1.2.3