aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-08-21 19:12:32 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-08-21 19:12:32 -0500
commit3ea027c780c433dec5443c72c6154363b889ba84 (patch)
tree3bd74e4f5a9bc5f985f2fddd7d46b52c5ed2da61 /src
parentc69973f9c525f8c3c8681374111f2c0f839005d3 (diff)
downloadayatana-indicator-session-3ea027c780c433dec5443c72c6154363b889ba84.tar.gz
ayatana-indicator-session-3ea027c780c433dec5443c72c6154363b889ba84.tar.bz2
ayatana-indicator-session-3ea027c780c433dec5443c72c6154363b889ba84.zip
use gtk_image_*_from_icon_name() instead of indicator_image_helper*()
Diffstat (limited to 'src')
-rw-r--r--src/indicator-session.c11
1 files changed, 6 insertions, 5 deletions
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 <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>
#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);
}