PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void pgui_action_handle_loader_edit ( GtkCellRendererText *  renderer,
gchar *  path,
gchar *  new_text,
gpointer  column 
)
static

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

References shp_loader_config::geo_col, import_file_list_store, IMPORT_GEOMETRY_COLUMN, IMPORT_POINTER_COLUMN, IMPORT_SCHEMA_COLUMN, IMPORT_SRID_COLUMN, IMPORT_TABLE_COLUMN, lw_asprintf(), shp_loader_config::schema, shp_loader_config::sr_id, shp_loader_config::table, and update_loader_file_config_from_listview_iter().

Referenced by pgui_create_export_table_table(), pgui_create_import_file_table(), and pgui_create_tablechooser_dialog().

2173 {
2174  GtkTreeIter iter;
2175  gpointer gptr;
2176  gint columnindex;
2177  SHPLOADERCONFIG *loader_file_config;
2178  char *srid;
2179 
2180  /* Empty doesn't fly */
2181  if (strlen(new_text) == 0)
2182  return;
2183 
2184  /* Update the model with the current edit change */
2185  columnindex = *(gint *)column;
2186  gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(import_file_list_store), &iter, path);
2187  gtk_list_store_set(import_file_list_store, &iter, columnindex, new_text, -1);
2188 
2189  /* Grab the SHPLOADERCONFIG from the IMPORT_POINTER_COLUMN for the list store */
2190  gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1);
2191  loader_file_config = (SHPLOADERCONFIG *)gptr;
2192 
2193  /* Update the configuration from the current UI data */
2194  update_loader_file_config_from_listview_iter(&iter, loader_file_config);
2195 
2196  /* Now refresh the listview UI row with the new configuration */
2197  lw_asprintf(&srid, "%d", loader_file_config->sr_id);
2198 
2199  gtk_list_store_set(import_file_list_store, &iter,
2200  IMPORT_SCHEMA_COLUMN, loader_file_config->schema,
2201  IMPORT_TABLE_COLUMN, loader_file_config->table,
2202  IMPORT_GEOMETRY_COLUMN, loader_file_config->geo_col,
2203  IMPORT_SRID_COLUMN, srid,
2204  -1);
2205 
2206  return;
2207 }
static void update_loader_file_config_from_listview_iter(GtkTreeIter *iter, SHPLOADERCONFIG *loader_file_config)
int lw_asprintf(result, va_alist)
GtkListStore * import_file_list_store
Definition: shp2pgsql-gui.c:58

Here is the call graph for this function:

Here is the caller graph for this function: