summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmacrofusion.py31
1 files changed, 9 insertions, 22 deletions
diff --git a/macrofusion.py b/macrofusion.py
index 5275772..5e52139 100755
--- a/macrofusion.py
+++ b/macrofusion.py
@@ -27,15 +27,6 @@ try:
except:
print('Python Imaging Library is missing.')
-#try:
-# import gtk
-# import Gtk.glade
-# import pygtk
-# pyGtk.require("2.0")
-#except:
-# print('gtk2, pygtk or libglade is missing.')
-# sys.exit(1)
-
# Bad, bad, really bad coder... Global variables...
global session_images_bak
session_images_bak=[]
@@ -68,17 +59,11 @@ else:
sys.exit(1)
import locale
-import gettext
-#for module in (gettext, Gtk.glade):
-# module.bindtextdomain(APP, DIR)
-# module.textdomain(APP)
-locale.setlocale(locale.LC_ALL, '')
-#gettext.bindtextdomain(APP, DIR)
-#gettext.textdomain(APP)
-#gettext.install(APP)
-_ = gettext.gettext
-
-GObject.threads_init() #Pour que les threads soient lancés au moment opportun.
+from locale import gettext as _
+locale.bindtextdomain(APP, DIR)
+locale.textdomain(APP)
+
+GObject.threads_init()
def toggled_cb(cell, path, user_data):
model, column = user_data
@@ -141,7 +126,7 @@ class Interface:
def __init__(self):
# Set default icon
- # Gtk.window_set_default_icon_from_file(IMG + 'macrofusion.png')
+ Gtk.Window.set_default_icon_from_file(IMG + 'macrofusion.png')
self.cpus = multiprocessing.cpu_count()
if not donnees.check_install("enfuse"):
@@ -157,8 +142,10 @@ class Interface:
#Set the Glade file
self.gui = Gtk.Builder()
+ self.gui.set_translation_domain(APP)
self.gui.add_from_file(UI + "ui.xml")
-
+
+
#Dans la foulee on chope la fenetre principale, ca sert a rien c'est pour
#montrer qu'on peut le faire c'est tout ^^
self.win=self.gui.get_object("mainwindow")