PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ pgui_action_open_file_dialog()

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

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

1314 {
1315  SHPLOADERCONFIG *loader_file_config;
1316  GSList *filename_list, *filename_item;
1317  gchar *filename;
1318 
1319  /* Make sure we deselect any files from the last time */
1320  gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(dialog_filechooser));
1321 
1322  /* Run the dialog */
1323  if (gtk_dialog_run(GTK_DIALOG(dialog_filechooser)) == GTK_RESPONSE_ACCEPT)
1324  {
1325  /* Create the new file configuration based upon the each filename and add it to the listview */
1326  filename_list = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog_filechooser));
1327 
1328  filename_item = g_slist_nth(filename_list, 0);
1329  while (filename_item)
1330  {
1331  /* Add the configuration */
1332  filename = g_slist_nth_data(filename_item, 0);
1333 
1334  loader_file_config = create_new_file_config(filename);
1335  if (loader_file_config == NULL) {
1337  g_free(filename);
1338  filename_item = g_slist_next(filename_item);
1339  continue;
1340  }
1341  add_loader_file_config_to_list(loader_file_config);
1342 
1343  /* Grab the next filename */
1344  filename_item = g_slist_next(filename_item);
1345  }
1346 
1347  /* Free the list */
1348  g_slist_free(filename_list);
1349  }
1350 
1351  gtk_widget_hide(dialog_filechooser);
1352 }
static SHPLOADERCONFIG * create_new_file_config(const char *filename)
static GtkWidget * dialog_filechooser
static void pgui_raise_error_dialogue(void)
static void add_loader_file_config_to_list(SHPLOADERCONFIG *loader_file_config)

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

Referenced by pgui_create_import_file_table().

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