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

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().

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