aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKrzysztof Klimonda <kklimonda@syntaxhighlighted.com>2010-03-22 17:41:35 +0100
committerKrzysztof Klimonda <kklimonda@syntaxhighlighted.com>2010-03-22 17:41:35 +0100
commit16a9a730a4001585e87dc3c680081fd8b205b9a2 (patch)
tree910a6f9dda0fce3eb428f0602e740e06efeff8e2 /src
parentb531c560bb046c359598a07a08cfaeaa973090c2 (diff)
downloadlibayatana-appindicator-16a9a730a4001585e87dc3c680081fd8b205b9a2.tar.gz
libayatana-appindicator-16a9a730a4001585e87dc3c680081fd8b205b9a2.tar.bz2
libayatana-appindicator-16a9a730a4001585e87dc3c680081fd8b205b9a2.zip
don't use indicator_image_helper ()
Remove indicator_image_helper () call and use g_themed_icon_new_with_default_fallbacks () directly. We don't need the logic embedded in indicator_image_helper () for the GtkStatusIcon as it takes care of changing icon size for us.
Diffstat (limited to 'src')
-rw-r--r--src/libappindicator/app-indicator.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 2e6d8d1..dc99936 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -35,8 +35,6 @@ License version 3 and version 2.1 along with this program. If not, see
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-gtk/client.h>
-#include <libindicator/indicator-image-helper.h>
-
#include "libappindicator/app-indicator.h"
#include "libappindicator/app-indicator-enum-types.h"
@@ -860,25 +858,26 @@ static void
status_icon_changes (AppIndicator * self, gpointer data)
{
GtkStatusIcon * icon = GTK_STATUS_ICON(data);
- GtkImage *image = indicator_image_helper (self->priv->icon_name);
+ GIcon *themed_icon =
+ g_themed_icon_new_with_default_fallbacks (self->priv->icon_name);
switch (app_indicator_get_status(self)) {
case APP_INDICATOR_STATUS_PASSIVE:
gtk_status_icon_set_visible(icon, FALSE);
- gtk_status_icon_set_from_pixbuf(icon, gtk_image_get_pixbuf (image));
+ gtk_status_icon_set_from_gicon(icon, G_ICON (themed_icon));
break;
case APP_INDICATOR_STATUS_ACTIVE:
- gtk_status_icon_set_from_pixbuf(icon, gtk_image_get_pixbuf (image));
+ gtk_status_icon_set_from_gicon(icon, G_ICON (themed_icon));
gtk_status_icon_set_visible(icon, TRUE);
break;
case APP_INDICATOR_STATUS_ATTENTION:
- gtk_status_icon_set_from_pixbuf(icon, gtk_image_get_pixbuf (image));
+ gtk_status_icon_set_from_gicon(icon, G_ICON (themed_icon));
gtk_status_icon_set_visible(icon, TRUE);
break;
};
- g_object_ref_sink (image);
- g_object_unref (image);
+ g_object_ref_sink (themed_icon);
+ g_object_unref (themed_icon);
return;
}