diff options
author | Brian Cameron <brian.cameron@sun.com> | 2007-02-05 09:39:52 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2007-02-05 09:39:52 +0000 |
commit | 427b38946ac6b088a4b2921ec3d56b8c740082e6 (patch) | |
tree | fa73a8884298eab6db37845a5e806361f07f9c28 | |
parent | 9ffb9c5baa5e7a3c1ed8d20c5c280ebecac67145 (diff) | |
download | gdm-427b38946ac6b088a4b2921ec3d56b8c740082e6.tar.gz |
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
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | gui/gdmlogin.c | 33 |
3 files changed, 27 insertions, 19 deletions
@@ -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> @@ -1,3 +1,13 @@ +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> diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c index 931357a5..1351c10a 100644 --- a/gui/gdmlogin.c +++ b/gui/gdmlogin.c @@ -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; |