gdm r6105 - in trunk: . gui/simple-greeter
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6105 - in trunk: . gui/simple-greeter
- Date: Sat, 5 Apr 2008 06:16:50 +0100 (BST)
Author: halfline
Date: Sat Apr 5 06:16:49 2008
New Revision: 6105
URL: http://svn.gnome.org/viewvc/gdm?rev=6105&view=rev
Log:
2008-04-05 Ray Strode <rstrode redhat com>
* gui/simple-greeter/gdm-greeter-login-window.c
(reset_dialog), (gdm_greeter_login_request_timed_login):
Prevent reset_dialog from recursing. Don't automatically
select timed login user except for the first time.
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-greeter-login-window.c
Modified: trunk/gui/simple-greeter/gdm-greeter-login-window.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-login-window.c (original)
+++ trunk/gui/simple-greeter/gdm-greeter-login-window.c Sat Apr 5 06:16:49 2008
@@ -159,7 +159,10 @@
static void gdm_greeter_login_window_init (GdmGreeterLoginWindow *greeter_login_window);
static void gdm_greeter_login_window_finalize (GObject *object);
-static void restart_timed_login_timeout (GdmGreeterLoginWindow *login_window);
+static void restart_timed_login_timeout (GdmGreeterLoginWindow *login_window);
+static void on_user_unchosen (GdmUserChooserWidget *user_chooser,
+ GdmGreeterLoginWindow *login_window);
+
G_DEFINE_TYPE (GdmGreeterLoginWindow, gdm_greeter_login_window, GTK_TYPE_WINDOW)
static void
@@ -618,7 +621,11 @@
}
_gdm_greeter_login_window_set_interactive (login_window, FALSE);
+ g_signal_handlers_block_by_func (G_OBJECT (login_window->priv->user_chooser),
+ G_CALLBACK (on_user_unchosen), login_window);
gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), NULL);
+ g_signal_handlers_unblock_by_func (G_OBJECT (login_window->priv->user_chooser),
+ G_CALLBACK (on_user_unchosen), login_window);
if (login_window->priv->start_session_handler_id > 0) {
g_signal_handler_disconnect (login_window, login_window->priv->start_session_handler_id);
@@ -707,16 +714,30 @@
const char *username,
int delay)
{
+ static gboolean timed_login_already_enabled;
+
g_return_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window));
g_debug ("GdmGreeterLoginWindow: requested automatic login for user '%s' in %d seconds", username, delay);
+ if (login_window->priv->timed_login_username != NULL) {
+ timed_login_already_enabled = TRUE;
+ g_free (login_window->priv->timed_login_username);
+ } else {
+ timed_login_already_enabled = FALSE;
+ }
login_window->priv->timed_login_username = g_strdup (username);
login_window->priv->timed_login_delay = delay;
- reset_dialog (login_window);
+ if (login_window->priv->dialog_mode != MODE_SELECTION) {
+ reset_dialog (login_window);
+ }
gdm_user_chooser_widget_set_show_auto_user (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), TRUE);
- gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), GDM_USER_CHOOSER_USER_AUTO);
+
+ if (!timed_login_already_enabled) {
+ gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser),
+ GDM_USER_CHOOSER_USER_AUTO);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]