config.py 718 Bytes
Newer Older
Danial Behzadi's avatar
Danial Behzadi committed
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/python3
# Released under GPLv3+ License
# Danial Behzadi<dani.behzi@ubuntu.com>, 2020

import gettext
import gi
import locale
import os
gi.require_versions({'Notify': '0.7', 'Handy': '1'})
from gi.repository import Gio, GLib, Notify, Handy

dconf = Gio.Settings.new("org.tractor")
Danial Behzadi's avatar
Danial Behzadi committed
13
s_data_dir = os.path.dirname(os.path.abspath(__file__))
Danial Behzadi's avatar
Danial Behzadi committed
14
15
16
17
18
19
20
21
locale_dir = s_data_dir+"/locales"
locale.setlocale(locale.LC_ALL, '')
locale.bindtextdomain('messages', locale_dir)
gettext.bindtextdomain('messages', locale_dir)
gettext.textdomain('messages')
_ = gettext.gettext
app_name = _("Carburetor")
app_comment = _("Settings for Tractor")
Danial Behzadi's avatar
Danial Behzadi committed
22
version = "3.2"
Danial Behzadi's avatar
Danial Behzadi committed
23
24
25
26

GLib.set_application_name(app_name)
Notify.init(app_name)
Handy.init()