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