PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void pgui_action_handle_table_geocol_combo ( GtkCellRendererCombo *  combo,
gchar *  path_string,
GtkTreeIter *  new_iter,
gpointer  user_data 
)
static

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

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

Referenced by pgui_create_export_table_table().

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

Here is the caller graph for this function: