Commit 427b3894 authored by Brian Cameron's avatar Brian Cameron Committed by Brian Cameron

Better fix for not showing the face browser if the userlist is empty. Now

2007-02-05  Brian Cameron  <brian.cameron@sun.com>

        * gui/gdmlogin.c:  Better fix for not showing the face browser
          if the userlist is empty.  Now we add the model to the treeview
          and add entries to the model rather than building the model first.
          For some reason building the model first and adding it to the
          treeview was causing a selection "changed" signal to get sent
          which caused the interruption message to the slave process.
          Fix by Ludwig Nussel <ludwig.nussel@suse.de>.

svn path=/trunk/; revision=4563
parent 9ffb9c5b
......@@ -75,6 +75,7 @@ Contributions from:
Kjartan Maraas <kmaraas@gnome.org>
Lee Mallabone <lee0@callnetuk.com>
Leena Gunda <leena.gunda@wipro.com>
Ludwig Nussel <ludwig.nussel@suse.de>
Luis Villa <louie@ximian.com>
Lukasz Zalewski <lukas@dcs.qmul.ac.uk>
Mark McLoughlin <mark@skynet.ie>
......
2007-02-05 Brian Cameron <brian.cameron@sun.com>
* gui/gdmlogin.c: Better fix for not showing the face browser
if the userlist is empty. Now we add the model to the treeview
and add entries to the model rather than building the model first.
For some reason building the model first and adding it to the
treeview was causing a selection "changed" signal to get sent
which caused the interruption message to the slave process.
Fix by Ludwig Nussel <ludwig.nussel@suse.de>.
2007-02-05 William Jon McCann <mccann@jhu.edu>
* daemon/gdmconsolekit.c: (add_param_int), (add_param_boolean),
......@@ -23,7 +33,7 @@
daemon/misc.c: : Fix warnings and fix an
assertion in gdm because it called
gdm_xdmcp_send_forward_query also for IPv6.
Patch by Ludwig Nussel.
Patch by Ludwig Nussel <ludwig.nussel@suse.de>.
:
2006-01-26 Brian Cameron <brian.cameron@sun.com>
......
......@@ -1999,17 +1999,11 @@ process_operation (guchar op_code,
}
static int
static void
gdm_login_browser_populate (void)
{
GList *li;
int i = 0;
/* Create browser_model before calling gdm_login_browser_populate */
browser_model = (GtkTreeModel *)gtk_list_store_new (3,
GDK_TYPE_PIXBUF,
G_TYPE_STRING,
G_TYPE_STRING);
for (li = users; li != NULL; li = li->next) {
GdmUser *usr = li->data;
GtkTreeIter iter = {0};
......@@ -2032,9 +2026,8 @@ gdm_login_browser_populate (void)
GREETER_ULIST_LABEL_COLUMN, label,
-1);
g_free (label);
i++;
}
return (i);
return;
}
static void
......@@ -2592,6 +2585,12 @@ gdm_login_gui_init (void)
G_CALLBACK (browser_change_focus),
NULL);
/* Create browser_model before calling gdm_login_browser_populate */
browser_model = (GtkTreeModel *)gtk_list_store_new (3,
GDK_TYPE_PIXBUF,
G_TYPE_STRING,
G_TYPE_STRING);
gtk_tree_view_set_model (GTK_TREE_VIEW (browser), browser_model);
column = gtk_tree_view_column_new_with_attributes
(_("Icon"),
......@@ -3574,18 +3573,16 @@ main (int argc, char *argv[])
}
}
if (browser_ok && gdm_config_get_bool (GDM_KEY_BROWSER)) {
/*
* Do not display face browser widget if no users, check this
* before callign gdm_login_gui_init ()
*/
int num_users = gdm_login_browser_populate ();
if (num_users == 0)
browser_ok = FALSE;
}
/* Do not display face browser widget if no users */
if(!users)
browser_ok = FALSE;
gdm_login_gui_init ();
if (browser_ok && gdm_config_get_bool (GDM_KEY_BROWSER)) {
gdm_login_browser_populate ();
}
ve_signal_add (SIGHUP, gdm_reread_config, NULL);
hup.sa_handler = ve_signal_notify;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment