Merge lp:~mfisch/unity-greeter/unity-greeter-lp973922 into lp:unity-greeter

Proposed by Matt Fischer
Status: Merged
Merged at revision: 479
Proposed branch: lp:~mfisch/unity-greeter/unity-greeter-lp973922
Merge into: lp:unity-greeter
Diff against target: 77 lines (+21/-6)
3 files modified
src/main-window.vala (+5/-0)
src/menubar.vala (+15/-6)
src/unity-greeter.vala (+1/-0)
To merge this branch: bzr merge lp:~mfisch/unity-greeter/unity-greeter-lp973922
Reviewer Review Type Date Requested Status
Unity Greeter Development Team Pending
Review via email: mp+112887@code.launchpad.net

Description of the change

This fixes the issue where the keyboard doesn't autoshow if it's selected when the greeter starts (selected from before). Since there's no WM here managing stuff this seems like the best solution

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/main-window.vala'
2--- src/main-window.vala 2012-04-16 08:33:55 +0000
3+++ src/main-window.vala 2012-06-30 04:44:19 +0000
4@@ -225,4 +225,9 @@
5
6 return true;
7 }
8+
9+ public void set_keyboard_state()
10+ {
11+ menubar.set_keyboard_state();
12+ }
13 }
14
15=== modified file 'src/menubar.vala'
16--- src/menubar.vala 2012-03-21 20:00:39 +0000
17+++ src/menubar.vala 2012-06-30 04:44:19 +0000
18@@ -115,6 +115,15 @@
19 return false;
20 }
21
22+ /* Due to LP #973922 the keyboard has to be loaded after the main window
23+ * is shown and given focus. Therefore we don't enable the active state
24+ * until now.
25+ */
26+ public void set_keyboard_state()
27+ {
28+ onscreen_keyboard_item.set_active (UGSettings.get_boolean (UGSettings.KEY_ONSCREEN_KEYBOARD));
29+ }
30+
31 private string default_theme_name;
32 private List<Indicator.Object> indicator_objects;
33 private Gtk.MenuItem keyboard_item;
34@@ -122,6 +131,7 @@
35 private Gtk.Label keyboard_label = null;
36 private Pid keyboard_pid = 0;
37 private Gtk.Window? keyboard_window = null;
38+ private Gtk.CheckMenuItem onscreen_keyboard_item;
39
40 construct
41 {
42@@ -208,18 +218,17 @@
43 hbox.add (image);
44 a11y_item.show ();
45 a11y_item.submenu = new Gtk.Menu ();
46- var item = new Gtk.CheckMenuItem.with_label (_("Onscreen keyboard"));
47- item.toggled.connect (keyboard_toggled_cb);
48- item.show ();
49- a11y_item.submenu.append (item);
50- item.set_active (UGSettings.get_boolean (UGSettings.KEY_ONSCREEN_KEYBOARD));
51+ onscreen_keyboard_item = new Gtk.CheckMenuItem.with_label (_("Onscreen keyboard"));
52+ onscreen_keyboard_item.toggled.connect (keyboard_toggled_cb);
53+ onscreen_keyboard_item.show ();
54+ a11y_item.submenu.append (onscreen_keyboard_item);
55 high_contrast_item = new Gtk.CheckMenuItem.with_label (_("High Contrast"));
56 high_contrast_item.toggled.connect (high_contrast_toggled_cb);
57 high_contrast_item.add_accelerator ("activate", accel_group, Gdk.KEY_h, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);
58 high_contrast_item.show ();
59 a11y_item.submenu.append (high_contrast_item);
60 high_contrast_item.set_active (UGSettings.get_boolean (UGSettings.KEY_HIGH_CONTRAST));
61- item = new Gtk.CheckMenuItem.with_label (_("Screen Reader"));
62+ var item = new Gtk.CheckMenuItem.with_label (_("Screen Reader"));
63 item.toggled.connect (screen_reader_toggled_cb);
64 item.add_accelerator ("activate", accel_group, Gdk.KEY_s, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);
65 item.show ();
66
67=== modified file 'src/unity-greeter.vala'
68--- src/unity-greeter.vala 2012-05-29 16:40:24 +0000
69+++ src/unity-greeter.vala 2012-06-30 04:44:19 +0000
70@@ -353,6 +353,7 @@
71 debug ("Showing main window");
72 main_window.show ();
73 main_window.get_window ().focus (Gdk.CURRENT_TIME);
74+ main_window.set_keyboard_state();
75 }
76
77 private void show_message_cb (string text, LightDM.MessageType type)

Subscribers

People subscribed via source and target branches