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 2320 of file shp2pgsql-gui.c.

2324 {
2325  SHPDUMPERCONFIG *dumper_table_config;
2326  gchar *geocol_name;
2327  GtkTreeIter iter;
2328  GtkListStore *model;
2329  gpointer gptr;
2330 
2331  /* Get the existing geo column name */
2332  gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(export_table_list_store), &iter, path_string);
2333  gtk_tree_model_get(GTK_TREE_MODEL(export_table_list_store), &iter,
2334  EXPORT_POINTER_COLUMN, &gptr,
2335  EXPORT_GEOMETRY_COLUMN, &geocol_name,
2337  -1);
2338 
2339  /* If the geocol_name is NULL then there was no geo column so exit */
2340  if (!geocol_name)
2341  return;
2342 
2343  /* Otherwise update the geo column name in the config and the model */
2344  gtk_tree_model_get(GTK_TREE_MODEL(model), new_iter, TABLECHOOSER_GEOCOL_COMBO_TEXT, &geocol_name, -1);
2345  dumper_table_config = (SHPDUMPERCONFIG *)gptr;
2346 
2347  if (dumper_table_config->geo_col_name)
2348  {
2349  free(dumper_table_config->geo_col_name);
2350 
2351  dumper_table_config->geo_col_name = strdup(geocol_name);
2352  }
2353 
2354  gtk_list_store_set(export_table_list_store, &iter,
2355  EXPORT_GEOMETRY_COLUMN, geocol_name,
2356  -1);
2357 
2358  return;
2359 }
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: