PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pgui_action_handle_table_geocol_combo()

static void pgui_action_handle_table_geocol_combo ( GtkCellRendererCombo *  combo,
gchar *  path_string,
GtkTreeIter *  new_iter,
gpointer  user_data 
)
static

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

2293 {
2294  SHPDUMPERCONFIG *dumper_table_config;
2295  gchar *geocol_name;
2296  GtkTreeIter iter;
2297  GtkListStore *model;
2298  gpointer gptr;
2299 
2300  /* Get the existing geo column name */
2301  gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(export_table_list_store), &iter, path_string);
2302  gtk_tree_model_get(GTK_TREE_MODEL(export_table_list_store), &iter,
2303  EXPORT_POINTER_COLUMN, &gptr,
2304  EXPORT_GEOMETRY_COLUMN, &geocol_name,
2306  -1);
2307 
2308  /* If the geocol_name is NULL then there was no geo column so exit */
2309  if (!geocol_name)
2310  return;
2311 
2312  /* Otherwise update the geo column name in the config and the model */
2313  gtk_tree_model_get(GTK_TREE_MODEL(model), new_iter, TABLECHOOSER_GEOCOL_COMBO_TEXT, &geocol_name, -1);
2314  dumper_table_config = (SHPDUMPERCONFIG *)gptr;
2315 
2316  if (dumper_table_config->geo_col_name)
2317  {
2318  free(dumper_table_config->geo_col_name);
2319 
2320  dumper_table_config->geo_col_name = strdup(geocol_name);
2321  }
2322 
2323  gtk_list_store_set(export_table_list_store, &iter,
2324  EXPORT_GEOMETRY_COLUMN, geocol_name,
2325  -1);
2326 
2327  return;
2328 }
void free(void *)
@ TABLECHOOSER_GEOCOL_COMBO_TEXT
@ EXPORT_GEOMETRY_COLUMN
@ EXPORT_POINTER_COLUMN
@ EXPORT_GEOMETRY_LISTSTORE_COLUMN
GtkListStore * export_table_list_store
Definition: shp2pgsql-gui.c:80

References EXPORT_GEOMETRY_COLUMN, EXPORT_GEOMETRY_LISTSTORE_COLUMN, EXPORT_POINTER_COLUMN, export_table_list_store, free(), shp_dumper_config::geo_col_name, and TABLECHOOSER_GEOCOL_COMBO_TEXT.

Referenced by pgui_create_export_table_table().

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