summaryrefslogtreecommitdiff
path: root/caribou
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2011-05-31 11:33:38 -0700
committerEitan Isaacson <eitan@monotonous.org>2011-06-01 12:47:01 -0700
commit22ed36c74597159cf4866abee35bb898127dea5a (patch)
tree8d69b0934a709fdc033fc0e91212866c2b2ec254 /caribou
parent6e333d1e0ac6bf25b70b16341bf70d3adc17137d (diff)
downloadcaribou-22ed36c74597159cf4866abee35bb898127dea5a.tar.gz
Have UI choose keyboard type.
Diffstat (limited to 'caribou')
-rw-r--r--caribou/antler/antler_settings.py9
-rw-r--r--caribou/antler/keyboard_view.py6
-rw-r--r--caribou/settings/caribou_settings.py14
3 files changed, 13 insertions, 16 deletions
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"),