PostGIS  3.7.0dev-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 2295 of file shp2pgsql-gui.c.

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

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: