diff options
author | jstebbins <[email protected]> | 2013-01-21 19:05:35 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2013-01-21 19:05:35 +0000 |
commit | 15a779c089e7e54e5be40a993810a2954a421c79 (patch) | |
tree | 0ad3d30efed17c50ca5f4b636749de36f8ef5fc5 | |
parent | 98749c2316335055e1742b205cb627255ca3d71a (diff) |
LinGui: Work around STUPID gtk3 file chooser bug :-\
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5186 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/src/callbacks.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 42fd3fa03..8971e48a4 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -992,7 +992,21 @@ do_source_dialog(GtkButton *button, gboolean single, signal_user_data_t *ud) dialog = GHB_WIDGET(ud->builder, "source_dialog"); source_dialog_extra_widgets(ud, dialog); +#if GTK_CHECK_VERSION(3, 0, 0) + // gtk3 has a STUPID BUG! If you select the "same_path" it ends + // up selecting the "Recent Files" shortcut instead of taking you + // to the directory and file THAT YOU ASKED FOR!!! FUUUUK!!! + // + // So instead, I am just setting the current folder. It's not + // optimal because if you are processing several files in the same + // folder, you want the selection to return to where you were last + // in the list, but there's not much else I can do at this point. + gchar *dirname = g_path_get_dirname(sourcename); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), dirname); + g_free(dirname); +#else gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), sourcename); +#endif response = gtk_dialog_run(GTK_DIALOG (dialog)); gtk_widget_hide(dialog); if (response == GTK_RESPONSE_NO) |