PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ create_new_table_config()

static SHPDUMPERCONFIG* create_new_table_config ( GtkTreeIter *  iter)
static

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

1036 {
1037  SHPDUMPERCONFIG *dumper_table_config;
1038  gchar *schema, *table, *geocol;
1039  gint hasgeo;
1040 
1041  /* Generate a new configuration by copying the global options first and then
1042  adding in the specific values for this table */
1043  dumper_table_config = malloc(sizeof(SHPDUMPERCONFIG));
1044  memcpy(dumper_table_config, global_dumper_config, sizeof(SHPDUMPERCONFIG));
1045 
1046  /* Grab the values from the current iter */
1047  gtk_tree_model_get(GTK_TREE_MODEL(chooser_filtered_table_list_store), iter,
1048  TABLECHOOSER_SCHEMA_COLUMN, &schema,
1049  TABLECHOOSER_TABLE_COLUMN, &table,
1050  TABLECHOOSER_GEO_COLUMN, &geocol,
1051  TABLECHOOSER_HASGEO_COLUMN, &hasgeo,
1052  -1);
1053 
1054  /* Set up the values in the SHPDUMPERCONFIG */
1055  dumper_table_config->schema = strdup(schema);
1056  dumper_table_config->table = strdup(table);
1057 
1058  /* We also set the filename the same as the table name */
1059  dumper_table_config->shp_file = strdup(table);
1060 
1061  if (hasgeo && geocol)
1062  dumper_table_config->geo_col_name = strdup(geocol);
1063  else
1064  dumper_table_config->geo_col_name = NULL;
1065 
1066  return dumper_table_config;
1067 }
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: