~ubuntu-branches/ubuntu/lucid/gdm/lucid-backports

« back to all changes in this revision

Viewing changes to debian/patches/92_git_timed_login_user_selection.patch

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher, Martin Pitt, Robert Ancell
  • Date: 2010-06-09 14:10:46 UTC
  • mfrom: (1.4.44 upstream)
  • Revision ID: james.westby@ubuntu.com-20100609141046-huozhn4auhn5qfv5
Tags: 2.30.2.is.2.30.0-0ubuntu1
* The 2.30.2 upstream version introduces new issues so basing a new stable 
  updated on the current lucid version with selected changes for now,
  the new version can be uploaded again later once the issues are resolved
* debian/patches/90_git_run_init_script_before_autologin.patch:
  - git change to run the init scripts when autologin is enabled
    (lp: #586503)
* debian/patches/91_git_no_icons_watching.patch:
  - git change to not monitor the user icons, it creates issues with 
    some configurations like autofs (lp: #562509) or nfs (lp: #518810)
* debian/patches/92_git_timed_login_user_selection.patch:
  - git change to correct selected the default timed login user (lp: #585574)
* debian/patches/93_git_a11y_label.patch:
  - git change to correctly set a11y labels

[ Martin Pitt ]
* 06_run_xsession.d.patch: Export $USERXSESSION, $USERXSESSIONRC, and
  $ALTUSERXSESSION, so that running the "custom"/"default" sessions actually
  works. Without those, /etc/X11/Xsession.d/50x11-common_determine-startup
  decides to run the system default session even if we have the
  "allow-user-xsession" option. This is a prerequisite for fixing LP#398300.

[ Robert Ancell ]
* debian/patches/16_gdmserver_user_manager.patch:
* debian/patches/24_system_uid.patch:
  - Update to match IncludeAll behaviour in greeter (LP: #471542)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From b0997be9b4101fda30d621326b43e2ccf89ce4b1 Mon Sep 17 00:00:00 2001
 
2
From: Brian Cameron <Brian.Cameron@sun.com>
 
3
Date: Wed, 21 Apr 2010 21:57:20 +0000
 
4
Subject: Ensure users are loaded before starting the timed login clock.  Fixes
 
5
 
 
6
bug #614062.
 
7
---
 
8
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
 
9
index 25af747..0c7a936 100644
 
10
--- a/gui/simple-greeter/gdm-greeter-login-window.c
 
11
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
 
12
@@ -109,6 +109,7 @@ struct GdmGreeterLoginWindowPrivate
 
13
 
 
14
         guint            dialog_mode;
 
15
 
 
16
+        gboolean         timed_login_already_enabled;
 
17
         gboolean         timed_login_enabled;
 
18
         guint            timed_login_delay;
 
19
         char            *timed_login_username;
 
20
@@ -624,34 +625,55 @@ gdm_greeter_login_window_problem (GdmGreeterLoginWindow *login_window,
 
21
         return TRUE;
 
22
 }
 
23
 
 
24
+static void
 
25
+handle_request_timed_login (GdmGreeterLoginWindow *login_window)
 
26
+{
 
27
+        if (login_window->priv->dialog_mode != MODE_SELECTION) {
 
28
+                reset_dialog (login_window);
 
29
+        }
 
30
+        gdm_user_chooser_widget_set_show_user_auto (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), TRUE);
 
31
+
 
32
+        if (!login_window->priv->timed_login_already_enabled) {
 
33
+                gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser),
 
34
+                                                              GDM_USER_CHOOSER_USER_AUTO);
 
35
+        }
 
36
+}
 
37
+
 
38
+static void
 
39
+on_request_timed_login_after_users_loaded (GdmUserChooserWidget  *user_chooser,
 
40
+                                           GdmGreeterLoginWindow *login_window)
 
41
+{
 
42
+        g_debug ("Users now loaded, handling timed login request");
 
43
+        handle_request_timed_login (login_window);
 
44
+}
 
45
+
 
46
 void
 
47
 gdm_greeter_login_window_request_timed_login (GdmGreeterLoginWindow *login_window,
 
48
                                               const char            *username,
 
49
                                               int                    delay)
 
50
 {
 
51
-        static gboolean timed_login_already_enabled;
 
52
-
 
53
         g_return_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window));
 
54
 
 
55
         g_debug ("GdmGreeterLoginWindow: requested automatic login for user '%s' in %d seconds", username, delay);
 
56
 
 
57
         if (login_window->priv->timed_login_username != NULL) {
 
58
-                timed_login_already_enabled = TRUE;
 
59
+                login_window->priv->timed_login_already_enabled = TRUE;
 
60
                 g_free (login_window->priv->timed_login_username);
 
61
         } else {
 
62
-                timed_login_already_enabled = FALSE;
 
63
+                login_window->priv->timed_login_already_enabled = FALSE;
 
64
         }
 
65
         login_window->priv->timed_login_username = g_strdup (username);
 
66
         login_window->priv->timed_login_delay = delay;
 
67
 
 
68
-        if (login_window->priv->dialog_mode != MODE_SELECTION) {
 
69
-                reset_dialog (login_window);
 
70
-        }
 
71
-        gdm_user_chooser_widget_set_show_user_auto (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), TRUE);
 
72
-
 
73
-        if (!timed_login_already_enabled) {
 
74
-                gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser),
 
75
-                                                              GDM_USER_CHOOSER_USER_AUTO);
 
76
+        if (login_window->priv->user_chooser_loaded) {
 
77
+                g_debug ("Handling timed login request since users are already loaded.");
 
78
+                handle_request_timed_login (login_window);
 
79
+        } else {
 
80
+                g_debug ("Waiting to handle timed login request until users are loaded.");
 
81
+                g_signal_connect (login_window->priv->user_chooser,
 
82
+                                  "loaded",
 
83
+                                  G_CALLBACK (on_request_timed_login_after_users_loaded),
 
84
+                                  login_window);
 
85
         }
 
86
 }
 
87
 
 
88
--
 
89
cgit v0.8.3.1
 
90