[26421] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25558 - trunk/debathena/config/lightdm-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Jun 4 11:54:18 2012

Date: Mon, 4 Jun 2012 11:54:16 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201206041554.q54FsGNI007720@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2012-06-04 11:54:16 -0400 (Mon, 04 Jun 2012)
New Revision: 25558

Modified:
   trunk/debathena/config/lightdm-config/debian/changelog
   trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
Log:
In lightdm-config:
  * Explicitly set the text and id columns of the ComboBox to work around
    GtkBuilder bugs
  * The greeter needs to keep track of whether the user hit Cancel or not
    in LightDM 1.0 (oneiric)


Modified: trunk/debathena/config/lightdm-config/debian/changelog
===================================================================
--- trunk/debathena/config/lightdm-config/debian/changelog	2012-06-03 21:21:56 UTC (rev 25557)
+++ trunk/debathena/config/lightdm-config/debian/changelog	2012-06-04 15:54:16 UTC (rev 25558)
@@ -1,8 +1,12 @@
 debathena-lightdm-config (1.2) unstable; urgency=low
 
   * Support kiosk browsing
+  * Explicitly set the text and id columns of the ComboBox to work around
+    GtkBuilder bugs
+  * The greeter needs to keep track of whether the user hit Cancel or not
+    in LightDM 1.0 (oneiric)
 
- -- Jonathan D Reed <jdreed@mit.edu>  Sun, 03 Jun 2012 17:14:33 -0400
+ -- Jonathan Reed <jdreed@mit.edu>  Mon, 04 Jun 2012 11:54:12 -0400
 
 debathena-lightdm-config (1.1) unstable; urgency=low
 

Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
===================================================================
--- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter	2012-06-03 21:21:56 UTC (rev 25557)
+++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter	2012-06-04 15:54:16 UTC (rev 25558)
@@ -65,6 +65,19 @@
             "access_cb": self.showAccessDialog,
             "browse_cb": self.spawnBrowser,
         }
+
+        # Sigh.  Pre lightdm-1.1, cancel_authentication() calls the
+        # authentication-complete callback, so when we're in that
+        # callback, we need to know if we cancelled, or if we typed
+        # the password wrong.  The lightdm daemon does in fact know
+        # the difference (return codes of 7 or 10), but gir has no way
+        # to get that info, AFAICT 
+        # So beingCancelled is set to True when the user hits Cancel
+        # (or Esc) and set back to False in the authentication-complete
+        # callback or before we try and send anything else to the greeter
+        # This only controls UI, and has no effect on whether LightDM
+        # thinks the authentication process is being cancelled.
+        self.beingCancelled=False
  
         # Save the screen size for various window operations
         defaultScreen = Gdk.Screen.get_default()
@@ -100,6 +113,12 @@
         # The session combo box
         self.cmbSession = self.builder.get_object("cmbSession")
         self.sessionBox = self.builder.get_object("sessionBox")
+        # Sigh.  Needed for Oneiric.  No-op on Precise
+        # See GNOME Bugzilla #650369 and 653579
+        # GtkBuilder calls g_object_new, not gtk_combo_box_text_new()
+        # so the properties don't get set.
+        self.cmbSession.set_entry_text_column(0);
+        self.cmbSession.set_id_column(1);
         for s in LightDM.get_sessions():
             self.cmbSession.append(s.get_key(), s.get_name())
         # Select the first session
@@ -266,10 +285,13 @@
             if not greeter.start_session_sync(session_name):
                 self._debug("Failed to start session")
                 print >> sys.stderr, "Failed to start session"
-        else:
+        elif not self.beingCancelled:
             self._debug("Authentication failed.")
             self.displayMessage("Authentication failed, please try again")
             self.greeter.authenticate(None)
+        else:
+            self.beingCancelled=False
+            self.resetLoginWindow()
 
     # The show-prompt message is emitted when LightDM wants you to
     # show a prompt to the user, and respond with the user's response.
@@ -348,6 +370,7 @@
     def cancelLogin(self, widget=None):
         self._debug("Cancelling authentication.  User=",
                    self.greeter.get_authentication_user())
+        self.beingCancelled=True
         self.greeter.cancel_authentication()
         self.resetLoginWindow()
 
@@ -387,6 +410,9 @@
     # and you'd just be logged in.  But we disable the user picker, so
     # that's not relevant.
     def cbLogin(self, widget):
+        # Because we just entered some text and are about to send it,
+        # we're no longer in the middle of a cancellation
+        self.beingCancelled=False
         self.clearMessage()
         self._debug("In cbLogin")
         if self.prompted:


home help back first fref pref prev next nref lref last post