Merge lp:~michael-sheldon/ubuntu-keyboard/further-emoji-improvements into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 286
Merged at revision: 297
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/further-emoji-improvements
Merge into: lp:ubuntu-keyboard
Diff against target: 342 lines (+9/-283)
5 files modified
plugins/emoji/qml/Keyboard_emoji_email.qml (+0/-93)
plugins/emoji/qml/Keyboard_emoji_url.qml (+0/-92)
plugins/emoji/qml/Keyboard_emoji_url_search.qml (+0/-94)
qml/Keyboard.qml (+8/-4)
qml/KeyboardContainer.qml (+1/-0)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/further-emoji-improvements
Reviewer Review Type Date Requested Status
Bill Filler (community) Needs Fixing
PS Jenkins bot continuous-integration Approve
Review via email: mp+246572@code.launchpad.net

Commit message

Allow Emoji keyboard to be shown for URL and email field types and switch out of Emoji layout when changing fields.

Description of the change

Allow Emoji keyboard to be shown for URL and email field types and switch out of Emoji layout when changing fields.

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

In a web form we are not automatically switching out of emoji layout when switching fields. This does however work in qml (tested in address-book-app)

review: Needs Fixing
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

This is being caused by bug 1416460 in oxide, whereby it doesn't consistently reset the input method when changing fields (which is the trigger we use to switch the emoji layout back); so I'd suggest we land the keyboard branch anyway, and fix the issue in oxide when possible.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added symlink 'plugins/emoji/qml/Keyboard_emoji_email.qml'
2=== target is u'Keyboard_emoji.qml'
3=== removed file 'plugins/emoji/qml/Keyboard_emoji_email.qml'
4--- plugins/emoji/qml/Keyboard_emoji_email.qml 2014-10-24 12:58:24 +0000
5+++ plugins/emoji/qml/Keyboard_emoji_email.qml 1970-01-01 00:00:00 +0000
6@@ -1,93 +0,0 @@
7-/*
8- * Copyright 2013 Canonical Ltd.
9- *
10- * This program is free software; you can redistribute it and/or modify
11- * it under the terms of the GNU Lesser General Public License as published by
12- * the Free Software Foundation; version 3.
13- *
14- * This program is distributed in the hope that it will be useful,
15- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17- * GNU Lesser General Public License for more details.
18- *
19- * You should have received a copy of the GNU Lesser General Public License
20- * along with this program. If not, see <http://www.gnu.org/licenses/>.
21- */
22-
23-import QtQuick 2.0
24-import "../../keys"
25-import "../../keys/key_constants.js" as UI
26-
27-KeyPad {
28- anchors.fill: parent
29-
30- content: c1
31- symbols: "languages/Keyboard_symbols.qml"
32-
33- Column {
34- id: c1
35- anchors.fill: parent
36- spacing: 0
37-
38- Row {
39- anchors.horizontalCenter: parent.horizontalCenter;
40- spacing: 0
41-
42- CharKey { label: "q"; shifted: "Q"; extended: ["1"]; extendedShifted: ["1"]; leftSide: true; }
43- CharKey { label: "w"; shifted: "W"; extended: ["2"]; extendedShifted: ["2"] }
44- CharKey { label: "e"; shifted: "E"; extended: ["3", "è", "é", "ê", "ë", "€"]; extendedShifted: ["3", "È","É", "Ê", "Ë", "€"] }
45- CharKey { label: "r"; shifted: "R"; extended: ["4"]; extendedShifted: ["4"] }
46- CharKey { label: "t"; shifted: "T"; extended: ["5", "þ"]; extendedShifted: ["5", "Þ"] }
47- CharKey { label: "y"; shifted: "Y"; extended: ["6", "ý", "¥"]; extendedShifted: ["6", "Ý", "¥"] }
48- CharKey { label: "u"; shifted: "U"; extended: ["7", "û","ù","ú","ü"]; extendedShifted: ["7", "Û","Ù","Ú","Ü"] }
49- CharKey { label: "i"; shifted: "I"; extended: ["8", "î","ï","ì","í"]; extendedShifted: ["8", "Î","Ï","Ì","Í"] }
50- CharKey { label: "o"; shifted: "O"; extended: ["9", "ö","ô","ò","ó"]; extendedShifted: ["9", "Ö","Ô","Ò","Ó"] }
51- CharKey { label: "p"; shifted: "P"; extended: ["0"]; extendedShifted: ["0"]; rightSide: true; }
52- }
53-
54- Row {
55- anchors.horizontalCenter: parent.horizontalCenter;
56- spacing: 0
57-
58- CharKey { label: "a"; shifted: "A"; extended: ["ä","à","â","á","ã","å"]; extendedShifted: ["Ä","À","Â","Á","Ã","Å"]; leftSide: true; }
59- CharKey { label: "s"; shifted: "S"; extended: ["ß","$"]; extendedShifted: ["$"] }
60- CharKey { label: "d"; shifted: "D"; extended: ["ð"]; extendedShifted: ["Ð"] }
61- CharKey { label: "f"; shifted: "F"; }
62- CharKey { label: "g"; shifted: "G"; }
63- CharKey { label: "h"; shifted: "H"; }
64- CharKey { label: "j"; shifted: "J"; }
65- CharKey { label: "k"; shifted: "K"; }
66- CharKey { label: "l"; shifted: "L"; rightSide: true; }
67- }
68-
69- Row {
70- anchors.horizontalCenter: parent.horizontalCenter;
71- spacing: 0
72-
73- ShiftKey {}
74- CharKey { label: "z"; shifted: "Z"; }
75- CharKey { label: "x"; shifted: "X"; }
76- CharKey { label: "c"; shifted: "C"; extended: ["ç"]; extendedShifted: ["Ç"] }
77- CharKey { label: "v"; shifted: "V"; }
78- CharKey { label: "b"; shifted: "B"; }
79- CharKey { label: "n"; shifted: "N"; extended: ["ñ"]; extendedShifted: ["Ñ"] }
80- CharKey { label: "m"; shifted: "M"; }
81- BackspaceKey {}
82- }
83-
84- Item {
85- anchors.left: parent.left
86- anchors.right: parent.right
87-
88- height: panel.keyHeight + units.gu(UI.row_margin);
89-
90- SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; height: parent.height; }
91- LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; height: parent.height; }
92- CharKey { id: atKey; label: "@"; shifted: "@"; anchors.left: languageMenuButton.right; height: parent.height; }
93- SpaceKey { id: spaceKey; anchors.left: atKey.right; anchors.right: urlKey.left; noMagnifier: true; height: parent.height; }
94- UrlKey { id: urlKey; label: ".com"; extended: [".co.uk", ".net", ".org", ".edu", ".gov", ".ac.uk"]; anchors.right: dotKey.left; height: parent.height; }
95- CharKey { id: dotKey; label: "."; shifted: "."; extended: ["?", "!"]; extendedShifted: ["?", "!"]; anchors.right: enterKey.left; height: parent.height; }
96- ReturnKey { id: enterKey; anchors.right: parent.right; height: parent.height; }
97- }
98- } // column
99-}
100
101=== added symlink 'plugins/emoji/qml/Keyboard_emoji_url.qml'
102=== target is u'Keyboard_emoji.qml'
103=== removed file 'plugins/emoji/qml/Keyboard_emoji_url.qml'
104--- plugins/emoji/qml/Keyboard_emoji_url.qml 2014-10-24 12:58:24 +0000
105+++ plugins/emoji/qml/Keyboard_emoji_url.qml 1970-01-01 00:00:00 +0000
106@@ -1,92 +0,0 @@
107-/*
108- * Copyright 2013 Canonical Ltd.
109- *
110- * This program is free software; you can redistribute it and/or modify
111- * it under the terms of the GNU Lesser General Public License as published by
112- * the Free Software Foundation; version 3.
113- *
114- * This program is distributed in the hope that it will be useful,
115- * but WITHOUT ANY WARRANTY; without even the implied warranty of
116- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
117- * GNU Lesser General Public License for more details.
118- *
119- * You should have received a copy of the GNU Lesser General Public License
120- * along with this program. If not, see <http://www.gnu.org/licenses/>.
121- */
122-
123-import QtQuick 2.0
124-import "../../keys"
125-import "../../keys/key_constants.js" as UI
126-
127-KeyPad {
128- anchors.fill: parent
129-
130- content: c1
131- symbols: "languages/Keyboard_symbols.qml"
132-
133- Column {
134- id: c1
135- anchors.fill: parent
136- spacing: 0
137-
138- Row {
139- anchors.horizontalCenter: parent.horizontalCenter;
140- spacing: 0
141-
142- CharKey { label: "q"; shifted: "Q"; extended: ["1"]; extendedShifted: ["1"]; leftSide: true; }
143- CharKey { label: "w"; shifted: "W"; extended: ["2"]; extendedShifted: ["2"] }
144- CharKey { label: "e"; shifted: "E"; extended: ["3", "è", "é", "ê", "ë", "€"]; extendedShifted: ["3", "È","É", "Ê", "Ë", "€"] }
145- CharKey { label: "r"; shifted: "R"; extended: ["4"]; extendedShifted: ["4"] }
146- CharKey { label: "t"; shifted: "T"; extended: ["5", "þ"]; extendedShifted: ["5", "Þ"] }
147- CharKey { label: "y"; shifted: "Y"; extended: ["6", "ý", "¥"]; extendedShifted: ["6", "Ý", "¥"] }
148- CharKey { label: "u"; shifted: "U"; extended: ["7", "û","ù","ú","ü"]; extendedShifted: ["7", "Û","Ù","Ú","Ü"] }
149- CharKey { label: "i"; shifted: "I"; extended: ["8", "î","ï","ì","í"]; extendedShifted: ["8", "Î","Ï","Ì","Í"] }
150- CharKey { label: "o"; shifted: "O"; extended: ["9", "ö","ô","ò","ó"]; extendedShifted: ["9", "Ö","Ô","Ò","Ó"] }
151- CharKey { label: "p"; shifted: "P"; extended: ["0"]; extendedShifted: ["0"]; rightSide: true; }
152- }
153-
154- Row {
155- anchors.horizontalCenter: parent.horizontalCenter;
156- spacing: 0
157-
158- CharKey { label: "a"; shifted: "A"; extended: ["ä","à","â","á","ã","å"]; extendedShifted: ["Ä","À","Â","Á","Ã","Å"]; leftSide: true; }
159- CharKey { label: "s"; shifted: "S"; extended: ["ß","$"]; extendedShifted: ["$"] }
160- CharKey { label: "d"; shifted: "D"; extended: ["ð"]; extendedShifted: ["Ð"] }
161- CharKey { label: "f"; shifted: "F"; }
162- CharKey { label: "g"; shifted: "G"; }
163- CharKey { label: "h"; shifted: "H"; }
164- CharKey { label: "j"; shifted: "J"; }
165- CharKey { label: "k"; shifted: "K"; }
166- CharKey { label: "l"; shifted: "L"; rightSide: true; }
167- }
168-
169- Row {
170- anchors.horizontalCenter: parent.horizontalCenter;
171- spacing: 0
172-
173- ShiftKey {}
174- CharKey { label: "z"; shifted: "Z"; }
175- CharKey { label: "x"; shifted: "X"; }
176- CharKey { label: "c"; shifted: "C"; extended: ["ç"]; extendedShifted: ["Ç"] }
177- CharKey { label: "v"; shifted: "V"; }
178- CharKey { label: "b"; shifted: "B"; }
179- CharKey { label: "n"; shifted: "N"; extended: ["ñ"]; extendedShifted: ["Ñ"] }
180- CharKey { label: "m"; shifted: "M"; }
181- BackspaceKey {}
182- }
183-
184- Item {
185- anchors.left: parent.left
186- anchors.right: parent.right
187-
188- height: panel.keyHeight + units.gu(UI.row_margin);
189-
190- SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; height: parent.height; }
191- LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; height: parent.height; }
192- CharKey { id: slashKey; label: "/"; shifted: "/"; anchors.left: languageMenuButton.right; height: parent.height; }
193- UrlKey { id: urlKey; label: ".com"; extended: [".co.uk", ".net", ".org", ".edu", ".gov", ".ac.uk"]; anchors.right: dotKey.left; height: parent.height; }
194- CharKey { id: dotKey; label: "."; shifted: "."; extended: ["?", "!"]; extendedShifted: ["?", "!"]; anchors.right: enterKey.left; height: parent.height; }
195- ReturnKey { id: enterKey; anchors.right: parent.right; height: parent.height; }
196- }
197- } // column
198-}
199
200=== added symlink 'plugins/emoji/qml/Keyboard_emoji_url_search.qml'
201=== target is u'Keyboard_emoji.qml'
202=== removed file 'plugins/emoji/qml/Keyboard_emoji_url_search.qml'
203--- plugins/emoji/qml/Keyboard_emoji_url_search.qml 2014-10-24 12:58:24 +0000
204+++ plugins/emoji/qml/Keyboard_emoji_url_search.qml 1970-01-01 00:00:00 +0000
205@@ -1,94 +0,0 @@
206-/*
207- * Copyright 2013 Canonical Ltd.
208- *
209- * This program is free software; you can redistribute it and/or modify
210- * it under the terms of the GNU Lesser General Public License as published by
211- * the Free Software Foundation; version 3.
212- *
213- * This program is distributed in the hope that it will be useful,
214- * but WITHOUT ANY WARRANTY; without even the implied warranty of
215- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
216- * GNU Lesser General Public License for more details.
217- *
218- * You should have received a copy of the GNU Lesser General Public License
219- * along with this program. If not, see <http://www.gnu.org/licenses/>.
220- */
221-
222-import QtQuick 2.0
223-import "../../keys"
224-import "../../keys/key_constants.js" as UI
225-
226-KeyPad {
227- anchors.fill: parent
228-
229- content: c1
230- symbols: "languages/Keyboard_symbols.qml"
231-
232- Column {
233- id: c1
234- anchors.fill: parent
235-
236- spacing: 0
237-
238- Row {
239- anchors.horizontalCenter: parent.horizontalCenter;
240- spacing: 0
241-
242- CharKey { label: "q"; shifted: "Q"; extended: ["1"]; extendedShifted: ["1"]; leftSide: true; }
243- CharKey { label: "w"; shifted: "W"; extended: ["2"]; extendedShifted: ["2"] }
244- CharKey { label: "e"; shifted: "E"; extended: ["3", "è", "é", "ê", "ë", "€"]; extendedShifted: ["3", "È","É", "Ê", "Ë", "€"] }
245- CharKey { label: "r"; shifted: "R"; extended: ["4"]; extendedShifted: ["4"] }
246- CharKey { label: "t"; shifted: "T"; extended: ["5", "þ"]; extendedShifted: ["5", "Þ"] }
247- CharKey { label: "y"; shifted: "Y"; extended: ["6", "ý", "¥"]; extendedShifted: ["6", "Ý", "¥"] }
248- CharKey { label: "u"; shifted: "U"; extended: ["7", "û","ù","ú","ü"]; extendedShifted: ["7", "Û","Ù","Ú","Ü"] }
249- CharKey { label: "i"; shifted: "I"; extended: ["8", "î","ï","ì","í"]; extendedShifted: ["8", "Î","Ï","Ì","Í"] }
250- CharKey { label: "o"; shifted: "O"; extended: ["9", "ö","ô","ò","ó"]; extendedShifted: ["9", "Ö","Ô","Ò","Ó"] }
251- CharKey { label: "p"; shifted: "P"; extended: ["0"]; extendedShifted: ["0"]; rightSide: true; }
252- }
253-
254- Row {
255- anchors.horizontalCenter: parent.horizontalCenter;
256- spacing: 0
257-
258- CharKey { label: "a"; shifted: "A"; extended: ["ä","à","â","á","ã","å"]; extendedShifted: ["Ä","À","Â","Á","Ã","Å"]; leftSide: true; }
259- CharKey { label: "s"; shifted: "S"; extended: ["ß","$"]; extendedShifted: ["$"] }
260- CharKey { label: "d"; shifted: "D"; extended: ["ð"]; extendedShifted: ["Ð"] }
261- CharKey { label: "f"; shifted: "F"; }
262- CharKey { label: "g"; shifted: "G"; }
263- CharKey { label: "h"; shifted: "H"; }
264- CharKey { label: "j"; shifted: "J"; }
265- CharKey { label: "k"; shifted: "K"; }
266- CharKey { label: "l"; shifted: "L"; rightSide: true; }
267- }
268-
269- Row {
270- anchors.horizontalCenter: parent.horizontalCenter;
271- spacing: 0
272-
273- ShiftKey {}
274- CharKey { label: "z"; shifted: "Z"; }
275- CharKey { label: "x"; shifted: "X"; }
276- CharKey { label: "c"; shifted: "C"; extended: ["ç"]; extendedShifted: ["Ç"] }
277- CharKey { label: "v"; shifted: "V"; }
278- CharKey { label: "b"; shifted: "B"; }
279- CharKey { label: "n"; shifted: "N"; extended: ["ñ"]; extendedShifted: ["Ñ"] }
280- CharKey { label: "m"; shifted: "M"; }
281- BackspaceKey {}
282- }
283-
284- Item {
285- anchors.left: parent.left
286- anchors.right: parent.right
287-
288- height: panel.keyHeight + units.gu(UI.row_margin);
289-
290- SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; height: parent.height; }
291- LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; height: parent.height; }
292- CharKey { id: slashKey; label: "/"; shifted: "/"; anchors.left: languageMenuButton.right; height: parent.height; }
293- SpaceKey { id: spaceKey; anchors.left: slashKey.right; anchors.right: urlKey.left; noMagnifier: true; height: parent.height; }
294- UrlKey { id: urlKey; label: ".com"; extended: [".co.uk", ".net", ".org", ".edu", ".gov", ".ac.uk"]; anchors.right: dotKey.left; height: parent.height; }
295- CharKey { id: dotKey; label: "."; shifted: "."; extended: ["?", "!"]; extendedShifted: ["?", "!"]; anchors.right: enterKey.left; height: parent.height; }
296- ReturnKey { id: enterKey; anchors.right: parent.right; height: parent.height; }
297- }
298- } // column
299-}
300
301=== modified file 'qml/Keyboard.qml'
302--- qml/Keyboard.qml 2015-01-12 16:22:37 +0000
303+++ qml/Keyboard.qml 2015-01-15 14:02:25 +0000
304@@ -231,10 +231,6 @@
305 keypad.closeExtendedKeys();
306 keypad.activeKeypadState = "NORMAL";
307 keypad.state = "CHARACTERS";
308- if (keypad.switchBack && keypad.previousLanguage) {
309- keypad.switchBack = false;
310- maliit_input_method.activeLanguage = keypad.previousLanguage;
311- }
312 maliit_input_method.close();
313 canvas.hidingComplete = true;
314 reportKeyboardVisibleRect();
315@@ -260,8 +256,16 @@
316 }
317 }
318
319+ onActiveLanguageChanged: {
320+ keypad.justChangedLanguage = true
321+ }
322 onKeyboardReset: {
323 keypad.state = "CHARACTERS"
324+ if (keypad.switchBack && keypad.previousLanguage && !keypad.justChangedLanguage) {
325+ keypad.switchBack = false;
326+ maliit_input_method.activeLanguage = keypad.previousLanguage;
327+ }
328+ keypad.justChangedLanguage = false;
329 }
330 onDeactivateAutocaps: {
331 if(keypad.autoCapsTriggered) {
332
333=== modified file 'qml/KeyboardContainer.qml'
334--- qml/KeyboardContainer.qml 2015-01-12 13:30:44 +0000
335+++ qml/KeyboardContainer.qml 2015-01-15 14:02:25 +0000
336@@ -35,6 +35,7 @@
337 property alias popoverEnabled: extendedKeysSelector.enabled
338 property string previousLanguage
339 property bool switchBack: false // Switch back to the previous layout without showing the language menu
340+ property bool justChangedLanguage: true // Don't switch back languages during language switch process
341
342 state: "CHARACTERS"
343

Subscribers

People subscribed via source and target branches