PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ pgui_create_filechooser_dialog()

static void pgui_create_filechooser_dialog ( void  )
static

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

References _, dialog_filechooser, TRUE, and window_main.

Referenced by main().

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