2 # -*- coding: utf-8 -*-
4 # Project: J-Ben, Python front-end
5 # File: tab_prefsother.py
7 # Created on: 28 Nov 2008
12 from preferences
import options
14 class TabPrefsOther(gtk
.VBox
):
16 gtk
.VBox
.__init
__(self
, spacing
= 5)
19 # Not sure what the os.name is under windows; the below is temporary.
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"
35 options
["config_save_target"] = s