Added "python setup.py install" to "make install".
[jben2_gui.git] / jben / interface / gtk / dialog / preferences / tab_prefsother.py
blobb974115c48035d07eac204db76953e673daded83
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 from __future__ import absolute_import
11 import gtk
12 import os
13 from jben import global_refs
16 class TabPrefsOther(gtk.VBox):
17 def __init__(self):
18 gtk.VBox.__init__(self, spacing = 5)
21 # Not sure what the os.name is under windows; the below is temporary.
22 if os.name == "nt":
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"
37 else: s = "home"
38 global_refs.app.prefs["config_save_target"] = s