Filechooser callback in background

We should call the filechooser callback in the background so that gdk
threads have a chance to unlock and prevent deadlock.
This commit is contained in:
Bryan Schumaker 2010-12-03 08:21:11 -05:00
parent 80ac3a6103
commit 78172aeaf4
1 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,10 @@
import ocarina
import gobject
import os
gtk = ocarina.gtk
gtk = ocarina.gtk
libsaria = ocarina.libsaria
threads = libsaria.threads
#FS_OK = gobject.signal_new("filesystem_ok", gtk.FileChooserDialog,
# gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
@ -57,7 +60,7 @@ def select_path(widget, callback):
if uri[:7] == "file://":
uri = uri[7:]
uri = uri.replace("%20", " ")
callback(uri)
threads.background(callback, uri)
def run_chooser2(callback):
make_chooser2("title", callback)