diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-10-25 17:25:02 -0400 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-10-25 17:25:02 -0400 |
commit | 3e2c3690091d05ecdcd29d1ed9f046abd94cee70 (patch) | |
tree | 047c4871f9bbf8f9191d494dab4427d0611ede02 | |
parent | 9ddd6044078e8af15fe4334063638416120ac733 (diff) | |
download | ayatana-indicator-session-3e2c3690091d05ecdcd29d1ed9f046abd94cee70.tar.gz ayatana-indicator-session-3e2c3690091d05ecdcd29d1ed9f046abd94cee70.tar.bz2 ayatana-indicator-session-3e2c3690091d05ecdcd29d1ed9f046abd94cee70.zip |
removed the redundant max users limit on the user menu
-rw-r--r-- | src/user-menu-mgr.c | 4 | ||||
-rw-r--r-- | src/users-service-dbus.c | 9 | ||||
-rw-r--r-- | src/users-service-dbus.h | 1 |
3 files changed, 4 insertions, 10 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index efb3f7d..54e718f 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -191,7 +191,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 +206,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, diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c index 971b854..76605f6 100644 --- a/src/users-service-dbus.c +++ b/src/users-service-dbus.c @@ -719,7 +719,7 @@ sync_users (UsersServiceDbus *self) g_return_if_fail(IS_USERS_SERVICE_DBUS(self)); UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - if (priv->count > MINIMUM_USERS && priv->count < MAXIMUM_USERS) + if (priv->count > MINIMUM_USERS) { GPtrArray *users = NULL; GError *error = NULL; @@ -823,12 +823,7 @@ user_added (DBusGProxy *proxy, UsersServiceDbus *service = (UsersServiceDbus *)user_data; UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); priv->count++; - - if (priv->count < MAXIMUM_USERS) - { - sync_users (service); - } - + sync_users (service); g_signal_emit (service, signals[USER_ADDED], 0, diff --git a/src/users-service-dbus.h b/src/users-service-dbus.h index 25942df..b7db690 100644 --- a/src/users-service-dbus.h +++ b/src/users-service-dbus.h @@ -58,7 +58,6 @@ struct _UserData * got some gdm issues worked out. */ #define MINIMUM_USERS 0 -#define MAXIMUM_USERS 7 struct _UsersServiceDbus { GObject parent; |