]> granicus.if.org Git - handbrake/commitdiff
LinGui: revert old gtk bug workaround
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 29 Jun 2016 22:49:10 +0000 (15:49 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 29 Jun 2016 22:49:10 +0000 (15:49 -0700)
It is no longer necessary in current gtk versions \o/

gtk/src/callbacks.c

index 1b2e9b8c1767b2dfebe5aade8deecb1ad200b61b..2989b4be293b818d5eca21cf060f3bf15552800b 100644 (file)
@@ -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);