diff options
Diffstat (limited to 'src/user-menu-mgr.c')
-rw-r--r-- | src/user-menu-mgr.c | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index efb3f7d..3f4bdc4 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -48,9 +48,6 @@ static void activate_user_accounts (DbusmenuMenuitem *mi, gpointer user_data); static gint compare_users_by_username (const gchar *a, const gchar *b); -static void activate_online_accounts (DbusmenuMenuitem *mi, - guint timestamp, - gpointer user_data); static void activate_user_accounts (DbusmenuMenuitem *mi, guint timestamp, gpointer user_data); @@ -191,7 +188,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) - if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) { + if (self->user_count > MINIMUM_USERS) { users = g_list_sort (users, (GCompareFunc)compare_users_by_username); } @@ -206,7 +203,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name); } - if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) { + if (self->user_count > MINIMUM_USERS) { mi = dbusmenu_menuitem_new (); dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_TYPE, @@ -255,26 +252,12 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) } g_list_free(users); } - // Add the online accounts and separator + // Add the user accounts and separator DbusmenuMenuitem * separator1 = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set (separator1, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR); dbusmenu_menuitem_child_append (self->root_item, separator1); - DbusmenuMenuitem * online_accounts_item = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (online_accounts_item, - DBUSMENU_MENUITEM_PROP_TYPE, - DBUSMENU_CLIENT_TYPES_DEFAULT); - dbusmenu_menuitem_property_set (online_accounts_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Online Accounts…")); - - g_signal_connect (G_OBJECT (online_accounts_item), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK (activate_online_accounts), - NULL); - - dbusmenu_menuitem_child_append (self->root_item, online_accounts_item); DbusmenuMenuitem * user_accounts_item = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set (user_accounts_item, @@ -359,22 +342,6 @@ compare_users_by_username (const gchar *a, return retval; } -// TODO -// Wait until dialog is complete to find out name to pass -// to the control centre. -static void -activate_online_accounts (DbusmenuMenuitem *mi, - guint timestamp, - gpointer user_data) -{ - GError * error = NULL; - if (!g_spawn_command_line_async("gnome-control-center online-accounts", &error)) - { - g_warning("Unable to show control centre: %s", error->message); - g_error_free(error); - } -} - static void activate_user_accounts (DbusmenuMenuitem *mi, guint timestamp, |