PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ create_new_table_config()

static SHPDUMPERCONFIG* create_new_table_config ( GtkTreeIter *  iter)
static

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

1023 {
1024  SHPDUMPERCONFIG *dumper_table_config;
1025  gchar *schema, *table, *geocol;
1026  gint hasgeo;
1027 
1028  /* Generate a new configuration by copying the global options first and then
1029  adding in the specific values for this table */
1030  dumper_table_config = malloc(sizeof(SHPDUMPERCONFIG));
1031  memcpy(dumper_table_config, global_dumper_config, sizeof(SHPDUMPERCONFIG));
1032 
1033  /* Grab the values from the current iter */
1034  gtk_tree_model_get(GTK_TREE_MODEL(chooser_filtered_table_list_store), iter,
1035  TABLECHOOSER_SCHEMA_COLUMN, &schema,
1036  TABLECHOOSER_TABLE_COLUMN, &table,
1037  TABLECHOOSER_GEO_COLUMN, &geocol,
1038  TABLECHOOSER_HASGEO_COLUMN, &hasgeo,
1039  -1);
1040 
1041  /* Set up the values in the SHPDUMPERCONFIG */
1042  dumper_table_config->schema = strdup(schema);
1043  dumper_table_config->table = strdup(table);
1044 
1045  /* We also set the filename the same as the table name */
1046  dumper_table_config->shp_file = strdup(table);
1047 
1048  if (hasgeo && geocol)
1049  dumper_table_config->geo_col_name = strdup(geocol);
1050  else
1051  dumper_table_config->geo_col_name = NULL;
1052 
1053  return dumper_table_config;
1054 }
void * malloc(YYSIZE_T)
@ TABLECHOOSER_HASGEO_COLUMN
@ TABLECHOOSER_TABLE_COLUMN
@ TABLECHOOSER_SCHEMA_COLUMN
@ TABLECHOOSER_GEO_COLUMN
GtkListStore * chooser_filtered_table_list_store
static SHPDUMPERCONFIG * global_dumper_config

References chooser_filtered_table_list_store, shp_dumper_config::geo_col_name, global_dumper_config, malloc(), shp_dumper_config::schema, shp_dumper_config::shp_file, shp_dumper_config::table, TABLECHOOSER_GEO_COLUMN, TABLECHOOSER_HASGEO_COLUMN, TABLECHOOSER_SCHEMA_COLUMN, and TABLECHOOSER_TABLE_COLUMN.

Referenced by pgui_action_open_table_dialog().

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