aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-09-05 12:51:47 +0100
committerConor Curran <conor.curran@canonical.com>2011-09-05 12:51:47 +0100
commitf177b1e0b8ab0413a6eced41de3710e38852319a (patch)
tree5dd1a3a6736f80c928510633f769da29d26ba89f
parent3f39e981fdbe934faf762de161645edd5eba753f (diff)
parenta335b8e973287fa5cf60286bb6fd8f46fb66ad83 (diff)
downloadayatana-indicator-session-f177b1e0b8ab0413a6eced41de3710e38852319a.tar.gz
ayatana-indicator-session-f177b1e0b8ab0413a6eced41de3710e38852319a.tar.bz2
ayatana-indicator-session-f177b1e0b8ab0413a6eced41de3710e38852319a.zip
old icon now used when in greeter mode
-rw-r--r--src/dbus-shared-names.h2
-rw-r--r--src/indicator-session.c19
2 files changed, 19 insertions, 2 deletions
diff --git a/src/dbus-shared-names.h b/src/dbus-shared-names.h
index c5372e4..5f35903 100644
--- a/src/dbus-shared-names.h
+++ b/src/dbus-shared-names.h
@@ -63,5 +63,7 @@ typedef enum {
#define ICON_DEFAULT "system-devices-panel"
#define ICON_RESTART "system-devices-panel-alert"
+#define GREETER_ICON_DEFAULT "system-shutdown-panel"
+#define GREETER_ICON_RESTART "system-shutdown-panel-restart"
#endif /* __DBUS_SHARED_NAMES_H__ */
diff --git a/src/indicator-session.c b/src/indicator-session.c
index aacef49..2f1764f 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 */
@@ -164,10 +166,18 @@ indicator_session_init (IndicatorSession *self)
self->users.label = GTK_LABEL (gtk_label_new (NULL));
+ 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));
- self->devices.image = indicator_image_helper (ICON_DEFAULT);
+ if (greeter_mode){
+ self->devices.image = indicator_image_helper (GREETER_ICON_DEFAULT);
+ }
+ else{
+ self->devices.image = indicator_image_helper (ICON_DEFAULT);
+ }
gtk_widget_show (GTK_WIDGET(self->devices.menu));
gtk_widget_show (GTK_WIDGET(self->devices.image));
@@ -498,7 +508,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);
+ }
}
}