]> www.fi.muni.cz Git - evince.git/commitdiff
set "All Documents" as default filter in open dialog
authorCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 6 Jul 2005 15:07:01 +0000 (15:07 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Wed, 6 Jul 2005 15:07:01 +0000 (15:07 +0000)
2005-07-06  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-document-types.c: set "All Documents" as default filter in
open dialog

ChangeLog
shell/ev-document-types.c

index a63e0ac3c1a10649d30a1d978a5164a8fb650c83..a60fb09edb283d52aaba576a41c2ea75485c2d07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-06  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-document-types.c: set "All Documents" as default filter in
+       open dialog
+
 2005-07-06  Martin Kretzschmar  <martink@gnome.org>
 
        * shell/ev-metadata-manager.c (ev_metadata_manager_set_int)
index d2078c52311fe591423ff6d919be316b1d5efbc8..cbe6c2410751cdac823b57efd384e6e5be8ebeae 100644 (file)
@@ -123,12 +123,13 @@ ev_document_types_add_filters (GtkWidget *chooser, EvDocument *document)
        GList *mime_types;
        GtkFileFilter *filter;
        GtkFileFilter *default_filter;
+       GtkFileFilter *document_filter;
 
        if (document != NULL) {
                backend = ev_document_factory_get_backend (document);
        }
 
-       default_filter = filter = gtk_file_filter_new ();
+       default_filter = document_filter = filter = gtk_file_filter_new ();
        gtk_file_filter_set_name (filter, _("All Documents"));
        mime_types = ev_document_factory_get_all_mime_types ();
        file_filter_add_mime_list_and_free (filter, mime_types);
@@ -183,5 +184,6 @@ ev_document_types_add_filters (GtkWidget *chooser, EvDocument *document)
        gtk_file_filter_add_pattern (filter, "*");
        gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
 
-       gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), default_filter);
+       gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser),
+                                    document == NULL ? document_filter : default_filter);
 }