Merge lp:~thomas-moenicke/ubuntu-keyboard/ubuntu-keyboard-fix-loader into lp:ubuntu-keyboard

Proposed by Thomas Moenicke
Status: Merged
Approved by: Bill Filler
Approved revision: 58
Merged at revision: 59
Proposed branch: lp:~thomas-moenicke/ubuntu-keyboard/ubuntu-keyboard-fix-loader
Merge into: lp:ubuntu-keyboard
Diff against target: 51 lines (+9/-20)
1 file modified
qml/KeyboardContainer.qml (+9/-20)
To merge this branch: bzr merge lp:~thomas-moenicke/ubuntu-keyboard/ubuntu-keyboard-fix-loader
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+188878@code.launchpad.net

Commit message

using only one loader for character and symbol layouts

Description of the change

using only one loader for character and symbol layouts

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/KeyboardContainer.qml'
2--- qml/KeyboardContainer.qml 2013-10-01 13:28:13 +0000
3+++ qml/KeyboardContainer.qml 2013-10-02 16:07:30 +0000
4@@ -26,7 +26,7 @@
5
6 property Item activeKeypad: characterKeypadLoader.item
7 property string characterKeypadSource: ""
8- property string symbolKeypadSource: ""
9+ property string symbolKeypadSource: activeKeypad ? activeKeypad.symbols : ""
10
11 state: "CHARACTERS"
12
13@@ -46,30 +46,19 @@
14 characterKeypadSource = "languages/Keyboard_zh_cn_pinyin.qml";
15 }
16
17+ onCharacterKeypadSourceChanged: {
18+ panel.state = "CHARACTERS"
19+ }
20+
21+ Component.onCompleted: symbolKeypadSource = activeKeypad.symbols;
22+
23 Loader {
24 id: characterKeypadLoader
25 objectName: "characterKeyPadLoader"
26 anchors.fill: parent
27 asynchronous: false
28- enabled: panel.state === "CHARACTERS" ? true : false
29- opacity: panel.state === "CHARACTERS" ? 1 : 0
30- source: characterKeypadSource
31- onLoaded: {
32- symbolKeypadSource = activeKeypad.symbols
33- panel.state = "CHARACTERS"
34- }
35- }
36-
37- Loader {
38- id: symbolKeypadLoader
39- objectName: "symbolKeyPadLoader"
40- anchors.fill: parent
41- enabled: panel.state === "SYMBOLS" ? true : false
42- opacity: panel.state == "SYMBOLS" ? 1 : 0
43- source: symbolKeypadSource
44- asynchronous: false
45- }
46-
47+ source: panel.state === "CHARACTERS" ? characterKeypadSource : symbolKeypadSource
48+ }
49
50 states: [
51 State {

Subscribers

People subscribed via source and target branches