2
from os.path import join, exists, isdir, isfile, dirname, abspath, expanduser
4
import gtk, gtk.gdk, gconf
6
# Autotools set the actual data_dir in defs.py
10
# Allows to load uninstalled .la libs
15
# Allow to use uninstalled deskbar --------------------------------------------
16
UNINSTALLED_COLORBLIND = False
18
return exists(path) and isdir(path) and isfile(path+"/AUTHORS")
20
name = join(dirname(__file__), '..')
22
UNINSTALLED_COLORBLIND = True
24
# Sets SHARED_DATA_DIR to local copy, or the system location
25
# Shared data dir is most the time /usr/share/colorblind-applet
26
if UNINSTALLED_COLORBLIND:
27
SHARED_DATA_DIR = abspath(join(dirname(__file__), 'data'))
29
SHARED_DATA_DIR = join(DATA_DIR, "colorblind")
30
print "Data Dir: %s" % SHARED_DATA_DIR
32
# Set the cwd to the home directory so spawned processes behave correctly
33
# when presenting save/open dialogs
34
os.chdir(expanduser("~"))
36
# Path to images, icons
37
ART_DATA_DIR = join(SHARED_DATA_DIR, "art")
38
# Default icon size in the entry
43
GCONF_CLIENT = gconf.client_get_default()
45
# GConf directory for colorblind in window mode and shared settings
46
GCONF_DIR = "/apps/colorblind"
48
# GConf key for global keybinding
49
GCONF_KEYBINDING_ONOFF = GCONF_DIR + "/keybinding_on_off"
50
GCONF_KEYBINDING_SWITCH = GCONF_DIR + "/keybinding_switch"
52
#GConf key for colorblind filter
53
GCONF_COLORBLIND_FILTER = GCONF_DIR + "/colorblind_filter"
55
#GConf key for default colorblind filter
56
GCONF_DEFAULT_FILTER = GCONF_DIR + "/default_filter"
58
#GConf key for combobox check to change default filter
59
GCONF_CHECK_DEFAULT = GCONF_DIR + "/check_default"
61
# Global overrides for command line mode