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:
parent
80ac3a6103
commit
78172aeaf4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue