Directory restructuring. No tests yet done.
[jben2_gui.git] / jben / gui / tab_prefsother.py
blobcd2aae91d98287e00582d145023e2c6a17d7b68b
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 # Project: J-Ben, Python front-end
5 # File: tab_prefsother.py
6 # Author: Paul Goins
7 # Created on: 28 Nov 2008
9 import gtk
10 import os
12 from preferences import options
14 class TabPrefsOther(gtk.VBox):
15 def __init__(self):
16 gtk.VBox.__init__(self, spacing = 5)
19 # Not sure what the os.name is under windows; the below is temporary.
20 if os.name == "nt":
21 # Windows only: "mobile mode"
22 self.chkMobile = gtk.CheckButton(
23 _("Mobile mode (settings saved to current directory)"))
24 self.chkMobile.set_active(
25 str(options.get("config_save_target")) == "mobile")
26 self.chkMobile.connect("toggled", self.on_mobile_toggle)
27 self.pack_start(self.chkMobile, expand = False)
29 def on_mobile_toggle(self, widget):
30 print("TabPrefsOther.on_mobile_toggle")
32 def update_prefs(self):
33 if self.chkMobile.get_active(): s = "mobile"
34 else: s = "home"
35 options["config_save_target"] = s