[gnome-initial-setup/shell/4765: 284/362] Hack keyboard detection to work outside Ubiquity
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/shell/4765: 284/362] Hack keyboard detection to work outside Ubiquity
- Date: Thu, 19 Mar 2015 01:44:57 +0000 (UTC)
commit f9cb498f35fb0ede8ca0c0c79c4d10fab2689138
Author: Roddy Shuler <roddy endlessm com>
Date: Tue Nov 25 15:32:37 2014 -0800
Hack keyboard detection to work outside Ubiquity
Assume all the files are in a single local directory,
and avoid the need for the string management framework.
[endlessm/eos-shell#3425]
keyboard-detector/keyboard_detector.py | 2 +-
keyboard-detector/keyboard_query.py | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/keyboard-detector/keyboard_detector.py b/keyboard-detector/keyboard_detector.py
index 5ff77df..9e1a4da 100644
--- a/keyboard-detector/keyboard_detector.py
+++ b/keyboard-detector/keyboard_detector.py
@@ -3,7 +3,7 @@ class KeyboardDetector:
def __init__(self):
self.current_step = -1
- f = '/usr/share/console-setup/pc105.tree'
+ f = 'pc105.tree'
self.fp = open(f)
# Dictionary of keycode -> step.
diff --git a/keyboard-detector/keyboard_query.py b/keyboard-detector/keyboard_query.py
index a33adad..69c9078 100644
--- a/keyboard-detector/keyboard_query.py
+++ b/keyboard-detector/keyboard_query.py
@@ -1,6 +1,9 @@
from gi.repository import Gtk, GObject, Gdk
-from ubiquity import keyboard_detector
+import keyboard_detector
+
+# FIXME replace with proper gettext translation support
+def _(message): return message
class Keyrow(Gtk.Box):
@@ -28,8 +31,7 @@ class KeyboardQuery(Gtk.Window):
def __init__(self, frontend):
Gtk.Window.__init__(self)
- self.set_title(
- frontend.get_string('ubiquity/text/keyboard_query_title'))
+ self.set_title(_("Detect Keyboard Layout..."))
self.set_keep_above(True)
self.set_modal(True)
self.set_border_width(20)
@@ -41,10 +43,8 @@ class KeyboardQuery(Gtk.Window):
self.vbox = Gtk.Box(spacing=10)
self.vbox.set_orientation(Gtk.Orientation.VERTICAL)
- self.press_string = \
- frontend.get_string('ubiquity/text/keyboard_query_press')
- self.present_string = \
- frontend.get_string('ubiquity/text/keyboard_query_present')
+ self.press_string = _("Please press one of the following keys:")
+ self.present_string = _("Is the following key present on your keyboard?")
self.heading = Gtk.Label(label=self.press_string)
self.heading.set_alignment(0, 0.5)
self.vbox.pack_start(self.heading, False, True, 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]