From: Bruce Cowan Date: Sun, 2 Mar 2008 14:50:27 +0000 (+0000) Subject: Add file filter to OSM import dialogue X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4726768e9628ceccbbb1c620eabe142ccb2c0370;p=mapper Add file filter to OSM import dialogue --- diff --git a/src/import-gui.c b/src/import-gui.c index 7efdd6e..2f1a804 100644 --- a/src/import-gui.c +++ b/src/import-gui.c @@ -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);