From 22ed36c74597159cf4866abee35bb898127dea5a Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Tue, 31 May 2011 11:33:38 -0700 Subject: Have UI choose keyboard type. --- caribou/antler/antler_settings.py | 9 +++++++++ caribou/antler/keyboard_view.py | 6 +++--- caribou/settings/caribou_settings.py | 14 +------------- 3 files changed, 13 insertions(+), 16 deletions(-) (limited to 'caribou') diff --git a/caribou/antler/antler_settings.py b/caribou/antler/antler_settings.py index 703a7fd..da8ac2f 100644 --- a/caribou/antler/antler_settings.py +++ b/caribou/antler/antler_settings.py @@ -5,6 +5,15 @@ AntlerSettings = SettingsTopGroup( _("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler", [SettingsGroup("antler", _("Antler"), [ SettingsGroup("appearance", _("Appearance"), [ + StringSetting( + "keyboard_type", _("Keyboard Type"), "touch", + _("The keyboard geometery Caribou should use"), + _("The keyboard geometery determines the shape " + "and complexity of the keyboard, it could range from " + "a 'natural' look and feel good for composing simple " + "text, to a fullscale keyboard."), + allowed=[(('touch'), _('Touch')), + (('scan'), _('Scan'))]), BooleanSetting("use_system", _("Use System Theme"), True, _("Use System Theme")), FloatSetting("min_alpha", _("Minimum Alpha"), diff --git a/caribou/antler/keyboard_view.py b/caribou/antler/keyboard_view.py index 9402f36..385a636 100644 --- a/caribou/antler/keyboard_view.py +++ b/caribou/antler/keyboard_view.py @@ -227,16 +227,16 @@ class AntlerLayout(Gtk.HBox): class AntlerKeyboardView(Gtk.Notebook): def __init__(self): gobject.GObject.__init__(self) + settings = AntlerSettings() self.set_show_tabs(False) - self.keyboard_model = Caribou.KeyboardModel() + self.keyboard_model = Caribou.KeyboardModel( + keyboard_type=settings.keyboard_type.value) self.scanner = Caribou.Scanner() self.scanner.set_keyboard(self.keyboard_model) self.keyboard_model.connect("notify::active-group", self._on_group_changed) self.layers = {} - - settings = AntlerSettings() use_system = settings.use_system use_system.connect("value-changed", self._on_use_system_theme_changed) diff --git a/caribou/settings/caribou_settings.py b/caribou/settings/caribou_settings.py index 3d2c219..f3f9b00 100644 --- a/caribou/settings/caribou_settings.py +++ b/caribou/settings/caribou_settings.py @@ -3,19 +3,7 @@ from caribou.i18n import _ CaribouSettings = SettingsTopGroup( _("Caribou Preferences"), "/org/gnome/caribou/", "org.gnome.caribou", - [SettingsGroup("keyboard", _("Keyboard"), [ - SettingsGroup("general", _("General"), [ - StringSetting( - "keyboard_type", _("Keyboard Type"), "touch", - _("The keyboard geometery Caribou should use"), - _("The keyboard geometery determines the shape " - "and complexity of the keyboard, it could range from " - "a 'natural' look and feel good for composing simple " - "text, to a fullscale keyboard."), - allowed=[(('touch'), _('Touch')), - (('scan'), _('Scan'))])]), - ]), - SettingsGroup("scanning", _("Scanning"), [ + [SettingsGroup("scanning", _("Scanning"), [ BooleanSetting( "scan_enabled", _("Enable scanning"), False, _("Enable switch scanning"), -- cgit v1.2.1