From abe32831cf6f9d7c00e46a91764e684b6f813b04 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Fri, 28 Sep 2012 15:59:29 +0200 Subject: [PATCH] [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. --- player/player.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')) -- 2.30.2