~fioan89/slidewall/quickly_trunk

« back to all changes in this revision

Viewing changes to bin/slidewall

  • Committer: fioan89 at gmail
  • Date: 2013-06-09 18:13:43 UTC
  • Revision ID: fioan89@gmail.com-20130609181343-jc472vs3si41y2h0
Fix wallbase.cc plus vladstudio analog clocks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# with this program.  If not, see <http://www.gnu.org/licenses/>.
16
16
### END LICENSE
17
17
 
 
18
### DO NOT EDIT THIS FILE ###
 
19
 
18
20
import sys
19
21
import os
20
22
 
21
 
import gettext
22
 
from gettext import gettext as _
23
 
gettext.textdomain('slidewall')
 
23
import locale
 
24
locale.textdomain('slidewall')
24
25
 
25
26
# Add project root directory (enable symlink and trunk execution)
26
27
PROJECT_ROOT_DIRECTORY = os.path.abspath(
28
29
 
29
30
python_path = []
30
31
if os.path.abspath(__file__).startswith('/opt'):
 
32
    locale.bindtextdomain('slidewall', '/opt/extras.ubuntu.com/slidewall/share/locale')
31
33
    syspath = sys.path[:] # copy to avoid infinite loop in pending objects
32
34
    for path in syspath:
33
35
        opt_path = path.replace('/usr', '/opt/extras.ubuntu.com/slidewall')
34
36
        python_path.insert(0, opt_path)
35
37
        sys.path.insert(0, opt_path)
 
38
    os.putenv("XDG_DATA_DIRS", "%s:%s" % ("/opt/extras.ubuntu.com/slidewall/share/", os.getenv("XDG_DATA_DIRS", "/usr/local/share/:/usr/share/")))
36
39
if (os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'slidewall'))
37
40
    and PROJECT_ROOT_DIRECTORY not in sys.path):
38
41
    python_path.insert(0, PROJECT_ROOT_DIRECTORY)