ability to use adtadir environment variable to set data directory
This commit is contained in:
parent
ed3de38ce5
commit
a4132ee58b
|
@ -24,7 +24,7 @@ if test $(id -u) -eq 0; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
datadir=@DATADIR@
|
||||
export datadir=@DATADIR@
|
||||
PYTHON_EXEC=@PYTHON@
|
||||
|
||||
cd ${datadir}/gajim/src
|
||||
|
|
|
@ -26,7 +26,7 @@ if test $(id -u) -eq 0; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
datadir=@DATADIR@
|
||||
export datadir=@DATADIR@
|
||||
PYTHON_EXEC=@PYTHON@
|
||||
|
||||
cd ${datadir}/gajim/src
|
||||
|
|
|
@ -114,7 +114,12 @@ class ConfigPaths:
|
|||
for n, p in zip(k, v):
|
||||
self.add_from_root(n, p)
|
||||
|
||||
self.add('DATA', os.path.join(u'..', windowsify(u'data')))
|
||||
datadir = ''
|
||||
if u'datadir' in os.environ:
|
||||
datadir = fse(os.environ[u'datadir'])
|
||||
if not datadir:
|
||||
datadir = u'..'
|
||||
self.add('DATA', os.path.join(datadir, windowsify(u'data')))
|
||||
self.add('HOME', fse(os.path.expanduser('~')))
|
||||
self.add('TMP', fse(tempfile.gettempdir()))
|
||||
|
||||
|
|
|
@ -999,9 +999,9 @@ class RosterWindow:
|
|||
if gajim.config.get('show_tunes_in_roster') \
|
||||
and ('artist' in gajim.connections[account].tune \
|
||||
or 'title' in gajim.connections[account].tune):
|
||||
path = os.path.join(gajim.DATA_DIR, 'emoticons', 'static', 'music.png')
|
||||
self.model[child_iter][C_TUNE_PIXBUF] = \
|
||||
gtk.gdk.pixbuf_new_from_file(
|
||||
'../data/emoticons/static/music.png')
|
||||
gtk.gdk.pixbuf_new_from_file(path)
|
||||
else:
|
||||
self.model[child_iter][C_TUNE_PIXBUF] = None
|
||||
|
||||
|
@ -1262,8 +1262,8 @@ class RosterWindow:
|
|||
jid = jid.decode('utf-8')
|
||||
contact = gajim.contacts.get_contact(account, jid)
|
||||
if 'artist' in contact.tune or 'title' in contact.tune:
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file(
|
||||
'../data/emoticons/static/music.png')
|
||||
path = os.path.join(gajim.DATA_DIR, 'emoticons', 'static', 'music.png')
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file(path)
|
||||
else:
|
||||
pixbuf = None
|
||||
for child_iter in iters:
|
||||
|
|
Loading…
Reference in New Issue