diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-09-02 12:11:13 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-09-02 12:11:13 +0100 |
commit | a335b8e973287fa5cf60286bb6fd8f46fb66ad83 (patch) | |
tree | 2184be128330793d90a78307edd5f39a2b070b43 /src/indicator-session.c | |
parent | 383e28467156675a5c1231c37eafb2a7bbc6e4f2 (diff) | |
download | ayatana-indicator-session-a335b8e973287fa5cf60286bb6fd8f46fb66ad83.tar.gz ayatana-indicator-session-a335b8e973287fa5cf60286bb6fd8f46fb66ad83.tar.bz2 ayatana-indicator-session-a335b8e973287fa5cf60286bb6fd8f46fb66ad83.zip |
make sure to flag restart state in greeter mode also with the right icon
Diffstat (limited to 'src/indicator-session.c')
-rw-r--r-- | src/indicator-session.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c index 2b36fdd..7a8a238 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -70,6 +70,8 @@ struct _IndicatorSession { GDBusProxy * service_proxy; }; +static gboolean greeter_mode; + GType indicator_session_get_type (void); /* Indicator stuff */ @@ -166,11 +168,11 @@ indicator_session_init (IndicatorSession *self) const gchar *greeter_var; greeter_var = g_getenv("INDICATOR_GREETER_MODE"); - + greeter_mode = g_strcmp0(greeter_var, "1") == 0; // devices self->devices.menu = GTK_MENU (dbusmenu_gtkmenu_new(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_OBJECT)); - if (g_strcmp0(greeter_var, "1") == 0){ + if (greeter_mode){ self->devices.image = indicator_image_helper (GREETER_ICON_DEFAULT); } else{ @@ -507,7 +509,12 @@ receive_signal (GDBusProxy * proxy, } } else if (g_strcmp0(signal_name, "RestartRequired") == 0) { - self->devices.image = indicator_image_helper (ICON_RESTART); + if (greeter_mode == TRUE){ + self->devices.image = indicator_image_helper (GREETER_ICON_RESTART); + } + else{ + self->devices.image = indicator_image_helper (ICON_RESTART); + } } } |