diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-08-10 16:23:32 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-08-10 16:23:32 -0400 |
commit | b5eb255fae2158fde84def56b46fa6c5424f5b84 (patch) | |
tree | 70f194a2b29a7f583160c1cd1630bfb373b7cdc2 /src/session-service.c | |
parent | 108cec80746510d7f622ad0506a7f3d2a734c3ae (diff) | |
parent | fb32494de9b55663cec088ade6967da349c0cac7 (diff) | |
download | ayatana-indicator-session-b5eb255fae2158fde84def56b46fa6c5424f5b84.tar.gz ayatana-indicator-session-b5eb255fae2158fde84def56b46fa6c5424f5b84.tar.bz2 ayatana-indicator-session-b5eb255fae2158fde84def56b46fa6c5424f5b84.zip |
Import upstream version 0.3.1
Diffstat (limited to 'src/session-service.c')
-rw-r--r-- | src/session-service.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/session-service.c b/src/session-service.c index bb473e9..fa212fd 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -78,11 +78,21 @@ service_shutdown (IndicatorService * service, gpointer user_data) return; } +static gboolean +get_greeter_mode (void) +{ + const gchar *var; + var = g_getenv("INDICATOR_GREETER_MODE"); + return (g_strcmp0(var, "1") == 0); +} + /* Main, is well, main. It brings everything up and throws us into the mainloop of no return. */ int main (int argc, char ** argv) { + gboolean greeter_mode; + g_type_init(); /* Setting up i18n and gettext. Apparently, we need @@ -99,15 +109,19 @@ main (int argc, char ** argv) session_dbus = session_dbus_new(); + greeter_mode = get_greeter_mode(); + // Devices - DeviceMenuMgr* device_mgr = device_menu_mgr_new (session_dbus); + DeviceMenuMgr* device_mgr = device_menu_mgr_new (session_dbus, greeter_mode); DbusmenuServer * server = dbusmenu_server_new(INDICATOR_SESSION_DBUS_OBJECT); dbusmenu_server_set_root(server, device_mgr_get_root_item (device_mgr)); - // Users - UserMenuMgr* user_mgr = user_menu_mgr_new (session_dbus); - DbusmenuServer* users_server = dbusmenu_server_new (INDICATOR_USERS_DBUS_OBJECT); - dbusmenu_server_set_root (users_server, user_mgr_get_root_item (user_mgr)); + if (!greeter_mode) { + // Users + UserMenuMgr* user_mgr = user_menu_mgr_new (session_dbus); + DbusmenuServer* users_server = dbusmenu_server_new (INDICATOR_USERS_DBUS_OBJECT); + dbusmenu_server_set_root (users_server, user_mgr_get_root_item (user_mgr)); + } mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); |