summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-09-23 21:18:40 +0000
committerjstebbins <[email protected]>2011-09-23 21:18:40 +0000
commit442f8efade3df7a34c52441c982c93aeb66b29e5 (patch)
treee3152bd5ceeda111e8c1fed4752a3e8c83108d2b /gtk
parent4b66f14ed34e840c79f97bc388ef8fff8d4eeed9 (diff)
LinGui: remember filter setting in source selection dialog
I was resetting it every time the dialog is opened which is annoying if you are trying to open a collection of a single file type (e.g. TS files). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4241 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c7
-rw-r--r--gtk/src/main.c7
2 files changed, 7 insertions, 7 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index aca606d4d..7b7b81f52 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -972,13 +972,6 @@ 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);
- // Gtk has a really stupid bug. If the file chooser is showing
- // hidden files AND there is no filter set, it will not select
- // the filename when gtk_file_chooser_set_filename is called.
- // So add a completely unnessary filter to prevent this behavior.
- GtkFileFilter *filter;
- filter = GTK_FILE_FILTER(GHB_OBJECT(ud->builder, "SourceFilterAll"));
- gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter);
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), sourcename);
response = gtk_dialog_run(GTK_DIALOG (dialog));
gtk_widget_hide(dialog);
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 3c771aedc..ae6a7b0fc 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -1093,6 +1093,13 @@ main (int argc, char *argv[])
gtk_file_filter_add_pattern(filter, "*.WMV");
gtk_file_chooser_add_filter(chooser, filter);
+ // Gtk has a really stupid bug. If the file chooser is showing
+ // hidden files AND there is no filter set, it will not select
+ // the filename when gtk_file_chooser_set_filename is called.
+ // So add a completely unnessary filter to prevent this behavior.
+ filter = GTK_FILE_FILTER(GHB_OBJECT(ud->builder, "SourceFilterAll"));
+ gtk_file_chooser_set_filter(chooser, filter);
+
// Everything should be go-to-go. Lets rock!
gtk_main ();