PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ pgui_create_filechooser_dialog()

static void pgui_create_filechooser_dialog ( void  )
static

Definition at line 2567 of file shp2pgsql-gui.c.

References _, dialog_filechooser, TRUE, and window_main.

Referenced by main().

2568 {
2569  GtkFileFilter *file_filter_shape;
2570 
2571  /* Create the dialog */
2572  dialog_filechooser = gtk_file_chooser_dialog_new( _("Select a Shape File"), GTK_WINDOW (window_main),
2573  GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
2574 
2575  /* Filter for .shp files */
2576  file_filter_shape = gtk_file_filter_new();
2577  gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.shp");
2578  gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), _("Shape Files (*.shp)"));
2579  gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog_filechooser), file_filter_shape);
2580 
2581  /* Filter for .dbf files */
2582  file_filter_shape = gtk_file_filter_new();
2583  gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.dbf");
2584  gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), _("DBF Files (*.dbf)"));
2585  gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog_filechooser), file_filter_shape);
2586 
2587  /* Allow multiple files to be selected */
2588  g_object_set(dialog_filechooser, "select-multiple", TRUE, NULL);
2589 
2590  return;
2591 }
static GtkWidget * window_main
Definition: shp2pgsql-gui.c:49
#define _(String)
Definition: shpcommon.h:24
static GtkWidget * dialog_filechooser
#define TRUE
Definition: dbfopen.c:169
Here is the caller graph for this function: