PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ pgui_action_open_file_dialog()

static void pgui_action_open_file_dialog ( GtkWidget *  widget,
gpointer  data 
)
static

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

References add_loader_file_config_to_list(), create_new_file_config(), and dialog_filechooser.

Referenced by pgui_create_import_file_table().

1296 {
1297  SHPLOADERCONFIG *loader_file_config;
1298  GSList *filename_list, *filename_item;
1299  gchar *filename;
1300 
1301  /* Make sure we deselect any files from the last time */
1302  gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(dialog_filechooser));
1303 
1304  /* Run the dialog */
1305  if (gtk_dialog_run(GTK_DIALOG(dialog_filechooser)) == GTK_RESPONSE_ACCEPT)
1306  {
1307  /* Create the new file configuration based upon the each filename and add it to the listview */
1308  filename_list = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog_filechooser));
1309 
1310  filename_item = g_slist_nth(filename_list, 0);
1311  while (filename_item)
1312  {
1313  /* Add the configuration */
1314  filename = g_slist_nth_data(filename_item, 0);
1315 
1316  loader_file_config = create_new_file_config(filename);
1317  add_loader_file_config_to_list(loader_file_config);
1318 
1319  /* Grab the next filename */
1320  filename_item = g_slist_next(filename_item);
1321  }
1322 
1323  /* Free the list */
1324  g_slist_free(filename_list);
1325  }
1326 
1327  gtk_widget_hide(dialog_filechooser);
1328 }
static GtkWidget * dialog_filechooser
static SHPLOADERCONFIG * create_new_file_config(const char *filename)
static void add_loader_file_config_to_list(SHPLOADERCONFIG *loader_file_config)
Here is the call graph for this function:
Here is the caller graph for this function: