diff options
author | salvadh0r <dhor@toxic.net.pl> | 2014-04-13 11:19:52 +0200 |
---|---|---|
committer | salvadh0r <dhor@toxic.net.pl> | 2014-04-13 11:19:52 +0200 |
commit | 985f7fa55614f5b515b986376f0bffb08cff7e90 (patch) | |
tree | ec5e20ac9f80f410872a6cfbbd5bc9ee4196e9db | |
parent | 30d1351b58210ee03367509b1d3375f2c1605fc8 (diff) | |
download | macrofusion-code-985f7fa55614f5b515b986376f0bffb08cff7e90.zip macrofusion-code-985f7fa55614f5b515b986376f0bffb08cff7e90.tar.gz macrofusion-code-985f7fa55614f5b515b986376f0bffb08cff7e90.tar.bz2 |
on the road to the 0.7.4
-rwxr-xr-x | macrofusion.py | 31 |
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") |