PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void pgui_create_filechooser_dialog ( void  )
static

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

References _, dialog_filechooser, TRUE, and window_main.

Referenced by main().

2562 {
2563  GtkFileFilter *file_filter_shape;
2564 
2565  /* Create the dialog */
2566  dialog_filechooser = gtk_file_chooser_dialog_new( _("Select a Shape File"), GTK_WINDOW (window_main),
2567  GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
2568 
2569  /* Filter for .shp files */
2570  file_filter_shape = gtk_file_filter_new();
2571  gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.shp");
2572  gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), _("Shape Files (*.shp)"));
2573  gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog_filechooser), file_filter_shape);
2574 
2575  /* Filter for .dbf files */
2576  file_filter_shape = gtk_file_filter_new();
2577  gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.dbf");
2578  gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), _("DBF Files (*.dbf)"));
2579  gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog_filechooser), file_filter_shape);
2580 
2581  /* Allow multiple files to be selected */
2582  g_object_set(dialog_filechooser, "select-multiple", TRUE, NULL);
2583 
2584  return;
2585 }
static GtkWidget * window_main
Definition: shp2pgsql-gui.c:52
#define _(String)
Definition: shpcommon.h:23
static GtkWidget * dialog_filechooser
#define TRUE
Definition: dbfopen.c:170

Here is the caller graph for this function: