mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
mi-app: use an idle-handler to set the initial directory
This ensures we don't emit selection changed signals before we're up and running.
This commit is contained in:
parent
2e423f7120
commit
c9cc3bbd9c
1 changed files with 7 additions and 4 deletions
|
@ -62,10 +62,6 @@ public class MediaInfo.App : Window
|
|||
chooser = new FileChooserWidget (FileChooserAction.OPEN);
|
||||
paned.pack1 (chooser, false, false);
|
||||
|
||||
if (directory != null) {
|
||||
//chooser.set_current_folder (GLib.Environment.get_home_dir ());
|
||||
chooser.set_current_folder (directory);
|
||||
}
|
||||
chooser.set_show_hidden (false);
|
||||
|
||||
if (uri != null) {
|
||||
|
@ -75,6 +71,13 @@ public class MediaInfo.App : Window
|
|||
return false;
|
||||
});
|
||||
} else {
|
||||
if (directory != null) {
|
||||
//chooser.set_current_folder (GLib.Environment.get_home_dir ());
|
||||
Idle.add ( () => {
|
||||
chooser.set_current_folder (directory);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
chooser.selection_changed.connect (on_update_preview);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue