diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-06-02 19:37:10 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-06-02 19:37:10 -0500 |
commit | ca4dc435ab0c1af2b5fc72e9b6eb0c286630ddd4 (patch) | |
tree | 106ac4df7eb98e3a87138d51d24040e68c2ef4a7 /src | |
parent | d625fd824b9dea8138180e1a68563a6bd5014adb (diff) | |
download | ayatana-indicator-session-ca4dc435ab0c1af2b5fc72e9b6eb0c286630ddd4.tar.gz ayatana-indicator-session-ca4dc435ab0c1af2b5fc72e9b6eb0c286630ddd4.tar.bz2 ayatana-indicator-session-ca4dc435ab0c1af2b5fc72e9b6eb0c286630ddd4.zip |
In user_menu_mgr_rebuild_items(), reduce the scope of some temporary variables
Diffstat (limited to 'src')
-rw-r--r-- | src/user-menu-mgr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 3f4bdc4..b7f61cf 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -100,10 +100,7 @@ user_menu_mgr_class_init (UserMenuMgrClass *klass) static void user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) { - DbusmenuMenuitem *mi = NULL; - DbusmenuMenuitem *guest_mi = NULL; GList *u; - UserData *user; gboolean can_activate; GList *children; @@ -163,6 +160,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) if ( !is_this_guest_session () && guest_enabled) { + DbusmenuMenuitem *guest_mi = NULL; guest_mi = dbusmenu_menuitem_new (); dbusmenu_menuitem_property_set (guest_mi, DBUSMENU_MENUITEM_PROP_TYPE, @@ -193,6 +191,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) } for (u = users; u != NULL; u = g_list_next (u)) { + UserData *user; user = u->data; g_debug ("%s: %s", user->user_name, user->real_name); user->service = self->users_dbus_interface; @@ -204,7 +203,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) } if (self->user_count > MINIMUM_USERS) { - mi = dbusmenu_menuitem_new (); + DbusmenuMenuitem * mi = dbusmenu_menuitem_new (); dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_TYPE, USER_ITEM_TYPE); |