Commit 670b2423 authored by Victor Ananjevsky's avatar Victor Ananjevsky

recreate file filters in open picture dialog since they are destroying with GtkFileChooser

parent d65da691
......@@ -277,23 +277,16 @@ static void
open_file_cb (GtkWidget *w, gpointer d)
{
GtkWidget *dlg;
static GtkFileFilter *imgf = NULL;
static GtkFileFilter *allf = NULL;
GtkFileFilter *imgf, *allf;
static gchar *dir = NULL;
if (!imgf)
{
imgf = gtk_file_filter_new ();
gtk_file_filter_set_name (imgf, _("Images"));
gtk_file_filter_add_pixbuf_formats (imgf);
}
imgf = gtk_file_filter_new ();
gtk_file_filter_set_name (imgf, _("Images"));
gtk_file_filter_add_pixbuf_formats (imgf);
if (!allf)
{
allf = gtk_file_filter_new ();
gtk_file_filter_set_name (allf, _("All files"));
gtk_file_filter_add_pattern (allf, "*");
}
allf = gtk_file_filter_new ();
gtk_file_filter_set_name (allf, _("All files"));
gtk_file_filter_add_pattern (allf, "*");
dlg = gtk_file_chooser_dialog_new (_("YAD - Select Image(s)"),
GTK_WINDOW (gtk_widget_get_toplevel (w)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment