4a6c2ab
--- gdm-2.22.0/gui/simple-greeter/gdm-user-chooser-widget.c	2008-05-01 18:35:35.000000000 -0400
4a6c2ab
+++ hacked/gui/simple-greeter/gdm-user-chooser-widget.c	2008-05-07 20:27:09.000000000 -0400
4a6c2ab
@@ -34,9 +34,14 @@
4a6c2ab
 #include <glib/gstdio.h>
4a6c2ab
 #include <gtk/gtk.h>
4a6c2ab
 
4a6c2ab
+#include <gconf/gconf-client.h>
4a6c2ab
+
4a6c2ab
 #include "gdm-user-manager.h"
4a6c2ab
 #include "gdm-user-chooser-widget.h"
4a6c2ab
 
4a6c2ab
+
4a6c2ab
+#define KEY_DISABLE_USER_LIST "/apps/gdm/simple-greeter/disable_user_list"
4a6c2ab
+
4a6c2ab
 enum {
4a6c2ab
         USER_NO_DISPLAY              = 1 << 0,
4a6c2ab
         USER_ACCOUNT_DISABLED        = 1 << 1,
4a6c2ab
@@ -59,6 +64,7 @@
4a6c2ab
         guint           show_other_user : 1;
4a6c2ab
         guint           show_guest_user : 1;
4a6c2ab
         guint           show_auto_user : 1;
4a6c2ab
+	guint		show_normal_users : 1;
4a6c2ab
 };
4a6c2ab
 
4a6c2ab
 enum {
4a6c2ab
@@ -231,6 +237,25 @@
4a6c2ab
         }
4a6c2ab
 }
4a6c2ab
 
4a6c2ab
+static gboolean 
4a6c2ab
+is_user_list_disabled (GdmUserChooserWidget *widget)
4a6c2ab
+{
4a6c2ab
+	GConfClient *client;
4a6c2ab
+	GError      *error;
4a6c2ab
+	gboolean     result;
4a6c2ab
+
4a6c2ab
+        client = gconf_client_get_default ();
4a6c2ab
+        error = NULL;
4a6c2ab
+        result = gconf_client_get_bool (client, KEY_DISABLE_USER_LIST, &error);
4a6c2ab
+        if (error != NULL) {
4a6c2ab
+                g_debug ("GdmUserChooserWidget: unable to get disable-user-list configuration: %s", error->message);
4a6c2ab
+                g_error_free (error);
4a6c2ab
+        }
4a6c2ab
+        g_object_unref (client);
4a6c2ab
+
4a6c2ab
+        return result;
4a6c2ab
+}
4a6c2ab
+
4a6c2ab
 static GObject *
4a6c2ab
 gdm_user_chooser_widget_constructor (GType                  type,
4a6c2ab
                                      guint                  n_construct_properties,
4a6c2ab
@@ -247,6 +272,8 @@
4a6c2ab
         gdm_user_chooser_widget_set_show_auto_user (user_chooser_widget, FALSE);
4a6c2ab
         gdm_user_chooser_widget_set_show_other_user (user_chooser_widget, TRUE);
4a6c2ab
 
4a6c2ab
+	user_chooser_widget->priv->show_normal_users = !is_user_list_disabled (user_chooser_widget);
4a6c2ab
+
4a6c2ab
         return G_OBJECT (user_chooser_widget);
4a6c2ab
 }
4a6c2ab
 
4a6c2ab
@@ -403,6 +430,9 @@
4a6c2ab
         char         *tooltip;
4a6c2ab
         gboolean      is_logged_in;
4a6c2ab
 
4a6c2ab
+	if (!widget->priv->show_normal_users)
4a6c2ab
+		return;
4a6c2ab
+
4a6c2ab
         pixbuf = gdm_user_render_icon (user, ICON_SIZE);
4a6c2ab
         if (pixbuf == NULL && widget->priv->stock_person_pixbuf != NULL) {
4a6c2ab
                 pixbuf = g_object_ref (widget->priv->stock_person_pixbuf);
4a6c2ab
--- gdm-2.22.0/gui/simple-greeter/gdm-simple-greeter.schemas.in	2008-05-07 20:28:57.000000000 -0400
4a6c2ab
+++ hacked/gui/simple-greeter/gdm-simple-greeter.schemas.in	2008-05-07 20:22:33.000000000 -0400
4a6c2ab
@@ -68,6 +68,17 @@
4a6c2ab
       </locale>
4a6c2ab
     </schema>
4a6c2ab
     <schema>
4a6c2ab
+      <key>/schemas/apps/gdm/simple-greeter/disable_user_list</key>
4a6c2ab
+      <applyto>/apps/gdm/simple-greeter/disable_user_list</applyto>
4a6c2ab
+      <owner>gdm-simple-greeter</owner>
4a6c2ab
+      <type>bool</type>
4a6c2ab
+      <default>FALSE</default>
4a6c2ab
+      <locale name="C">
4a6c2ab
+        <short>Do not show known users in the login window</short>
4a6c2ab
+        <long>Set to TRUE to disable showing known users in the login window.</long>
4a6c2ab
+      </locale>
4a6c2ab
+    </schema>
4a6c2ab
+    <schema>
4a6c2ab
       <key>/schemas/apps/gdm/simple-greeter/wm_use_compiz</key>
4a6c2ab
       <applyto>/apps/gdm/simple-greeter/wm_use_compiz</applyto>
4a6c2ab
       <owner>gdm-simple-greeter</owner>