PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pgui_action_open_file_dialog()

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

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

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

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

Referenced by pgui_create_import_file_table().

Here is the call graph for this function:
Here is the caller graph for this function: