]> err.no Git - mapper/commitdiff
Add file filter to OSM import dialogue
authorBruce Cowan <bcowan@fastmail.co.uk>
Sun, 2 Mar 2008 14:50:27 +0000 (14:50 +0000)
committerKaj-Michael Lang <milang@tal.org>
Fri, 1 Aug 2008 09:05:06 +0000 (12:05 +0300)
src/import-gui.c

index 7efdd6ec2ddd26dfd33563721c12d4ca1bb9dfd2..2f1a804f139349c127e4681905faf5ce040edeac 100644 (file)
@@ -67,6 +67,7 @@ osm_import_dialog(GtkWidget *window)
 {
 GtkWidget *dialog;
 GtkWidget *vbox;
+GtkFileFilter *filter_osm;
 GtkWidget *picker_planet;
 GtkWidget *entry_db;
 
@@ -77,7 +78,13 @@ dialog = gtk_dialog_new_with_buttons(_("OSM Data import"),
 
 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), vbox = gtk_vbox_new (FALSE, 3), TRUE, TRUE, 0);
 
+filter_osm=gtk_file_filter_new();
+gtk_file_filter_set_name(filter_osm, "OSM XML");
+gtk_file_filter_add_pattern(filter_osm, "*.osm");
+gtk_file_filter_add_pattern(filter_osm, "*.osm.bz2");
+
 picker_planet=gtk_file_chooser_button_new(_("OSM Planet file"), GTK_FILE_CHOOSER_ACTION_OPEN);
+gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(picker_planet), filter_osm);
 entry_db=gtk_entry_new();
 
 gtk_box_pack_start(GTK_BOX(vbox), gtk_label_new("OSM Planet"), TRUE, TRUE, 0);