Skip to content

Commit

Permalink
Silenced PyGIWarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed May 23, 2016
1 parent 1c79023 commit cc4d2b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scripts/syncthing-gtk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python2
import sys, os, signal
import sys, os, signal, gi

def sigint(*a):
print("\n*break*")
Expand All @@ -20,6 +20,9 @@ if __name__ == "__main__":
else:
raise IOError("Could not find files in %r", paths)

gi.require_version('Gtk', '3.0')
gi.require_version('Rsvg', '2.0')

from syncthing_gtk.tools import init_logging, init_locale
init_locale(localedir)
init_logging()
Expand Down
4 changes: 4 additions & 0 deletions scripts/syncthing-gtk-exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

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
Expand Down
6 changes: 5 additions & 1 deletion syncthing-gtk.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python2
import os, sys, signal
import os, sys, signal, gi

def sigint(*a):
print("\n*break*")
Expand All @@ -8,12 +8,16 @@ def sigint(*a):
if __name__ == "__main__":
signal.signal(signal.SIGINT, sigint)

gi.require_version('Gtk', '3.0')
gi.require_version('Rsvg', '2.0')

from syncthing_gtk.tools import init_logging, init_locale, IS_WINDOWS
if IS_WINDOWS:
from syncthing_gtk import windows
windows.enable_localization()
init_logging()
init_locale("locale/")

if IS_WINDOWS:
from syncthing_gtk import windows, Configuration
config = Configuration()
Expand Down

0 comments on commit cc4d2b9

Please sign in to comment.