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)
572 gnc_item_list_set_temp_store (box->item_list, NULL);
573 gnc_item_edit_show_popup (box->item_edit);
574 box->list_popped = TRUE;
578 while (valid && num_found < MAX_NUM_MATCHES)
580 gchar* str_data = NULL;
581 gchar* normalized_str_data = NULL;
582 gtk_tree_model_get (GTK_TREE_MODEL (full_store), &iter, 0,
584 normalized_str_data = g_utf8_normalize (str_data, -1, G_NORMALIZE_NFC);
586 if (g_regex_match (regex, normalized_str_data, 0, NULL))
589 match_str = g_strdup (str_data);
591 list_store_append (box->tmp_store, str_data);
594 g_free (normalized_str_data);
595 valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (full_store), &iter);
600 gnc_item_list_set_temp_store (box->item_list, box->tmp_store);
601 gnc_item_edit_show_popup (box->item_edit);
602 box->list_popped = TRUE;
606 g_regex_unref (regex);
611 quickfill_match (QuickFill *qf,
const char *
string)
619 gnc_combo_cell_modify_verify (BasicCell* _cell,
624 int* cursor_position,
625 int* start_selection,
629 PopBox* box = cell->cell.gui_private;
630 gchar* match_str = NULL;
633 const gchar* box_str = NULL;
635 newval_chars = g_utf8_strlen (newval, newval_len);
636 change_chars = g_utf8_strlen (change, change_len);
638 if (box->in_list_select)
640 gnc_basic_cell_set_value_internal (_cell, newval);
641 *cursor_position = -1;
642 *start_selection = 0;
650 if (!gnc_item_list_using_temp (box->item_list))
653 if (change == NULL || *cursor_position < _cell->value_chars)
655 gnc_basic_cell_set_value_internal (_cell, newval);
656 *start_selection = *end_selection = *cursor_position;
660 match_str = quickfill_match (box->qf, newval);
662 if (match_str != NULL)
664 *start_selection = newval_chars;
666 *cursor_position += change_chars;
669 block_list_signals (cell);
670 gnc_item_list_select (box->item_list, match_str);
671 unblock_list_signals (cell);
676 if (match_str == NULL && cell->shared_store)
679 GtkListStore *store = cell->shared_store;
680 match_str = gnc_combo_cell_type_ahead_search (newval, store, cell);
681 *start_selection = newval_chars;
683 *cursor_position = newval_chars;
690 if (match_str == NULL)
692 block_list_signals (cell);
693 if (cell->shared_store && gnc_item_list_using_temp (box->item_list))
695 gnc_item_list_set_temp_store (box->item_list, NULL);
696 gtk_list_store_clear (box->tmp_store);
698 gnc_item_list_select (box->item_list, NULL);
699 unblock_list_signals (cell);
700 gnc_basic_cell_set_value_internal (_cell, newval);
701 *cursor_position = *start_selection = newval_chars;
706 if (!box->list_popped && auto_pop_combos)
708 gnc_item_edit_show_popup (box->item_edit);
709 box->list_popped = TRUE;
712 gnc_basic_cell_set_value_internal (_cell, box_str);
717 gnc_combo_cell_direct_update (BasicCell* bcell,
718 int* cursor_position,
719 int* start_selection,
724 PopBox* box = cell->cell.gui_private;
725 GdkEventKey*
event = gui_data;
726 gboolean keep_on_going = FALSE;
727 gboolean extra_colon;
728 gunichar unicode_value;
730 const char* match_str;
735 if (event->type != GDK_KEY_PRESS)
738 unicode_value = gdk_keyval_to_unicode (event->keyval);
739 switch (event->keyval)
744 const char *value = gnc_table_get_model_entry (box->sheet->table, bcell->cell_name);
746 if (cell->shared_store && gnc_item_list_using_temp (box->item_list))
748 gnc_item_list_set_temp_store (box->item_list, NULL);
749 gtk_list_store_clear (box->tmp_store);
751 gnc_basic_cell_set_value_internal (bcell, value);
752 bcell->changed = FALSE;
753 block_list_signals (cell);
754 gnc_item_list_select (box->item_list, value);
755 unblock_list_signals (cell);
756 *cursor_position = -1;
757 *start_selection = 0;
763 if (! (event->state & GDK_MOD1_MASK))
765 if (unicode_value == box->complete_char)
770 keep_on_going = TRUE;
773 case GDK_KEY_ISO_Left_Tab:
774 if (gnc_item_list_using_temp (box->item_list))
777 g_signal_emit_by_name (G_OBJECT (box->item_list),
"change_item",
778 string, (gpointer)bcell);
782 if (! (event->state & GDK_CONTROL_MASK) && !keep_on_going)
786 (box->qf, bcell->value, *cursor_position);
791 (match, &prefix_len);
797 if ((match_str != NULL) &&
798 (strncmp (match_str, bcell->value,
799 strlen (bcell->value)) == 0) &&
800 (strcmp (match_str, bcell->value) != 0))
802 gnc_basic_cell_set_value_internal (bcell,
805 block_list_signals (cell);
806 gnc_item_list_select (box->item_list,
808 unblock_list_signals (cell);
811 *cursor_position += prefix_len;
812 *start_selection = *cursor_position;
817 if (box->complete_char == 0)
820 if (unicode_value != box->complete_char)
823 if (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))
826 if ((*cursor_position < bcell->value_chars) &&
827 ((*end_selection < bcell->value_chars) ||
828 (*cursor_position < *start_selection)))
831 if ((*cursor_position == bcell->value_chars) &&
832 (*start_selection != *end_selection) &&
833 (*end_selection < bcell->value_chars))
837 if (*start_selection < bcell->value_chars)
839 int i = *start_selection;
843 c = g_utf8_offset_to_pointer (bcell->value, i);
846 uc = g_utf8_get_char (c);
847 if (uc == box->complete_char)
852 c = g_utf8_next_char (c);
864 new_pos = bcell->value_chars;
869 bcell->value, new_pos);
885 if ((match_str != NULL) &&
886 (strncmp (match_str, bcell->value, strlen (bcell->value)) == 0) &&
887 (strcmp (match_str, bcell->value) != 0))
889 gnc_basic_cell_set_value_internal (bcell, match_str);
891 block_list_signals (cell);
892 gnc_item_list_select (box->item_list, match_str);
893 unblock_list_signals (cell);
896 *cursor_position = new_pos;
897 *start_selection = new_pos;
904 gnc_combo_cell_gui_realize (BasicCell* bcell, gpointer data)
906 GnucashSheet* sheet = data;
907 GncItemEdit* item_edit = gnucash_sheet_get_item_edit (sheet);
909 PopBox* box = cell->cell.gui_private;
913 box->item_edit = item_edit;
914 if (cell->shared_store)
915 box->item_list = GNC_ITEM_LIST (gnc_item_list_new (cell->shared_store));
917 box->item_list = GNC_ITEM_LIST (gnc_item_list_new (box->tmp_store));
918 gtk_widget_show_all (GTK_WIDGET (box->item_list));
919 g_object_ref_sink (box->item_list);
922 cell->cell.gui_realize = NULL;
923 cell->cell.gui_move = gnc_combo_cell_gui_move;
924 cell->cell.enter_cell = gnc_combo_cell_enter;
925 cell->cell.leave_cell = gnc_combo_cell_leave;
926 cell->cell.gui_destroy = gnc_combo_cell_gui_destroy;
927 cell->cell.modify_verify = gnc_combo_cell_modify_verify;
928 cell->cell.direct_update = gnc_combo_cell_direct_update;
932 gnc_combo_cell_gui_move (BasicCell* bcell)
934 PopBox* box = bcell->gui_private;
936 combo_disconnect_signals ((
ComboCell*) bcell);
938 gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
939 NULL, NULL, NULL, NULL, NULL);
941 gnc_item_list_select (box->item_list, NULL);
943 box->list_popped = FALSE;
947 popup_get_height (GtkWidget* widget,
949 G_GNUC_UNUSED
int row_height,
953 GtkScrolledWindow* scrollwin = GNC_ITEM_LIST(widget)->scrollwin;
957 if (box->item_edit->popup_allocation_height != -1)
958 height = box->item_edit->popup_allocation_height;
960 height = gnc_item_list_get_popup_height (GNC_ITEM_LIST(widget));
962 if (height < space_available)
966 gint ret_height = height ? height : 1;
968 gtk_widget_set_size_request (GTK_WIDGET(scrollwin), -1, ret_height);
969 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin),
970 GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
974 gtk_widget_set_size_request (GTK_WIDGET(scrollwin), -1, -1);
976 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin),
977 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
978 return space_available;
982 popup_autosize (GtkWidget* widget,
988 if (!box || !box->autosize)
991 return gnc_item_list_autosize (GNC_ITEM_LIST (widget)) + 20;
995 popup_set_focus (GtkWidget* widget,
996 G_GNUC_UNUSED gpointer user_data)
1001 if (gnc_item_list_num_entries (GNC_ITEM_LIST (widget)))
1002 gtk_widget_grab_focus (GTK_WIDGET (GNC_ITEM_LIST (widget)->tree_view));
1006 popup_post_show (GtkWidget* widget,
1007 G_GNUC_UNUSED gpointer user_data)
1009 gnc_item_list_autosize (GNC_ITEM_LIST (widget));
1010 gnc_item_list_show_selected (GNC_ITEM_LIST (widget));
1014 popup_get_width (GtkWidget* widget,
1015 G_GNUC_UNUSED gpointer user_data)
1017 GtkAllocation alloc;
1018 gtk_widget_get_allocation (GTK_WIDGET (GNC_ITEM_LIST (widget)->tree_view),
1024 gnc_combo_cell_enter (BasicCell* bcell,
1025 int* cursor_position,
1026 int* start_selection,
1030 PopBox* box = bcell->gui_private;
1031 PopupToggle popup_toggle;
1035 find = g_list_find_custom (box->ignore_strings,
1037 (GCompareFunc) strcmp);
1041 gnc_item_edit_set_popup (box->item_edit,
1042 GTK_WIDGET (box->item_list),
1043 popup_get_height, popup_autosize,
1044 popup_set_focus, popup_post_show,
1045 popup_get_width, box);
1047 block_list_signals (cell);
1049 if (cell->shared_store && gnc_item_list_using_temp (box->item_list))
1052 gnc_item_list_set_temp_store (box->item_list, NULL);
1053 gtk_list_store_clear (box->tmp_store);
1055 gnc_item_list_select (box->item_list, bcell->value);
1056 unblock_list_signals (cell);
1058 popup_toggle = box->item_edit->popup_toggle;
1061 gtk_widget_set_sensitive (GTK_WIDGET(popup_toggle.tbutton),
1062 gnc_item_list_num_entries (box->item_list));
1064 combo_connect_signals (cell);
1066 *cursor_position = -1;
1067 *start_selection = 0;
1068 *end_selection = -1;
1074 gnc_combo_cell_leave (BasicCell* bcell)
1076 PopBox* box = bcell->gui_private;
1078 combo_disconnect_signals ((
ComboCell*) bcell);
1080 gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
1081 NULL, NULL, NULL, NULL, NULL);
1083 box->list_popped = FALSE;
1089 if (!bcell->changed)
1092 if (gnc_item_in_list (box->item_list, bcell->value))
1095 if (g_list_find_custom (box->ignore_strings,
1097 (GCompareFunc) strcmp))
1100 gnc_basic_cell_set_value_internal (bcell,
"");
1112 box = cell->cell.gui_private;
1114 box->strict = strict;
1125 box = cell->cell.gui_private;
1127 box->complete_char = complete_char;
1132 const char* ignore_string)
1142 box = cell->cell.gui_private;
1144 box->ignore_strings = g_list_prepend (box->ignore_strings,
1145 g_strdup (ignore_string));
1156 box = cell->cell.gui_private;
1160 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.