diff --git a/scripts/syncthing-gtk-exe.py b/scripts/syncthing-gtk-exe.py index 85b46d0c..e82a9bda 100644 --- a/scripts/syncthing-gtk-exe.py +++ b/scripts/syncthing-gtk-exe.py @@ -1,13 +1,10 @@ #!/c/Python27/python.exe # Note: this one is used by Windows -import sys, os, gi, cairo, _winreg # cairo and _winreg imported so cx_Freeze knows about them +import sys, os, _winreg if __name__ == "__main__": portable = False - gi.require_version('Gtk', '3.0') - gi.require_version('Rsvg', '2.0') - if "--portable" in sys.argv: sys.argv.remove("--portable") portable = True @@ -33,6 +30,10 @@ os.chdir(path) os.environ["PATH"] = path + import gi, cairo + gi.require_version('Gtk', '3.0') + gi.require_version('Rsvg', '2.0') + from syncthing_gtk.tools import init_logging, init_locale from syncthing_gtk.windows import ( enable_localization, fix_localized_system_error_messages, diff --git a/syncthing_gtk/app.py b/syncthing_gtk/app.py index 7b373036..e0fa5569 100644 --- a/syncthing_gtk/app.py +++ b/syncthing_gtk/app.py @@ -35,7 +35,7 @@ log = logging.getLogger("App") # Internal version used by updater (if enabled) -INTERNAL_VERSION = "v0.9.2.4" +INTERNAL_VERSION = "v0.9.2.6" # Minimal Syncthing version supported by App MIN_ST_VERSION = "0.13.0" diff --git a/syncthing_gtk/tools.py b/syncthing_gtk/tools.py index 6de5663d..5bc9ec79 100644 --- a/syncthing_gtk/tools.py +++ b/syncthing_gtk/tools.py @@ -6,7 +6,6 @@ """ from __future__ import unicode_literals -from gi.repository import GLib from base64 import b32decode from datetime import tzinfo, timedelta from subprocess import Popen @@ -370,6 +369,7 @@ def get_config_dir(): return windows.get_unicode_home() except Exception: pass + from gi.repository import GLib confdir = GLib.get_user_config_dir() if confdir is None or IS_XP: if IS_WINDOWS: