summaryrefslogtreecommitdiff
path: root/bin/caribou-preferences.in
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2011-04-24 16:57:28 -0700
committerEitan Isaacson <eitan@monotonous.org>2011-05-02 10:21:08 -0700
commite1ae6ee91507a47cbe2fe537f3107c17390bc0e2 (patch)
tree04ea360d747c6e489e50c9649fe33cd6723f83a8 /bin/caribou-preferences.in
parentf195b7aafa878568e7aae8ccc27e3716ae7c21cc (diff)
downloadcaribou-e1ae6ee91507a47cbe2fe537f3107c17390bc0e2.tar.gz
Major re-work of Python modules:
* Created Antler to use new keyboard model via PyGI * Rearanged settings to accomodate view/model seperation. * Created in preferences executable, it will be a standalone generic caribou settings UI where we will eventually get the important stuff in GNOME's control panel. * DBusified the UI.
Diffstat (limited to 'bin/caribou-preferences.in')
-rw-r--r--bin/caribou-preferences.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/bin/caribou-preferences.in b/bin/caribou-preferences.in
new file mode 100644
index 0000000..a745bab
--- /dev/null
+++ b/bin/caribou-preferences.in
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+
+import sys, os
+
+libs = os.path.join('@prefix@', 'lib', 'python@PYTHON_VERSION@', 'site-packages')
+
+# This might be run from the build dir.
+_dirname = os.path.dirname(__file__)
+if _dirname != "@prefix@/bin":
+ libs = os.path.normpath(os.path.join(_dirname, '..'))
+
+sys.path.insert(1, libs)
+
+from gi.repository import Gtk
+from caribou.settings.settings_manager import SettingsManager
+from caribou.settings import CaribouSettings
+from caribou.settings.preferences_window import PreferencesWindow
+
+import signal
+signal.signal(signal.SIGINT, signal.SIG_DFL)
+
+w = PreferencesWindow(CaribouSettings())
+
+w.connect("delete-event", lambda x, y: Gtk.main_quit())
+
+w.show_all()
+
+try:
+ Gtk.main()
+except KeyboardInterrupt:
+ Gtk.main_quit()
+