From: Philip Chimento Date: Fri, 28 Sep 2012 13:59:29 +0000 (+0200) Subject: [player] Call Gdk.threads_init() before import Gtk X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=abe32831cf6f9d7c00e46a91764e684b6f813b04;p=projects%2Fchimara%2Fchimara.git [player] Call Gdk.threads_init() before import Gtk I thought this might fix the crashing problems with the Python player, since you should initialize Gdk threads before initializing Gtk, and Gtk is initialized on import from gi.repository. It didn't fix the problems, but it's a good thing to do anyway. --- diff --git a/player/player.py b/player/player.py index c153c68..ce0bdc1 100644 --- a/player/player.py +++ b/player/player.py @@ -3,6 +3,8 @@ import sys import os.path import argparse +from gi.repository import Gdk +Gdk.threads_init() from gi.repository import GObject, GLib, Gdk, Gio, Gtk, Chimara import config @@ -334,8 +336,6 @@ if __name__ == '__main__': metavar='GRAPHICS FILE', help='a Blorb resource file to include') args = parser.parse_args() - Gdk.threads_init() - # Create configuration dir ~/.chimara try: os.mkdir(os.path.expanduser('~/.chimara'))