Merge lp:~cjcurran/indicator-session/redundant-max-users-limit into lp:indicator-session/0.1

Proposed by Conor Curran
Status: Merged
Merged at revision: 227
Proposed branch: lp:~cjcurran/indicator-session/redundant-max-users-limit
Merge into: lp:indicator-session/0.1
Diff against target: 104 lines (+32/-11)
4 files modified
.bzrignore (+28/-0)
src/user-menu-mgr.c (+2/-2)
src/users-service-dbus.c (+2/-8)
src/users-service-dbus.h (+0/-1)
To merge this branch: bzr merge lp:~cjcurran/indicator-session/redundant-max-users-limit
Reviewer Review Type Date Requested Status
Ted Gould Pending
Review via email: mp+80394@code.launchpad.net

Description of the change

fixes bug attached. No need for Max users limit now that the users have their own menu.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2011-08-24 21:03:53 +0000
+++ .bzrignore 2011-10-25 21:52:23 +0000
@@ -213,3 +213,31 @@
213data/indicator-session-lock-screen.desktop213data/indicator-session-lock-screen.desktop
214test-ascii-quotes214test-ascii-quotes
215test-space-ellipsis215test-space-ellipsis
216po/af.gmo
217po/an.gmo
218po/bo.gmo
219po/ca@valencia.gmo
220po/cy.gmo
221po/dv.gmo
222po/fur.gmo
223po/fy.gmo
224po/gd.gmo
225po/gv.gmo
226po/hy.gmo
227po/ka.gmo
228po/km.gmo
229po/ky.gmo
230po/mg.gmo
231po/mk.gmo
232po/ml.gmo
233po/my.gmo
234po/ne.gmo
235po/ny.gmo
236po/os.gmo
237po/sc.gmo
238po/sd.gmo
239po/ta.gmo
240po/ta_LK.gmo
241po/tt.gmo
242po/ur.gmo
243po/vec.gmo
216244
=== modified file 'src/user-menu-mgr.c'
--- src/user-menu-mgr.c 2011-09-07 20:02:44 +0000
+++ src/user-menu-mgr.c 2011-10-25 21:52:23 +0000
@@ -191,7 +191,7 @@
191 191
192 192
193193
194 if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) {194 if (self->user_count > MINIMUM_USERS) {
195 users = g_list_sort (users, (GCompareFunc)compare_users_by_username);195 users = g_list_sort (users, (GCompareFunc)compare_users_by_username);
196 }196 }
197197
@@ -206,7 +206,7 @@
206 session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name);206 session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name);
207 }207 }
208 208
209 if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) {209 if (self->user_count > MINIMUM_USERS) {
210 mi = dbusmenu_menuitem_new ();210 mi = dbusmenu_menuitem_new ();
211 dbusmenu_menuitem_property_set (mi,211 dbusmenu_menuitem_property_set (mi,
212 DBUSMENU_MENUITEM_PROP_TYPE,212 DBUSMENU_MENUITEM_PROP_TYPE,
213213
=== modified file 'src/users-service-dbus.c'
--- src/users-service-dbus.c 2011-09-21 05:47:17 +0000
+++ src/users-service-dbus.c 2011-10-25 21:52:23 +0000
@@ -303,7 +303,6 @@
303303
304 priv->count = users->len;304 priv->count = users->len;
305 g_ptr_array_free (users, TRUE);305 g_ptr_array_free (users, TRUE);
306
307 sync_users (self);306 sync_users (self);
308}307}
309308
@@ -719,7 +718,7 @@
719 g_return_if_fail(IS_USERS_SERVICE_DBUS(self));718 g_return_if_fail(IS_USERS_SERVICE_DBUS(self));
720 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);719 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
721720
722 if (priv->count > MINIMUM_USERS && priv->count < MAXIMUM_USERS)721 if (priv->count > MINIMUM_USERS)
723 {722 {
724 GPtrArray *users = NULL;723 GPtrArray *users = NULL;
725 GError *error = NULL;724 GError *error = NULL;
@@ -823,12 +822,7 @@
823 UsersServiceDbus *service = (UsersServiceDbus *)user_data;822 UsersServiceDbus *service = (UsersServiceDbus *)user_data;
824 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service);823 UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service);
825 priv->count++;824 priv->count++;
826825 sync_users (service);
827 if (priv->count < MAXIMUM_USERS)
828 {
829 sync_users (service);
830 }
831
832 g_signal_emit (service,826 g_signal_emit (service,
833 signals[USER_ADDED],827 signals[USER_ADDED],
834 0,828 0,
835829
=== modified file 'src/users-service-dbus.h'
--- src/users-service-dbus.h 2011-09-07 20:02:44 +0000
+++ src/users-service-dbus.h 2011-10-25 21:52:23 +0000
@@ -58,7 +58,6 @@
58 * got some gdm issues worked out.58 * got some gdm issues worked out.
59 */59 */
60#define MINIMUM_USERS 060#define MINIMUM_USERS 0
61#define MAXIMUM_USERS 7
6261
63struct _UsersServiceDbus {62struct _UsersServiceDbus {
64 GObject parent;63 GObject parent;

Subscribers

People subscribed via source and target branches