1
From 862ca163da29cf2bdf4ec5d328d0bbd3936bc004 Mon Sep 17 00:00:00 2001
2
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
3
Date: Tue, 5 Mar 2013 02:04:02 -0500
4
Subject: [PATCH] unlockDialog, loginDialog: Connect to the activate signal on
7
This is the recommended way to connect to an entry's activation binding --
8
event bubbling is not guaranteed by ClutterText.
10
https://bugzilla.gnome.org/show_bug.cgi?id=695154
12
js/gdm/loginDialog.js | 11 +++++++++++
13
js/ui/unlockDialog.js | 1 +
14
2 files changed, 12 insertions(+)
16
--- a/js/gdm/loginDialog.js
17
+++ b/js/gdm/loginDialog.js
19
x_align: St.Align.START });
20
this._promptEntry = new St.Entry({ style_class: 'login-dialog-prompt-entry',
22
+ this._promptEntryActivateId = 0;
23
this._promptBox.add(this._promptEntry,
29
this.setButtons(buttons);
30
+ this._promptEntryActivateId =
31
+ this._promptEntry.clutter_text.connect('activate', function() {
41
+ if (this._promptEntryActivateId > 0) {
42
+ this._promptEntry.clutter_text.disconnect(this._promptEntryActivateId);
43
+ this._promptEntryActivateId = 0;
45
this._promptLoginHint.hide();
46
this._promptEntry.reactive = true;
47
this._promptEntry.set_text('');
48
--- a/js/ui/unlockDialog.js
49
+++ b/js/ui/unlockDialog.js
52
this._promptEntry = new St.Entry({ style_class: 'login-dialog-prompt-entry',
54
+ this._promptEntry.clutter_text.connect('activate', Lang.bind(this, this._doUnlock));
55
this._promptEntry.clutter_text.set_password_char('\u25cf');
56
ShellEntry.addContextMenu(this._promptEntry, { isPassword: true });
57
this.setInitialKeyFocus(this._promptEntry);