From 3ea027c780c433dec5443c72c6154363b889ba84 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 21 Aug 2012 19:12:32 -0500 Subject: use gtk_image_*_from_icon_name() instead of indicator_image_helper*() --- src/indicator-session.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/indicator-session.c') diff --git a/src/indicator-session.c b/src/indicator-session.c index 53ff87e..3038948 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -36,7 +36,6 @@ with this program. If not, see . #include #include #include -#include #include "shared-names.h" #include "user-widget.h" @@ -117,6 +116,8 @@ indicator_session_class_init (IndicatorSessionClass *klass) static void indicator_session_init (IndicatorSession *self) { + const gchar * icon_name; + self->settings = g_settings_new ("com.canonical.indicator.session"); /* Now let's fire these guys up. */ @@ -131,9 +132,8 @@ indicator_session_init (IndicatorSession *self) self->entry.name_hint = PACKAGE; self->entry.accessible_desc = _("Session Menu"); self->entry.label = GTK_LABEL (gtk_label_new ("User Name")); - self->entry.image = greeter_mode - ? indicator_image_helper (GREETER_ICON_DEFAULT) - : indicator_image_helper (ICON_DEFAULT); + icon_name = greeter_mode ? GREETER_ICON_DEFAULT : ICON_DEFAULT; + self->entry.image = GTK_IMAGE (gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON)); self->entry.menu = GTK_MENU (dbusmenu_gtkmenu_new(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_OBJECT)); g_settings_bind (self->settings, "show-real-name-on-panel", @@ -341,7 +341,8 @@ receive_signal (GDBusProxy * proxy, } else if (!g_strcmp0(signal_name, "RestartRequired")) { - indicator_image_helper_update (self->entry.image, greeter_mode ? GREETER_ICON_RESTART : ICON_RESTART); + const gchar * icon_name = greeter_mode ? GREETER_ICON_RESTART : ICON_RESTART; + gtk_image_set_from_icon_name (GTK_IMAGE(self->entry.image), icon_name, GTK_ICON_SIZE_MENU); self->entry.accessible_desc = _("Device Menu (reboot required)"); g_signal_emit (G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, 0, &self->entry); } -- cgit v1.2.3