PostGIS 3.6.2dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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 2113 of file shp2pgsql-gui.c.

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