aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-06-02 19:37:10 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-06-02 19:37:10 -0500
commitca4dc435ab0c1af2b5fc72e9b6eb0c286630ddd4 (patch)
tree106ac4df7eb98e3a87138d51d24040e68c2ef4a7
parentd625fd824b9dea8138180e1a68563a6bd5014adb (diff)
downloadayatana-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
-rw-r--r--src/user-menu-mgr.c7
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);