summaryrefslogtreecommitdiff
path: root/src/d-feet.in
blob: 55e3c53b309ccaf3da20ae6d20d579325d5c9f0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!@PYTHON@
# -*- coding: utf-8 -*-

# Copyright (C) 2013 Thomas Bechtold <thomasbechtold@jpberlin.de>

# This file is part of d-feet.

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.


#import os
#gi_typelib_path = ["@pkglibdir@/girepository-1.0",]
#if 'GI_TYPELIB_PATH' in os.environ:
#    gi_typelib_path.append(os.environ['GI_TYPELIB_PATH'])
#os.environ['GI_TYPELIB_PATH'] = ":".join(gi_typelib_path)

#ld_library_path = ["@pkglibdir@",]
#if 'LD_LIBRARY_PATH' in os.environ:
#    ld_library_path.append(os.environ['LD_LIBRARY_PATH'])
#os.environ['LD_LIBRARY_PATH'] = ":".join(ld_library_path)

import os
import sys
sys.path.insert(1, '@pythondir@')

import gettext, locale
from gettext import gettext as _
gettext.textdomain("@GETTEXT_PACKAGE@")
locale.textdomain("@GETTEXT_PACKAGE@")

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GObject
from dfeet.application import DFeetApp


if __name__ == "__main__":
    data_dir = "@pkgdatadir@"
    #use local paths when debugging
    if os.getenv("DFEET_DEBUG") is not None:
        data_dir = os.path.join(os.path.dirname(__file__), "..", "data")
        Gtk.IconTheme.get_default().prepend_search_path(
            os.path.join(os.path.dirname(__file__), "..", "data", "icons"))
    #start the application
    app = DFeetApp(package="@PACKAGE_NAME@", version="@PACKAGE_VERSION@", data_dir=data_dir)
    sys.exit(app.run(sys.argv))