2 # -*- coding: utf-8 -*-
4 # Project: J-Ben, Python front-end
5 # File: tab_prefsother.py
7 # Created on: 28 Nov 2008
9 from __future__
import absolute_import
13 from jben
import global_refs
16 class TabPrefsOther(gtk
.VBox
):
18 gtk
.VBox
.__init
__(self
, spacing
= 5)
21 # Not sure what the os.name is under windows; the below is temporary.
23 prefs
= global_refs
.app
.prefs
24 # Windows only: "mobile mode"
25 self
.chkMobile
= gtk
.CheckButton(
26 _("Mobile mode (settings saved to current directory)"))
27 self
.chkMobile
.set_active(
28 str(prefs
.get("config_save_target")) == "mobile")
29 self
.chkMobile
.connect("toggled", self
.on_mobile_toggle
)
30 self
.pack_start(self
.chkMobile
, expand
= False)
32 def on_mobile_toggle(self
, widget
):
33 print("TabPrefsOther.on_mobile_toggle")
35 def update_prefs(self
):
36 if self
.chkMobile
.get_active(): s
= "mobile"
38 global_refs
.app
.prefs
["config_save_target"] = s