aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/unix/stddialogs.c
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2018-12-14 22:03:34 +0100
committerStapleButter <thetotalworm@gmail.com>2018-12-14 22:03:34 +0100
commit2077642a92310d84062e6404687ca142cd83c671 (patch)
treec0df13f124b23ab387f118c801eba16953d4e12c /src/libui_sdl/libui/unix/stddialogs.c
parent10ebae42db726655b6685550a1e9cf8fe99783b1 (diff)
libui/GTK: remember directory in which the latest loaded ROM was, point file picker to it. behavior under Windows will likely stay unchanged as the Windows file picker already does that.
Diffstat (limited to 'src/libui_sdl/libui/unix/stddialogs.c')
-rw-r--r--src/libui_sdl/libui/unix/stddialogs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/unix/stddialogs.c b/src/libui_sdl/libui/unix/stddialogs.c
index b793d06..d2b89b9 100644
--- a/src/libui_sdl/libui/unix/stddialogs.c
+++ b/src/libui_sdl/libui/unix/stddialogs.c
@@ -70,6 +70,9 @@ static char *filedialog(GtkWindow *parent, GtkFileChooserAction mode, const gcha
gtk_file_chooser_set_show_hidden(fc, TRUE);
gtk_file_chooser_set_do_overwrite_confirmation(fc, TRUE);
gtk_file_chooser_set_create_folders(fc, TRUE);
+ if (initpath && strlen(initpath)>0)
+ gtk_file_chooser_set_current_folder(fc, initpath);
+
response = gtk_dialog_run(GTK_DIALOG(fcd));
if (response != GTK_RESPONSE_ACCEPT) {
gtk_widget_destroy(fcd);