Add a GConf key to disable the user list
This commit is contained in:
parent
feb09a2142
commit
4a6c2abb0b
9
gdm.spec
9
gdm.spec
@ -16,7 +16,7 @@
|
|||||||
Summary: The GNOME Display Manager
|
Summary: The GNOME Display Manager
|
||||||
Name: gdm
|
Name: gdm
|
||||||
Version: 2.22.0
|
Version: 2.22.0
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
@ -80,6 +80,9 @@ Requires: audit-libs >= %{libauditver}
|
|||||||
Patch1: xkb-groups.patch
|
Patch1: xkb-groups.patch
|
||||||
# from upstream svn
|
# from upstream svn
|
||||||
Patch2: gdm-keyboard-chooser.patch
|
Patch2: gdm-keyboard-chooser.patch
|
||||||
|
# from upstream svn
|
||||||
|
Patch3: show-users.patch
|
||||||
|
|
||||||
# Fedora-specific
|
# Fedora-specific
|
||||||
Patch99: gdm-2.21.8-fedora-logo.patch
|
Patch99: gdm-2.21.8-fedora-logo.patch
|
||||||
|
|
||||||
@ -102,6 +105,7 @@ multiple simulanteous logged in users.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .xkb-groups
|
%patch1 -p1 -b .xkb-groups
|
||||||
%patch2 -p1 -b .keyboard-chooser
|
%patch2 -p1 -b .keyboard-chooser
|
||||||
|
%patch3 -p1 -b .show-users
|
||||||
%patch99 -p1 -b .fedora-logo
|
%patch99 -p1 -b .fedora-logo
|
||||||
|
|
||||||
autoreconf
|
autoreconf
|
||||||
@ -301,6 +305,9 @@ fi
|
|||||||
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
|
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 8 2008 Matthias Clasen <mclasen@redhat.com> - 1:2.22.0-6
|
||||||
|
- Add a GConf key to disable the user list
|
||||||
|
|
||||||
* Mon May 5 2008 Matthias Clasen <mclasen@redhat.com> - 1:2.22.0-5
|
* Mon May 5 2008 Matthias Clasen <mclasen@redhat.com> - 1:2.22.0-5
|
||||||
- Autoreconf
|
- Autoreconf
|
||||||
- Bump rev
|
- Bump rev
|
||||||
|
90
show-users.patch
Normal file
90
show-users.patch
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
--- gdm-2.22.0/gui/simple-greeter/gdm-user-chooser-widget.c 2008-05-01 18:35:35.000000000 -0400
|
||||||
|
+++ hacked/gui/simple-greeter/gdm-user-chooser-widget.c 2008-05-07 20:27:09.000000000 -0400
|
||||||
|
@@ -34,9 +34,14 @@
|
||||||
|
#include <glib/gstdio.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
+#include <gconf/gconf-client.h>
|
||||||
|
+
|
||||||
|
#include "gdm-user-manager.h"
|
||||||
|
#include "gdm-user-chooser-widget.h"
|
||||||
|
|
||||||
|
+
|
||||||
|
+#define KEY_DISABLE_USER_LIST "/apps/gdm/simple-greeter/disable_user_list"
|
||||||
|
+
|
||||||
|
enum {
|
||||||
|
USER_NO_DISPLAY = 1 << 0,
|
||||||
|
USER_ACCOUNT_DISABLED = 1 << 1,
|
||||||
|
@@ -59,6 +64,7 @@
|
||||||
|
guint show_other_user : 1;
|
||||||
|
guint show_guest_user : 1;
|
||||||
|
guint show_auto_user : 1;
|
||||||
|
+ guint show_normal_users : 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
@@ -231,6 +237,25 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+static gboolean
|
||||||
|
+is_user_list_disabled (GdmUserChooserWidget *widget)
|
||||||
|
+{
|
||||||
|
+ GConfClient *client;
|
||||||
|
+ GError *error;
|
||||||
|
+ gboolean result;
|
||||||
|
+
|
||||||
|
+ client = gconf_client_get_default ();
|
||||||
|
+ error = NULL;
|
||||||
|
+ result = gconf_client_get_bool (client, KEY_DISABLE_USER_LIST, &error);
|
||||||
|
+ if (error != NULL) {
|
||||||
|
+ g_debug ("GdmUserChooserWidget: unable to get disable-user-list configuration: %s", error->message);
|
||||||
|
+ g_error_free (error);
|
||||||
|
+ }
|
||||||
|
+ g_object_unref (client);
|
||||||
|
+
|
||||||
|
+ return result;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static GObject *
|
||||||
|
gdm_user_chooser_widget_constructor (GType type,
|
||||||
|
guint n_construct_properties,
|
||||||
|
@@ -247,6 +272,8 @@
|
||||||
|
gdm_user_chooser_widget_set_show_auto_user (user_chooser_widget, FALSE);
|
||||||
|
gdm_user_chooser_widget_set_show_other_user (user_chooser_widget, TRUE);
|
||||||
|
|
||||||
|
+ user_chooser_widget->priv->show_normal_users = !is_user_list_disabled (user_chooser_widget);
|
||||||
|
+
|
||||||
|
return G_OBJECT (user_chooser_widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -403,6 +430,9 @@
|
||||||
|
char *tooltip;
|
||||||
|
gboolean is_logged_in;
|
||||||
|
|
||||||
|
+ if (!widget->priv->show_normal_users)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
pixbuf = gdm_user_render_icon (user, ICON_SIZE);
|
||||||
|
if (pixbuf == NULL && widget->priv->stock_person_pixbuf != NULL) {
|
||||||
|
pixbuf = g_object_ref (widget->priv->stock_person_pixbuf);
|
||||||
|
--- gdm-2.22.0/gui/simple-greeter/gdm-simple-greeter.schemas.in 2008-05-07 20:28:57.000000000 -0400
|
||||||
|
+++ hacked/gui/simple-greeter/gdm-simple-greeter.schemas.in 2008-05-07 20:22:33.000000000 -0400
|
||||||
|
@@ -68,6 +68,17 @@
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
<schema>
|
||||||
|
+ <key>/schemas/apps/gdm/simple-greeter/disable_user_list</key>
|
||||||
|
+ <applyto>/apps/gdm/simple-greeter/disable_user_list</applyto>
|
||||||
|
+ <owner>gdm-simple-greeter</owner>
|
||||||
|
+ <type>bool</type>
|
||||||
|
+ <default>FALSE</default>
|
||||||
|
+ <locale name="C">
|
||||||
|
+ <short>Do not show known users in the login window</short>
|
||||||
|
+ <long>Set to TRUE to disable showing known users in the login window.</long>
|
||||||
|
+ </locale>
|
||||||
|
+ </schema>
|
||||||
|
+ <schema>
|
||||||
|
<key>/schemas/apps/gdm/simple-greeter/wm_use_compiz</key>
|
||||||
|
<applyto>/apps/gdm/simple-greeter/wm_use_compiz</applyto>
|
||||||
|
<owner>gdm-simple-greeter</owner>
|
Loading…
Reference in New Issue
Block a user