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

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

References shp_loader_config::createindex, import_file_list_store, IMPORT_MODE_COLUMN, IMPORT_POINTER_COLUMN, loader_mode_combo_list, LOADER_MODE_COMBO_OPTION_CHAR, LOADER_MODE_COMBO_TEXT, and shp_loader_config::opt.

Referenced by pgui_create_import_file_table().

2110 {
2111  GtkTreeIter iter;
2112  SHPLOADERCONFIG *loader_file_config;
2113  char opt;
2114  gchar *combo_text;
2115  gpointer gptr;
2116 
2117  /* Grab the SHPLOADERCONFIG from the IMPORT_POINTER_COLUMN for the list store */
2118  gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(import_file_list_store), &iter, path_string);
2119  gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1);
2120  loader_file_config = (SHPLOADERCONFIG *)gptr;
2121 
2122  /* Now grab the row selected within the combo box */
2123  gtk_tree_model_get(GTK_TREE_MODEL(loader_mode_combo_list), new_iter, LOADER_MODE_COMBO_OPTION_CHAR, &opt, -1);
2124 
2125  /* Update the configuration */
2126 
2127  /* Hack for index creation: we must disable it if we are appending, otherwise we
2128  end up trying to generate the index again */
2129  loader_file_config->createindex = global_loader_config->createindex;
2130 
2131  switch (opt)
2132  {
2133  case 'a':
2134  loader_file_config->opt = 'a';
2135 
2136  /* Other half of index creation hack */
2137  loader_file_config->createindex = 0;
2138 
2139  break;
2140 
2141  case 'd':
2142  loader_file_config->opt = 'd';
2143  break;
2144 
2145  case 'p':
2146  loader_file_config->opt = 'p';
2147  break;
2148 
2149  case 'c':
2150  loader_file_config->opt = 'c';
2151  break;
2152  }
2153 
2154  /* Update the selection in the listview with the text from the combo */
2155  gtk_tree_model_get(GTK_TREE_MODEL(loader_mode_combo_list), new_iter, LOADER_MODE_COMBO_TEXT, &combo_text, -1);
2156  gtk_list_store_set(import_file_list_store, &iter, IMPORT_MODE_COLUMN, combo_text, -1);
2157 
2158  return;
2159 }
GtkListStore * loader_mode_combo_list
Definition: shp2pgsql-gui.c:79
static SHPLOADERCONFIG * global_loader_config
GtkListStore * import_file_list_store
Definition: shp2pgsql-gui.c:58

Here is the caller graph for this function: