PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ create_new_table_config()

static SHPDUMPERCONFIG* create_new_table_config ( GtkTreeIter *  iter)
static

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

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