Skip to content

Commit

Permalink
LinGui: revert old gtk bug workaround
Browse files Browse the repository at this point in the history
It is no longer necessary in current gtk versions \o/
  • Loading branch information
jstebbins committed Jun 29, 2016
1 parent 05c142a commit a4c3df7
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions gtk/src/callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,19 +1365,7 @@ 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);

// 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.
//gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), sourcename);

gchar *dirname = g_path_get_dirname(sourcename);
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), dirname);
g_free(dirname);
gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(dialog), sourcename);

response = gtk_dialog_run(GTK_DIALOG (dialog));
gtk_widget_hide(dialog);
Expand Down

0 comments on commit a4c3df7

Please sign in to comment.