-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpubliphoto.py
executable file
·43 lines (34 loc) · 1.1 KB
/
publiphoto.py
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from gi.repository import Gtk, GObject, Gdk, GLib
from src.gui.mainwindow import MainWindow
import os
import locale
import os
import sys
import gettext
######
# PubliPhoto version alpha 1.0
# Créé par Olivier Radisson
# Licence : GNU GPL v3 ou suppérieure
# Contact : contacter [dot] oradisson [dot] fr
######
# setup translation support
(lang_code, encoding) = locale.getlocale()
LOCALE_DOMAIN = 'publiphoto'
LOCALE_DIR = os.path.join(sys.prefix, 'share', 'locale')
gettext.bindtextdomain(LOCALE_DOMAIN, LOCALE_DIR) # (1)
gettext.textdomain(LOCALE_DOMAIN) # (2)
gettext.install(LOCALE_DOMAIN) # (3)
# Gtk.bindtextdomain(LOCALE_DOMAIN, LOCALE_DIR) # (4)
# Gtk.textdomain(LOCALE_DOMAIN) # (5)
# Set the current directory to match files
os.chdir(os.path.dirname(os.path.abspath(__file__)))
if __name__ == '__main__':
window = MainWindow()
window.show_all()
if sys.platform.startswith('linux'):
GLib.threads_init()
GObject.threads_init()
Gdk.threads_init()
Gtk.main()