From: Carlos Garcia Campos Date: Wed, 6 Jul 2005 15:07:01 +0000 (+0000) Subject: set "All Documents" as default filter in open dialog X-Git-Tag: EVINCE_0_3_3~155 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=1bd63e67b648a5114b251631d0de1a1afa6b6e96;p=evince.git set "All Documents" as default filter in open dialog 2005-07-06 Carlos Garcia Campos * shell/ev-document-types.c: set "All Documents" as default filter in open dialog --- diff --git a/ChangeLog b/ChangeLog index a63e0ac3..a60fb09e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-07-06 Carlos Garcia Campos + + * shell/ev-document-types.c: set "All Documents" as default filter in + open dialog + 2005-07-06 Martin Kretzschmar * shell/ev-metadata-manager.c (ev_metadata_manager_set_int) diff --git a/shell/ev-document-types.c b/shell/ev-document-types.c index d2078c52..cbe6c241 100644 --- a/shell/ev-document-types.c +++ b/shell/ev-document-types.c @@ -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); }