PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

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

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

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: