PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ pgui_action_handle_tree_combo()

static void pgui_action_handle_tree_combo ( GtkCellRendererCombo *  combo,
gchar *  path_string,
GtkTreeIter *  new_iter,
gpointer  user_data 
)
static

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

2142 {
2143  GtkTreeIter iter;
2144  SHPLOADERCONFIG *loader_file_config;
2145  char opt;
2146  gchar *combo_text;
2147  gpointer gptr;
2148 
2149  /* Grab the SHPLOADERCONFIG from the IMPORT_POINTER_COLUMN for the list store */
2150  gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(import_file_list_store), &iter, path_string);
2151  gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1);
2152  loader_file_config = (SHPLOADERCONFIG *)gptr;
2153 
2154  /* Now grab the row selected within the combo box */
2155  gtk_tree_model_get(GTK_TREE_MODEL(loader_mode_combo_list), new_iter, LOADER_MODE_COMBO_OPTION_CHAR, &opt, -1);
2156 
2157  /* Update the configuration */
2158 
2159  /* Hack for index creation: we must disable it if we are appending, otherwise we
2160  end up trying to generate the index again */
2161  loader_file_config->createindex = global_loader_config->createindex;
2162 
2163  switch (opt)
2164  {
2165  case 'a':
2166  loader_file_config->opt = 'a';
2167 
2168  /* Other half of index creation hack */
2169  loader_file_config->createindex = 0;
2170 
2171  break;
2172 
2173  case 'd':
2174  loader_file_config->opt = 'd';
2175  break;
2176 
2177  case 'p':
2178  loader_file_config->opt = 'p';
2179  break;
2180 
2181  case 'c':
2182  loader_file_config->opt = 'c';
2183  break;
2184  }
2185 
2186  /* Update the selection in the listview with the text from the combo */
2187  gtk_tree_model_get(GTK_TREE_MODEL(loader_mode_combo_list), new_iter, LOADER_MODE_COMBO_TEXT, &combo_text, -1);
2188  gtk_list_store_set(import_file_list_store, &iter, IMPORT_MODE_COLUMN, combo_text, -1);
2189 
2190  return;
2191 }
@ LOADER_MODE_COMBO_TEXT
@ LOADER_MODE_COMBO_OPTION_CHAR
@ IMPORT_MODE_COLUMN
@ IMPORT_POINTER_COLUMN
GtkListStore * import_file_list_store
Definition: shp2pgsql-gui.c:58
GtkListStore * loader_mode_combo_list
Definition: shp2pgsql-gui.c:79
static SHPLOADERCONFIG * global_loader_config

References shp_loader_config::createindex, global_loader_config, 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().

Here is the caller graph for this function: