Merge lp:~attente/indicator-keyboard/lp1226962 into lp:indicator-keyboard

Proposed by William Hua
Status: Merged
Approved by: Ted Gould
Approved revision: 133
Merged at revision: 133
Proposed branch: lp:~attente/indicator-keyboard/lp1226962
Merge into: lp:indicator-keyboard
Diff against target: 48 lines (+20/-18)
1 file modified
lib/main.vala (+20/-18)
To merge this branch: bzr merge lp:~attente/indicator-keyboard/lp1226962
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+190163@code.launchpad.net

Commit message

Don't set LightDM's layout if we're in a session. (LP: 1226962)

Description of the change

Don't set LightDM's layout if we're in a session. (LP: 1226962)

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
Ted Gould (ted) wrote :

Makes sense to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/main.vala'
2--- lib/main.vala 2013-10-02 18:53:12 +0000
3+++ lib/main.vala 2013-10-09 15:25:40 +0000
4@@ -436,24 +436,26 @@
5
6 [DBus (visible = false)]
7 private void update_login_layout () {
8- unowned List<LightDM.Layout> layouts = LightDM.get_layouts ();
9- var current = source_settings.get_uint ("current");
10-
11- if (current < get_sources ().length) {
12- var source = get_sources ()[current];
13- string? name = null;
14-
15- if (source.layout != null && source.variant != null) {
16- name = @"$((!) source.layout)\t$((!) source.variant)";
17- } else if (source.layout != null) {
18- name = source.layout;
19- }
20-
21- if (name != null) {
22- foreach (var layout in layouts) {
23- if (layout.name == (!) name) {
24- LightDM.set_layout (layout);
25- break;
26+ if (is_login_user ()) {
27+ unowned List<LightDM.Layout> layouts = LightDM.get_layouts ();
28+ var current = source_settings.get_uint ("current");
29+
30+ if (current < get_sources ().length) {
31+ var source = get_sources ()[current];
32+ string? name = null;
33+
34+ if (source.layout != null && source.variant != null) {
35+ name = @"$((!) source.layout)\t$((!) source.variant)";
36+ } else if (source.layout != null) {
37+ name = source.layout;
38+ }
39+
40+ if (name != null) {
41+ foreach (var layout in layouts) {
42+ if (layout.name == (!) name) {
43+ LightDM.set_layout (layout);
44+ break;
45+ }
46 }
47 }
48 }

Subscribers

People subscribed via source and target branches

to all changes: