39 #include <gdk/gdkkeysyms.h> 52 #define GNC_PREF_AUTO_RAISE_LISTS "auto-raise-lists" 54 typedef struct _PopBox
59 GtkListStore* tmp_store;
61 gboolean signals_connected;
68 gboolean use_quickfill_cache;
70 gboolean in_list_select;
74 gunichar complete_char;
76 GList* ignore_strings;
81 static void gnc_combo_cell_gui_realize (BasicCell* bcell, gpointer w);
82 static void gnc_combo_cell_gui_move (BasicCell* bcell);
83 static void gnc_combo_cell_gui_destroy (BasicCell* bcell);
84 static gboolean gnc_combo_cell_enter (BasicCell* bcell,
88 static void gnc_combo_cell_leave (BasicCell* bcell);
89 static void gnc_combo_cell_destroy (BasicCell* bcell);
91 static GOnce auto_pop_init_once = G_ONCE_INIT;
92 static gboolean auto_pop_combos = FALSE;
96 gnc_combo_cell_set_autopop (gpointer prefs, gchar* pref, gpointer user_data)
99 GNC_PREF_AUTO_RAISE_LISTS);
103 gnc_combo_cell_autopop_init (gpointer unused)
107 GNC_PREF_AUTO_RAISE_LISTS);
110 GNC_PREF_AUTO_RAISE_LISTS,
111 gnc_combo_cell_set_autopop,
114 gnc_prefs_set_reg_auto_raise_lists_id (
id);
119 gnc_combo_cell_new (
void)
123 g_once (&auto_pop_init_once, gnc_combo_cell_autopop_init, NULL);
127 gnc_combo_cell_init (cell);
137 gnc_basic_cell_init (& (cell->cell));
139 cell->cell.is_popup = TRUE;
141 cell->cell.destroy = gnc_combo_cell_destroy;
143 cell->cell.gui_realize = gnc_combo_cell_gui_realize;
144 cell->cell.gui_destroy = gnc_combo_cell_gui_destroy;
149 box->item_edit = NULL;
150 box->item_list = NULL;
151 box->tmp_store = gtk_list_store_new (1, G_TYPE_STRING);
152 box->signals_connected = FALSE;
153 box->list_popped = FALSE;
154 box->autosize = FALSE;
156 cell->cell.gui_private = box;
158 box->qf = gnc_quickfill_new();
159 box->use_quickfill_cache = FALSE;
161 box->in_list_select = FALSE;
165 box->complete_char =
'\0';
167 box->ignore_strings = NULL;
171 select_item_cb (
GncItemList* item_list,
char* item_string, gpointer data)
174 PopBox* box = cell->cell.gui_private;
176 box->in_list_select = TRUE;
177 gnucash_sheet_modify_current_cell (box->sheet, item_string);
178 box->in_list_select = FALSE;
180 gnc_item_edit_hide_popup (box->item_edit);
181 box->list_popped = FALSE;
185 change_item_cb (
GncItemList* item_list,
char* item_string, gpointer data)
188 PopBox* box = cell->cell.gui_private;
190 box->in_list_select = TRUE;
191 gnucash_sheet_modify_current_cell (box->sheet, item_string);
192 box->in_list_select = FALSE;
196 activate_item_cb (
GncItemList* item_list,
char* item_string, gpointer data)
199 PopBox* box = cell->cell.gui_private;
201 gnc_item_edit_hide_popup (box->item_edit);
202 box->list_popped = FALSE;
206 key_press_item_cb (
GncItemList* item_list, GdkEventKey* event, gpointer data)
209 PopBox* box = cell->cell.gui_private;
211 switch (event->keyval)
214 gnc_item_edit_hide_popup (box->item_edit);
215 box->list_popped = FALSE;
219 gtk_widget_event (GTK_WIDGET (box->sheet),
227 combo_disconnect_signals (
ComboCell* cell)
229 PopBox* box = cell->cell.gui_private;
231 if (!box->signals_connected)
234 g_signal_handlers_disconnect_matched (G_OBJECT (box->item_list),
236 0, 0, NULL, NULL, cell);
238 box->signals_connected = FALSE;
244 PopBox* box = cell->cell.gui_private;
246 if (box->signals_connected)
249 g_signal_connect (G_OBJECT (box->item_list),
"select_item",
250 G_CALLBACK (select_item_cb), cell);
252 g_signal_connect (G_OBJECT (box->item_list),
"change_item",
253 G_CALLBACK (change_item_cb), cell);
255 g_signal_connect (G_OBJECT (box->item_list),
"activate_item",
256 G_CALLBACK (activate_item_cb), cell);
258 g_signal_connect (G_OBJECT (box->item_list),
"key_press_event",
259 G_CALLBACK (key_press_item_cb), cell);
261 box->signals_connected = TRUE;
267 PopBox* box = cell->cell.gui_private;
269 if (!box->signals_connected)
272 g_signal_handlers_block_matched (G_OBJECT (box->item_list),
274 0, 0, NULL, NULL, cell);
280 PopBox* box = cell->cell.gui_private;
282 if (!box->signals_connected)
285 g_signal_handlers_unblock_matched (G_OBJECT (box->item_list),
287 0, 0, NULL, NULL, cell);
291 gnc_combo_cell_gui_destroy (BasicCell* bcell)
293 PopBox* box = bcell->gui_private;
296 if (cell->cell.gui_realize == NULL)
298 if (box != NULL && box->item_list != NULL)
300 combo_disconnect_signals (cell);
301 g_object_unref (box->item_list);
302 box->item_list = NULL;
305 if (box && box->tmp_store)
307 g_object_unref (box->tmp_store);
308 box->tmp_store = NULL;
312 cell->cell.gui_realize = gnc_combo_cell_gui_realize;
313 cell->cell.gui_move = NULL;
314 cell->cell.enter_cell = NULL;
315 cell->cell.leave_cell = NULL;
316 cell->cell.gui_destroy = NULL;
321 gnc_combo_cell_destroy (BasicCell* bcell)
324 PopBox* box = cell->cell.gui_private;
326 gnc_combo_cell_gui_destroy (& (cell->cell));
331 if (FALSE == box->use_quickfill_cache)
333 gnc_quickfill_destroy (box->qf);
337 g_list_free_full (box->ignore_strings, g_free);
338 box->ignore_strings = NULL;
341 cell->cell.gui_private = NULL;
344 cell->cell.gui_private = NULL;
345 cell->cell.gui_realize = NULL;
356 box = cell->cell.gui_private;
357 if (box->item_list == NULL)
360 block_list_signals (cell);
361 gnc_item_list_set_sort_column (box->item_list, 0);
362 unblock_list_signals (cell);
366 gnc_combo_cell_clear_menu (
ComboCell* cell)
373 box = cell->cell.gui_private;
378 if (FALSE == box->use_quickfill_cache)
380 gnc_quickfill_destroy (box->qf);
381 box->qf = gnc_quickfill_new();
384 if (box->item_list != NULL)
386 block_list_signals (cell);
388 gnc_item_list_clear (box->item_list);
389 gnc_item_edit_hide_popup (box->item_edit);
390 box->list_popped = FALSE;
391 unblock_list_signals (cell);
394 gtk_list_store_clear (box->tmp_store);
402 if (cell == NULL)
return;
404 box = cell->cell.gui_private;
405 if (NULL == box)
return;
407 if (FALSE == box->use_quickfill_cache)
409 box->use_quickfill_cache = TRUE;
410 gnc_quickfill_destroy (box->qf);
416 gnc_combo_cell_use_list_store_cache (
ComboCell* cell, gpointer data)
418 if (cell == NULL)
return;
420 cell->shared_store = data;
433 box = cell->cell.gui_private;
435 if (box->item_list != NULL)
437 block_list_signals (cell);
439 gnc_item_list_append (box->item_list, menustr);
440 if (cell->cell.value &&
441 (strcmp (menustr, cell->cell.value) == 0))
442 gnc_item_list_select (box->item_list, menustr);
444 unblock_list_signals (cell);
450 gtk_list_store_append (box->tmp_store, &iter);
451 gtk_list_store_set (box->tmp_store, &iter, 0, menustr, -1);
456 if (FALSE == box->use_quickfill_cache)
472 box = cell->cell.gui_private;
474 if (box->item_list != NULL)
476 block_list_signals (cell);
478 gnc_item_list_append (box->item_list, menustr);
479 if (cell->cell.value)
481 gchar* menu_copy = g_strdup (menustr);
482 gchar* value_copy = g_strdup (cell->cell.value);
483 g_strdelimit (menu_copy,
"-:/\\.",
' ');
484 g_strdelimit (value_copy,
"-:/\\.",
' ');
485 if (strcmp (menu_copy, value_copy) == 0)
487 gnc_combo_cell_set_value (cell, menustr);
488 gnc_item_list_select (box->item_list, menustr);
493 unblock_list_signals (cell);
498 if (FALSE == box->use_quickfill_cache)
505 gnc_combo_cell_set_value (
ComboCell* cell,
const char* str)
507 gnc_basic_cell_set_value (&cell->cell, str);
511 list_store_append (GtkListStore *store,
char*
string)
515 g_return_if_fail (store != NULL);
516 g_return_if_fail (
string != NULL);
517 gtk_list_store_append (store, &iter);
518 gtk_list_store_set (store, &iter, 0,
string, -1);
526 gnc_combo_cell_type_ahead_search (
const gchar* newval,
527 GtkListStore* full_store,
ComboCell *cell)
530 PopBox* box = cell->cell.gui_private;
532 gchar* match_str = NULL;
534 char* escaped_sep = g_regex_escape_string (sep, -1);
535 char* escaped_newval = g_regex_escape_string (newval, -1);
536 gchar* newval_rep = g_strdup_printf (
".*%s.*", escaped_sep);
537 GRegex* regex0 = g_regex_new (escaped_sep, 0, 0, NULL);
538 char* rep_str = g_regex_replace_literal (regex0, escaped_newval, -1, 0,
539 newval_rep, 0, NULL);
540 char* normal_rep_str = g_utf8_normalize (rep_str, -1, G_NORMALIZE_NFC);
541 GRegex *regex = g_regex_new (normal_rep_str, G_REGEX_CASELESS, 0, NULL);
543 gboolean valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (full_store),
549 static const gint MAX_NUM_MATCHES = 30;
551 g_free (normal_rep_str);
554 g_free (escaped_sep);
555 g_free (escaped_newval);
556 g_regex_unref (regex0);
558 block_list_signals (cell);
559 gnc_item_edit_hide_popup (box->item_edit);
560 gtk_list_store_clear (box->tmp_store);
561 unblock_list_signals (cell);
563 if (strlen (newval) == 0) {
571 gnc_item_list_set_temp_store (box->item_list, NULL);
572 gnc_item_edit_show_popup (box->item_edit);
573 box->list_popped = TRUE;
577 while (valid && num_found < MAX_NUM_MATCHES)
579 gchar* str_data = NULL;
580 gchar* normalized_str_data = NULL;
581 gtk_tree_model_get (GTK_TREE_MODEL (full_store), &iter, 0,
583 normalized_str_data = g_utf8_normalize (str_data, -1, G_NORMALIZE_NFC);
585 if (g_regex_match (regex, normalized_str_data, 0, NULL))
588 match_str = g_strdup (str_data);
590 list_store_append (box->tmp_store, str_data);
593 g_free (normalized_str_data);
594 valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (full_store), &iter);
599 gnc_item_list_set_temp_store (box->item_list, box->tmp_store);
600 gnc_item_edit_show_popup (box->item_edit);
601 box->list_popped = TRUE;
605 g_regex_unref (regex);
610 quickfill_match (QuickFill *qf,
const char *
string)
618 gnc_combo_cell_modify_verify (BasicCell* _cell,
623 int* cursor_position,
624 int* start_selection,
628 PopBox* box = cell->cell.gui_private;
629 gchar* match_str = NULL;
632 const gchar* box_str = NULL;
634 newval_chars = g_utf8_strlen (newval, newval_len);
635 change_chars = g_utf8_strlen (change, change_len);
637 if (box->in_list_select)
639 gnc_basic_cell_set_value_internal (_cell, newval);
640 *cursor_position = -1;
641 *start_selection = 0;
649 if (!gnc_item_list_using_temp (box->item_list))
652 if (change == NULL || *cursor_position < _cell->value_chars)
654 gnc_basic_cell_set_value_internal (_cell, newval);
655 *start_selection = *end_selection = *cursor_position;
659 match_str = quickfill_match (box->qf, newval);
661 if (match_str != NULL)
663 *start_selection = newval_chars;
665 *cursor_position += change_chars;
668 block_list_signals (cell);
669 gnc_item_list_select (box->item_list, match_str);
670 unblock_list_signals (cell);
675 if (match_str == NULL && cell->shared_store)
678 GtkListStore *store = cell->shared_store;
679 match_str = gnc_combo_cell_type_ahead_search (newval, store, cell);
680 *start_selection = newval_chars;
682 *cursor_position = newval_chars;
689 if (match_str == NULL)
691 block_list_signals (cell);
692 if (cell->shared_store && gnc_item_list_using_temp (box->item_list))
694 gnc_item_list_set_temp_store (box->item_list, NULL);
695 gtk_list_store_clear (box->tmp_store);
697 gnc_item_list_select (box->item_list, NULL);
698 unblock_list_signals (cell);
699 gnc_basic_cell_set_value_internal (_cell, newval);
700 *cursor_position = *start_selection = newval_chars;
705 if (!box->list_popped && auto_pop_combos)
707 gnc_item_edit_show_popup (box->item_edit);
708 box->list_popped = TRUE;
711 gnc_basic_cell_set_value_internal (_cell, box_str);
716 gnc_combo_cell_direct_update (BasicCell* bcell,
717 int* cursor_position,
718 int* start_selection,
723 PopBox* box = cell->cell.gui_private;
724 GdkEventKey*
event = gui_data;
725 gboolean keep_on_going = FALSE;
726 gboolean extra_colon;
727 gunichar unicode_value;
729 const char* match_str;
734 if (event->type != GDK_KEY_PRESS)
737 unicode_value = gdk_keyval_to_unicode (event->keyval);
738 switch (event->keyval)
741 if (! (event->state & GDK_MOD1_MASK))
743 if (unicode_value == box->complete_char)
748 keep_on_going = TRUE;
751 case GDK_KEY_ISO_Left_Tab:
752 if (gnc_item_list_using_temp (box->item_list))
755 g_signal_emit_by_name (G_OBJECT (box->item_list),
"change_item",
756 string, (gpointer)bcell);
760 if (! (event->state & GDK_CONTROL_MASK) &&
765 (box->qf, bcell->value, *cursor_position);
770 (match, &prefix_len);
776 if ((match_str != NULL) &&
777 (strncmp (match_str, bcell->value,
778 strlen (bcell->value)) == 0) &&
779 (strcmp (match_str, bcell->value) != 0))
781 gnc_basic_cell_set_value_internal (bcell,
784 block_list_signals (cell);
785 gnc_item_list_select (box->item_list,
787 unblock_list_signals (cell);
790 *cursor_position += prefix_len;
791 *start_selection = *cursor_position;
796 if (box->complete_char == 0)
799 if (unicode_value != box->complete_char)
802 if (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))
805 if ((*cursor_position < bcell->value_chars) &&
806 ((*end_selection < bcell->value_chars) ||
807 (*cursor_position < *start_selection)))
810 if ((*cursor_position == bcell->value_chars) &&
811 (*start_selection != *end_selection) &&
812 (*end_selection < bcell->value_chars))
816 if (*start_selection < bcell->value_chars)
818 int i = *start_selection;
822 c = g_utf8_offset_to_pointer (bcell->value, i);
825 uc = g_utf8_get_char (c);
826 if (uc == box->complete_char)
831 c = g_utf8_next_char (c);
843 new_pos = bcell->value_chars;
848 bcell->value, new_pos);
864 if ((match_str != NULL) &&
865 (strncmp (match_str, bcell->value, strlen (bcell->value)) == 0) &&
866 (strcmp (match_str, bcell->value) != 0))
868 gnc_basic_cell_set_value_internal (bcell, match_str);
870 block_list_signals (cell);
871 gnc_item_list_select (box->item_list, match_str);
872 unblock_list_signals (cell);
875 *cursor_position = new_pos;
876 *start_selection = new_pos;
883 gnc_combo_cell_gui_realize (BasicCell* bcell, gpointer data)
885 GnucashSheet* sheet = data;
886 GncItemEdit* item_edit = gnucash_sheet_get_item_edit (sheet);
888 PopBox* box = cell->cell.gui_private;
892 box->item_edit = item_edit;
893 if (cell->shared_store)
894 box->item_list = GNC_ITEM_LIST (gnc_item_list_new (cell->shared_store));
896 box->item_list = GNC_ITEM_LIST (gnc_item_list_new (box->tmp_store));
897 gtk_widget_show_all (GTK_WIDGET (box->item_list));
898 g_object_ref_sink (box->item_list);
901 cell->cell.gui_realize = NULL;
902 cell->cell.gui_move = gnc_combo_cell_gui_move;
903 cell->cell.enter_cell = gnc_combo_cell_enter;
904 cell->cell.leave_cell = gnc_combo_cell_leave;
905 cell->cell.gui_destroy = gnc_combo_cell_gui_destroy;
906 cell->cell.modify_verify = gnc_combo_cell_modify_verify;
907 cell->cell.direct_update = gnc_combo_cell_direct_update;
911 gnc_combo_cell_gui_move (BasicCell* bcell)
913 PopBox* box = bcell->gui_private;
915 combo_disconnect_signals ((
ComboCell*) bcell);
917 gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
918 NULL, NULL, NULL, NULL, NULL);
920 gnc_item_list_select (box->item_list, NULL);
922 box->list_popped = FALSE;
926 popup_get_height (GtkWidget* widget,
928 G_GNUC_UNUSED
int row_height,
932 GtkScrolledWindow* scrollwin = GNC_ITEM_LIST(widget)->scrollwin;
936 if (box->item_edit->popup_allocation_height != -1)
937 height = box->item_edit->popup_allocation_height;
939 height = gnc_item_list_get_popup_height (GNC_ITEM_LIST(widget));
941 if (height < space_available)
945 gint ret_height = height ? height : 1;
947 gtk_widget_set_size_request (GTK_WIDGET(scrollwin), -1, ret_height);
948 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin),
949 GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
953 gtk_widget_set_size_request (GTK_WIDGET(scrollwin), -1, -1);
955 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin),
956 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
957 return space_available;
961 popup_autosize (GtkWidget* widget,
967 if (!box || !box->autosize)
970 return gnc_item_list_autosize (GNC_ITEM_LIST (widget)) + 20;
974 popup_set_focus (GtkWidget* widget,
975 G_GNUC_UNUSED gpointer user_data)
980 if (gnc_item_list_num_entries (GNC_ITEM_LIST (widget)))
981 gtk_widget_grab_focus (GTK_WIDGET (GNC_ITEM_LIST (widget)->tree_view));
985 popup_post_show (GtkWidget* widget,
986 G_GNUC_UNUSED gpointer user_data)
988 gnc_item_list_autosize (GNC_ITEM_LIST (widget));
989 gnc_item_list_show_selected (GNC_ITEM_LIST (widget));
993 popup_get_width (GtkWidget* widget,
994 G_GNUC_UNUSED gpointer user_data)
997 gtk_widget_get_allocation (GTK_WIDGET (GNC_ITEM_LIST (widget)->tree_view),
1003 gnc_combo_cell_enter (BasicCell* bcell,
1004 int* cursor_position,
1005 int* start_selection,
1009 PopBox* box = bcell->gui_private;
1010 PopupToggle popup_toggle;
1014 find = g_list_find_custom (box->ignore_strings,
1016 (GCompareFunc) strcmp);
1020 gnc_item_edit_set_popup (box->item_edit,
1021 GTK_WIDGET (box->item_list),
1022 popup_get_height, popup_autosize,
1023 popup_set_focus, popup_post_show,
1024 popup_get_width, box);
1026 block_list_signals (cell);
1028 if (cell->shared_store && gnc_item_list_using_temp (box->item_list))
1031 gnc_item_list_set_temp_store (box->item_list, NULL);
1032 gtk_list_store_clear (box->tmp_store);
1034 gnc_item_list_select (box->item_list, bcell->value);
1035 unblock_list_signals (cell);
1037 popup_toggle = box->item_edit->popup_toggle;
1040 gtk_widget_set_sensitive (GTK_WIDGET(popup_toggle.tbutton),
1041 gnc_item_list_num_entries (box->item_list));
1043 combo_connect_signals (cell);
1045 *cursor_position = -1;
1046 *start_selection = 0;
1047 *end_selection = -1;
1053 gnc_combo_cell_leave (BasicCell* bcell)
1055 PopBox* box = bcell->gui_private;
1057 combo_disconnect_signals ((
ComboCell*) bcell);
1059 gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
1060 NULL, NULL, NULL, NULL, NULL);
1062 box->list_popped = FALSE;
1068 if (!bcell->changed)
1071 if (gnc_item_in_list (box->item_list, bcell->value))
1074 if (g_list_find_custom (box->ignore_strings,
1076 (GCompareFunc) strcmp))
1079 gnc_basic_cell_set_value_internal (bcell,
"");
1091 box = cell->cell.gui_private;
1093 box->strict = strict;
1104 box = cell->cell.gui_private;
1106 box->complete_char = complete_char;
1111 const char* ignore_string)
1121 box = cell->cell.gui_private;
1123 box->ignore_strings = g_list_prepend (box->ignore_strings,
1124 g_strdup (ignore_string));
1135 box = cell->cell.gui_private;
1139 box->autosize = autosize;
void gnc_quickfill_insert(QuickFill *qf, const char *text, QuickFillSort sort)
Add the string "text" to the collection of searchable strings.
QuickFill * gnc_quickfill_get_char_match(QuickFill *qf, gunichar uc)
Return the subnode of the tree whose strings all hold 'c' as the next letter.
gulong gnc_prefs_register_cb(const char *group, const gchar *pref_name, gpointer func, gpointer user_data)
Register a callback that gets triggered when the given preference changes.
void gnc_combo_cell_set_sort_enabled(ComboCell *cell, gboolean enabled)
Enable sorting of the menu item's contents.
void gnc_combo_cell_add_ignore_string(ComboCell *cell, const char *ignore_string)
Add a string to a list of strings which, if the cell has that value, will cause the cell to be unedit...
void gnc_combo_cell_set_complete_char(ComboCell *cell, gunichar complete_char)
Sets a character used for special completion processing.
void gnc_combo_cell_add_account_menu_item(ComboCell *cell, char *menustr)
Add a 'account name' menu item to the list.
Account handling public routines.
The ComboCell object implements a cell handler with a "combination-box" pull-down menu in it...
QuickFill * gnc_quickfill_get_string_len_match(QuickFill *qf, const char *str, int len)
Same as gnc_quickfill_get_string_match(), except that the string length is explicitly specified...
void gnc_combo_cell_add_menu_item(ComboCell *cell, const char *menustr)
Add a menu item to the list.
Public Declarations for GncItemList class.
void gnc_combo_cell_set_strict(ComboCell *cell, gboolean strict)
Determines whether the cell will accept strings not in the menu.
QuickFill * gnc_quickfill_get_string_match(QuickFill *qf, const char *str)
Return a subnode in the tree whose strings all match the string 'str' as the next substring...
Public declarations of GnucashRegister class.
Private declarations for GnucashSheet class.
Generic api to store and retrieve preferences.
const char * gnc_quickfill_string(QuickFill *qf)
For the given node 'qf', return the best-guess matching string.
Public declarations for GncItemEdit class.
gboolean gnc_prefs_get_bool(const gchar *group, const gchar *pref_name)
Get a boolean value from the preferences backend.
Declarations for the Table object.
QuickFill is used to auto-complete typed user entries.
void gnc_combo_cell_use_quickfill_cache(ComboCell *cell, QuickFill *shared_qf)
Tell the combocell to use a shared QuickFill object.
QuickFill * gnc_quickfill_get_unique_len_match(QuickFill *qf, int *length)
Walk a 'unique' part of the QuickFill tree.
void gnc_combo_cell_set_autosize(ComboCell *cell, gboolean autosize)
Determines whether the popup list autosizes itself or uses all available space.
char * gnc_item_list_get_selection(GncItemList *item_list)
Retrieve the selected string from the item_list's active GtkListStore.
const gchar * gnc_get_account_separator_string(void)
Returns the account separation character chosen by the user.