aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-11 15:41:37 -0600
committerTed Gould <ted@gould.cx>2010-03-11 15:41:37 -0600
commit9f09be2857cc9f231c091571ff88998de96e2a76 (patch)
treebf9a16309a70dbaa5412244b8c9cc3b09eb9b4c4
parenta503e71342f8dc7bc11e80564ffb7ac8e68a1846 (diff)
parent6b6a72dc7a143cec7280bd779ca04110cd7ea851 (diff)
downloadayatana-indicator-application-9f09be2857cc9f231c091571ff88998de96e2a76.tar.gz
ayatana-indicator-application-9f09be2857cc9f231c091571ff88998de96e2a76.tar.bz2
ayatana-indicator-application-9f09be2857cc9f231c091571ff88998de96e2a76.zip
Using the new image loader utilities in libindicator
-rw-r--r--configure.ac2
-rw-r--r--src/indicator-application.c20
2 files changed, 4 insertions, 18 deletions
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
diff --git a/src/indicator-application.c b/src/indicator-application.c
index d89874e..b681a24 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -35,6 +35,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libindicator/indicator.h>
#include <libindicator/indicator-object.h>
#include <libindicator/indicator-service-manager.h>
+#include <libindicator/indicator-image-helper.h>
/* Local Stuff */
#include "dbus-shared.h"
@@ -89,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))
@@ -146,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;
}
@@ -452,11 +448,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;
@@ -534,13 +526,7 @@ 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);
- }
+ indicator_image_helper_update(app->entry.image, longname);
g_free(longname);
return;