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
=== modified file 'src/main-window.vala'
--- src/main-window.vala 2012-04-16 08:33:55 +0000
+++ src/main-window.vala 2012-06-30 04:44:19 +0000
@@ -225,4 +225,9 @@
225225
226 return true;226 return true;
227 }227 }
228
229 public void set_keyboard_state()
230 {
231 menubar.set_keyboard_state();
232 }
228}233}
229234
=== modified file 'src/menubar.vala'
--- src/menubar.vala 2012-03-21 20:00:39 +0000
+++ src/menubar.vala 2012-06-30 04:44:19 +0000
@@ -115,6 +115,15 @@
115 return false;115 return false;
116 }116 }
117117
118 /* Due to LP #973922 the keyboard has to be loaded after the main window
119 * is shown and given focus. Therefore we don't enable the active state
120 * until now.
121 */
122 public void set_keyboard_state()
123 {
124 onscreen_keyboard_item.set_active (UGSettings.get_boolean (UGSettings.KEY_ONSCREEN_KEYBOARD));
125 }
126
118 private string default_theme_name;127 private string default_theme_name;
119 private List<Indicator.Object> indicator_objects;128 private List<Indicator.Object> indicator_objects;
120 private Gtk.MenuItem keyboard_item;129 private Gtk.MenuItem keyboard_item;
@@ -122,6 +131,7 @@
122 private Gtk.Label keyboard_label = null;131 private Gtk.Label keyboard_label = null;
123 private Pid keyboard_pid = 0;132 private Pid keyboard_pid = 0;
124 private Gtk.Window? keyboard_window = null;133 private Gtk.Window? keyboard_window = null;
134 private Gtk.CheckMenuItem onscreen_keyboard_item;
125135
126 construct136 construct
127 {137 {
@@ -208,18 +218,17 @@
208 hbox.add (image);218 hbox.add (image);
209 a11y_item.show ();219 a11y_item.show ();
210 a11y_item.submenu = new Gtk.Menu ();220 a11y_item.submenu = new Gtk.Menu ();
211 var item = new Gtk.CheckMenuItem.with_label (_("Onscreen keyboard"));221 onscreen_keyboard_item = new Gtk.CheckMenuItem.with_label (_("Onscreen keyboard"));
212 item.toggled.connect (keyboard_toggled_cb);222 onscreen_keyboard_item.toggled.connect (keyboard_toggled_cb);
213 item.show ();223 onscreen_keyboard_item.show ();
214 a11y_item.submenu.append (item);224 a11y_item.submenu.append (onscreen_keyboard_item);
215 item.set_active (UGSettings.get_boolean (UGSettings.KEY_ONSCREEN_KEYBOARD));
216 high_contrast_item = new Gtk.CheckMenuItem.with_label (_("High Contrast"));225 high_contrast_item = new Gtk.CheckMenuItem.with_label (_("High Contrast"));
217 high_contrast_item.toggled.connect (high_contrast_toggled_cb);226 high_contrast_item.toggled.connect (high_contrast_toggled_cb);
218 high_contrast_item.add_accelerator ("activate", accel_group, Gdk.KEY_h, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);227 high_contrast_item.add_accelerator ("activate", accel_group, Gdk.KEY_h, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);
219 high_contrast_item.show ();228 high_contrast_item.show ();
220 a11y_item.submenu.append (high_contrast_item);229 a11y_item.submenu.append (high_contrast_item);
221 high_contrast_item.set_active (UGSettings.get_boolean (UGSettings.KEY_HIGH_CONTRAST));230 high_contrast_item.set_active (UGSettings.get_boolean (UGSettings.KEY_HIGH_CONTRAST));
222 item = new Gtk.CheckMenuItem.with_label (_("Screen Reader"));231 var item = new Gtk.CheckMenuItem.with_label (_("Screen Reader"));
223 item.toggled.connect (screen_reader_toggled_cb);232 item.toggled.connect (screen_reader_toggled_cb);
224 item.add_accelerator ("activate", accel_group, Gdk.KEY_s, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);233 item.add_accelerator ("activate", accel_group, Gdk.KEY_s, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);
225 item.show ();234 item.show ();
226235
=== modified file 'src/unity-greeter.vala'
--- src/unity-greeter.vala 2012-05-29 16:40:24 +0000
+++ src/unity-greeter.vala 2012-06-30 04:44:19 +0000
@@ -353,6 +353,7 @@
353 debug ("Showing main window");353 debug ("Showing main window");
354 main_window.show ();354 main_window.show ();
355 main_window.get_window ().focus (Gdk.CURRENT_TIME);355 main_window.get_window ().focus (Gdk.CURRENT_TIME);
356 main_window.set_keyboard_state();
356 }357 }
357358
358 private void show_message_cb (string text, LightDM.MessageType type)359 private void show_message_cb (string text, LightDM.MessageType type)

Subscribers

People subscribed via source and target branches