~ubuntu-branches/ubuntu/trusty/gnome-shell/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/git_fix_dialog_activate_signals.patch

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2013-04-18 12:02:18 UTC
  • Revision ID: package-import@ubuntu.com-20130418120218-3zwv8xjfbct7awz9
Tags: 3.6.3.1-0ubuntu5
* debian/patches: 
    - git_fix_autocompletion_in_dialogs.patch,
      git_fix_dialog_activate_signals.patch
        backport fix for incorrect activation of dialogs (LP: #1077546)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
 the entry
 
6
 
 
7
This is the recommended way to connect to an entry's activation binding --
 
8
event bubbling is not guaranteed by ClutterText.
 
9
 
 
10
https://bugzilla.gnome.org/show_bug.cgi?id=695154
 
11
---
 
12
 js/gdm/loginDialog.js | 11 +++++++++++
 
13
 js/ui/unlockDialog.js |  1 +
 
14
 2 files changed, 12 insertions(+)
 
15
 
 
16
--- a/js/gdm/loginDialog.js
 
17
+++ b/js/gdm/loginDialog.js
 
18
@@ -708,6 +708,7 @@
 
19
                               x_align: St.Align.START });
 
20
         this._promptEntry = new St.Entry({ style_class: 'login-dialog-prompt-entry',
 
21
                                            can_focus: true });
 
22
+        this._promptEntryActivateId = 0;
 
23
         this._promptBox.add(this._promptEntry,
 
24
                             { expand: true,
 
25
                               x_fill: true,
 
26
@@ -913,6 +914,10 @@
 
27
 
 
28
                      function() {
 
29
                          this.setButtons(buttons);
 
30
+                         this._promptEntryActivateId =
 
31
+                             this._promptEntry.clutter_text.connect('activate', function() {
 
32
+                                 hold.release();
 
33
+                             });
 
34
                      },
 
35
 
 
36
                      hold];
 
37
@@ -930,6 +935,10 @@
 
38
                      },
 
39
 
 
40
                      function() {
 
41
+                         if (this._promptEntryActivateId > 0) {
 
42
+                                    this._promptEntry.clutter_text.disconnect(this._promptEntryActivateId);
 
43
+                                    this._promptEntryActivateId = 0;
 
44
+                                    }
 
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
 
50
@@ -146,6 +146,7 @@
 
51
 
 
52
         this._promptEntry = new St.Entry({ style_class: 'login-dialog-prompt-entry',
 
53
                                            can_focus: true });
 
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);