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

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