36 #include <gdk/gdkkeysyms.h> 38 #include "completioncell.h" 47 typedef struct _PopBox
53 GHashTable* item_hash;
54 GtkListStore* item_store;
59 gboolean signals_connected;
64 gboolean sort_enabled;
65 gboolean register_is_reversed;
66 gboolean stop_searching;
69 gboolean in_list_select;
75 #define DONT_TEXT N_("Don't autocomplete") 78 enum GncCompletionColumn
86 static void gnc_completion_cell_gui_realize (BasicCell* bcell, gpointer w);
87 static void gnc_completion_cell_gui_move (BasicCell* bcell);
88 static void gnc_completion_cell_gui_destroy (BasicCell* bcell);
89 static gboolean gnc_completion_cell_enter (BasicCell* bcell,
93 static void gnc_completion_cell_leave (BasicCell* bcell);
94 static void gnc_completion_cell_destroy (BasicCell* bcell);
97 gnc_completion_cell_new (
void)
100 gnc_completion_cell_init (cell);
107 gnc_basic_cell_init (& (cell->cell));
109 cell->cell.is_popup = TRUE;
111 cell->cell.destroy = gnc_completion_cell_destroy;
113 cell->cell.gui_realize = gnc_completion_cell_gui_realize;
114 cell->cell.gui_destroy = gnc_completion_cell_gui_destroy;
119 box->item_edit = NULL;
120 box->item_list = NULL;
121 box->item_store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_STRING,
122 G_TYPE_INT, G_TYPE_INT);
123 box->signals_connected = FALSE;
124 box->list_popped = FALSE;
125 box->autosize = FALSE;
126 box->register_is_reversed = FALSE;
128 box->sort_enabled = FALSE;
130 cell->cell.gui_private = box;
132 box->stop_searching = FALSE;
135 box->in_list_select = FALSE;
138 box->item_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
144 gnc_item_edit_hide_popup (box->item_edit);
145 box->list_popped = FALSE;
149 select_item_cb (
GncItemList* item_list,
char* item_string, gpointer user_data)
152 PopBox* box = cell->cell.gui_private;
154 box->in_list_select = TRUE;
155 gnucash_sheet_modify_current_cell (box->sheet, item_string);
156 box->in_list_select = FALSE;
162 text_width (PangoLayout *layout)
164 PangoRectangle logical_rect;
165 pango_layout_set_width (layout, -1);
166 pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
167 return logical_rect.width;
171 horizontal_scroll_to_found_text (
PopBox* box,
char* item_string, gint found_location)
173 if (!gtk_widget_get_realized (GTK_WIDGET(box->item_list->tree_view)))
177 gtk_widget_get_allocation (GTK_WIDGET(box->item_list->tree_view), &alloc);
178 gint scroll_point = 0;
179 gchar *start_string = g_utf8_substring (item_string, 0, found_location + box->newval_len);
181 PangoLayout *layout = gtk_widget_create_pango_layout (GTK_WIDGET(box->item_list->tree_view), item_string);
182 PangoAttrList *atlist = pango_attr_list_new ();
183 PangoAttribute *bold_weight = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
184 bold_weight->start_index = found_location;
185 bold_weight->end_index = found_location + box->newval_len;
186 pango_attr_list_insert (atlist, bold_weight);
187 pango_layout_set_attributes (layout, atlist);
189 gint item_string_width = text_width (layout);
191 pango_layout_set_text (layout, start_string, -1);
193 gint start_string_width = text_width (layout);
195 pango_attr_list_unref (atlist);
196 g_object_unref (layout);
197 g_free (start_string);
199 if (item_string_width <= alloc.width)
202 scroll_point = start_string_width - alloc.width / 2;
204 if (scroll_point < 0)
207 gtk_tree_view_scroll_to_point (box->item_list->tree_view, scroll_point, -1);
211 change_item_cb (
GncItemList* item_list,
char* item_string, gpointer user_data)
214 PopBox* box = cell->cell.gui_private;
216 box->in_list_select = TRUE;
217 gnucash_sheet_modify_current_cell (box->sheet, item_string);
218 box->in_list_select = FALSE;
220 GtkTreeModel *model = gtk_tree_view_get_model (item_list->tree_view);
221 GtkTreeSelection *selection = gtk_tree_view_get_selection (item_list->tree_view);
223 if (gtk_tree_selection_get_selected (selection, &model, &iter))
226 gtk_tree_model_get (model, &iter, FOUND_LOCATION_COL, &found_location, -1);
227 horizontal_scroll_to_found_text (box, item_string, found_location);
232 activate_item_cb (
GncItemList* item_list,
char* item_string, gpointer user_data)
235 PopBox* box = cell->cell.gui_private;
242 PopBox* box = cell->cell.gui_private;
244 if (!box->signals_connected)
247 g_signal_handlers_block_matched (G_OBJECT(box->item_list),
249 0, 0, NULL, NULL, cell);
255 PopBox* box = cell->cell.gui_private;
257 if (!box->signals_connected)
260 g_signal_handlers_unblock_matched (G_OBJECT(box->item_list),
262 0, 0, NULL, NULL, cell);
266 key_press_item_cb (
GncItemList* item_list, GdkEventKey* event, gpointer user_data)
269 PopBox* box = cell->cell.gui_private;
271 switch (event->keyval)
274 block_list_signals (cell);
275 gnc_item_list_select (box->item_list, NULL);
276 unblock_list_signals (cell);
281 gtk_widget_event (GTK_WIDGET (box->sheet),
290 PopBox* box = cell->cell.gui_private;
292 if (!box->signals_connected)
295 g_signal_handlers_disconnect_matched (G_OBJECT(box->item_list),
297 0, 0, NULL, NULL, cell);
299 box->signals_connected = FALSE;
305 PopBox* box = cell->cell.gui_private;
307 if (box->signals_connected)
310 g_signal_connect (G_OBJECT(box->item_list),
"select_item",
311 G_CALLBACK(select_item_cb), cell);
313 g_signal_connect (G_OBJECT(box->item_list),
"change_item",
314 G_CALLBACK(change_item_cb), cell);
316 g_signal_connect (G_OBJECT(box->item_list),
"activate_item",
317 G_CALLBACK(activate_item_cb), cell);
319 g_signal_connect (G_OBJECT(box->item_list),
"key_press_event",
320 G_CALLBACK(key_press_item_cb), cell);
322 box->signals_connected = TRUE;
326 gnc_completion_cell_gui_destroy (BasicCell* bcell)
330 if (cell->cell.gui_realize)
332 PopBox* box = bcell->gui_private;
333 if (box && box->item_list)
335 completion_disconnect_signals (cell);
336 g_object_unref (box->item_list);
337 box->item_list = NULL;
340 cell->cell.gui_realize = gnc_completion_cell_gui_realize;
341 cell->cell.gui_move = NULL;
342 cell->cell.enter_cell = NULL;
343 cell->cell.leave_cell = NULL;
344 cell->cell.gui_destroy = NULL;
349 gnc_completion_cell_destroy (BasicCell* bcell)
352 PopBox* box = cell->cell.gui_private;
354 gnc_completion_cell_gui_destroy (& (cell->cell));
359 g_hash_table_destroy (box->item_hash);
362 cell->cell.gui_private = NULL;
364 cell->cell.gui_private = NULL;
365 cell->cell.gui_realize = NULL;
369 sort_func (GtkTreeModel* model, GtkTreeIter* iter_a, GtkTreeIter* iter_b, gpointer user_data)
371 gint a_weight, b_weight;
374 gtk_tree_model_get (model, iter_a, WEIGHT_COL, &a_weight, -1);
375 gtk_tree_model_get (model, iter_b, WEIGHT_COL, &b_weight, -1);
377 if (a_weight < b_weight)
379 else if (a_weight > b_weight)
392 PopBox* box = cell->cell.gui_private;
393 box->sort_enabled = enabled;
397 set_sort_column_enabled (
PopBox* box, gboolean enable)
401 gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE(box->item_list->list_store),
402 WEIGHT_COL, sort_func, box->item_list, NULL);
404 gnc_item_list_set_sort_column (box->item_list, WEIGHT_COL);
407 gnc_item_list_set_sort_column (box->item_list, GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID);
416 PopBox* box = cell->cell.gui_private;
419 GtkListStore *store = gnc_item_list_disconnect_store (box->item_list);
421 block_list_signals (cell);
423 if (box->sort_enabled)
424 set_sort_column_enabled (box, FALSE);
426 box->stop_searching = FALSE;
427 gtk_list_store_clear (box->item_store);
429 if (box->sort_enabled)
430 set_sort_column_enabled (box, TRUE);
432 unblock_list_signals (cell);
435 gnc_item_list_connect_store (box->item_list, store);
446 PopBox* box = cell->cell.gui_private;
452 g_hash_table_remove_all (box->item_hash);
453 item_store_clear (cell);
462 if (!cell || !menustr)
465 PopBox* box = cell->cell.gui_private;
469 gpointer value = g_hash_table_lookup (box->item_hash, menustr);
470 gboolean update = FALSE;
473 if (!box->register_is_reversed)
481 g_hash_table_insert (box->item_hash, g_strdup (menustr),
482 GINT_TO_POINTER(box->occurrence));
489 gnc_completion_cell_set_value (
CompletionCell* cell,
const char* str)
493 gnc_basic_cell_set_value (&cell->cell, str);
497 list_store_append (GtkListStore *store,
char*
string,
498 char* markup, gint weight, gint found_location)
502 g_return_if_fail (store);
503 g_return_if_fail (
string);
504 g_return_if_fail (markup);
506 gtk_list_store_append (store, &iter);
508 gtk_list_store_set (store, &iter, TEXT_COL,
string,
509 TEXT_MARKUP_COL, markup,
511 FOUND_LOCATION_COL, found_location, -1);
515 normalize_and_fold (
char* utf8_string)
517 char *normalized = g_utf8_normalize (utf8_string, -1, G_NORMALIZE_NFC);
521 char *folded = g_utf8_casefold (normalized, -1);
527 test_and_add (
PopBox* box,
const gchar *text, gint start_pos,
528 gpointer key, gint occurrence_difference)
531 gint text_length = g_utf8_strlen (text, -1);
533 if (start_pos > text_length)
536 gchar *sub_text = g_utf8_substring (text, start_pos, text_length);
537 gchar *sub_text_norm_fold = normalize_and_fold (sub_text);
538 gchar *found_text_ptr = g_strstr_len (sub_text_norm_fold, -1, box->newval);
542 gchar *markup = NULL, *prefix = NULL, *match = NULL, *suffix = NULL;
543 glong newval_length = g_utf8_strlen (box->newval, -1);
544 gulong found_location = g_utf8_pointer_to_offset (sub_text_norm_fold,
545 found_text_ptr) + start_pos;
546 gboolean have_boundary = FALSE;
550 if (found_location > 0)
551 prefix = g_utf8_substring (text, 0, found_location);
553 prefix = g_strdup (
"");
555 prefix_length = g_utf8_strlen (prefix, -1);
557 match = g_utf8_substring (text, found_location, found_location + newval_length);
559 if (found_location - start_pos >= 1)
561 gunichar prev = g_utf8_get_char (g_utf8_offset_to_pointer (sub_text, found_location - start_pos - 1));
562 if (prev && (g_unichar_isspace (prev) || g_unichar_ispunct (prev)))
563 have_boundary = TRUE;
565 ret_value = found_location + 1;
568 suffix = g_utf8_substring (text, found_location + newval_length, text_length);
570 markup = g_markup_printf_escaped (
"%s<b>%s</b>%s%s", prefix, match, suffix,
" ");
572 if ((prefix_length == 0 ) || have_boundary)
574 weight = occurrence_difference;
576 if (g_strcmp0 (sub_text_norm_fold, box->newval) == 0)
579 list_store_append (box->item_store, key, markup, weight, found_location);
586 g_free (sub_text_norm_fold);
592 add_item (gpointer key, gpointer value, gpointer user_data)
595 gchar *hash_entry = g_strdup (key);
597 if (hash_entry && *hash_entry)
600 gint occurrence_difference;
603 if (box->register_is_reversed)
604 occurrence_difference = GPOINTER_TO_INT(value) + 1;
606 occurrence_difference = box->occurrence - GPOINTER_TO_INT(value);
610 start_pos = test_and_add (box, hash_entry, start_pos, key, occurrence_difference);
612 while (start_pos != -1);
618 select_first_entry_in_list (
PopBox* box)
620 GtkTreeModel *model = gtk_tree_view_get_model (box->item_list->tree_view);
624 if (!gtk_tree_model_get_iter_first (model, &iter))
627 if (!gtk_tree_model_iter_next (model, &iter))
630 gtk_tree_model_get (model, &iter, TEXT_COL, &
string, -1);
632 gnc_item_list_select (box->item_list,
string);
634 GtkTreePath* path = gtk_tree_path_new_first ();
635 gtk_tree_view_scroll_to_cell (box->item_list->tree_view,
636 path, NULL, TRUE, 0.5, 0.0);
637 gtk_tree_path_free (path);
644 PopBox* box = cell->cell.gui_private;
646 box->in_list_select = FALSE;
647 box->item_edit->popup_allocation_height = -1;
649 if (box->stop_searching)
653 box->newval = normalize_and_fold ((gchar*)str);
657 box->newval_len = g_utf8_strlen (str, -1);
660 box->item_store = gnc_item_list_disconnect_store (box->item_list);
662 block_list_signals (cell);
664 if (box->sort_enabled)
665 set_sort_column_enabled (box, FALSE);
667 gtk_list_store_clear (box->item_store);
670 gchar *markup = g_markup_printf_escaped (
"<i>%s</i>", DONT_TEXT);
671 list_store_append (box->item_store, DONT_TEXT, markup, 0, 0);
675 g_hash_table_foreach (box->item_hash, add_item, box);
677 if (box->sort_enabled)
678 set_sort_column_enabled (box, TRUE);
680 unblock_list_signals (cell);
683 gnc_item_list_connect_store (box->item_list, box->item_store);
686 gtk_tree_view_column_queue_resize (gtk_tree_view_get_column (
687 box->item_list->tree_view, TEXT_COL));
690 if (gtk_tree_model_iter_n_children (GTK_TREE_MODEL(box->item_store), NULL) == 1)
692 box->stop_searching = TRUE;
696 gnc_item_edit_show_popup (box->item_edit);
698 block_list_signals (cell);
699 select_first_entry_in_list (box);
700 unblock_list_signals (cell);
702 g_free (box->newval);
706 gnc_completion_cell_modify_verify (BasicCell* bcell,
711 int* cursor_position,
712 int* start_selection,
716 PopBox* box = cell->cell.gui_private;
717 glong newval_chars = g_utf8_strlen (newval, newval_len);
719 if (box->in_list_select)
721 if (g_strcmp0 (newval, DONT_TEXT) == 0)
723 gnc_basic_cell_set_value_internal (bcell, newval);
724 *cursor_position = -1;
725 *start_selection = 0;
731 if (((*cursor_position < newval_chars) &&
732 (g_utf8_strlen (bcell->value, -1) < newval_chars)) ||
733 (g_utf8_strlen (bcell->value, -1) > newval_chars))
735 box->stop_searching = FALSE;
739 if (change == NULL || *cursor_position < bcell->value_chars)
740 *start_selection = *end_selection = *cursor_position;
742 gchar *start_of_text = g_utf8_substring (newval, 0, *cursor_position);
743 populate_list_store (cell, start_of_text);
744 g_free (start_of_text);
746 if (g_strcmp0 (newval,
"") == 0)
748 block_list_signals (cell);
749 gnc_item_list_select (box->item_list, NULL);
750 unblock_list_signals (cell);
753 gnc_basic_cell_set_value_internal (bcell, newval);
762 PopBox* box = cell->cell.gui_private;
764 if (box->item_hash && (g_hash_table_size (box->item_hash) == 1))
766 GList *keys = g_hash_table_get_keys (box->item_hash);
767 char *ret = g_strdup (keys->data);
775 gnc_completion_cell_direct_update (BasicCell* bcell,
776 int* cursor_position,
777 int* start_selection,
782 PopBox* box = cell->cell.gui_private;
783 GdkEventKey*
event = gui_data;
785 if (event->type != GDK_KEY_PRESS)
788 switch (event->keyval)
791 case GDK_KEY_ISO_Left_Tab:
793 if (event->state & GDK_CONTROL_MASK)
795 char* hash_string = get_entry_from_hash_if_size_is_one (cell);
799 gnc_basic_cell_set_value_internal (bcell, hash_string);
800 *cursor_position = strlen (hash_string);
802 g_free (hash_string);
811 g_signal_emit_by_name (G_OBJECT(box->item_list),
"change_item",
812 string, (gpointer)bcell);
820 box->in_list_select = gnc_item_in_list (box->item_list, bcell->value);
823 item_store_clear (cell);
834 PopBox* box = cell->cell.gui_private;
836 if (is_reversed != box->register_is_reversed)
838 gnc_completion_cell_clear_menu (cell);
839 box->register_is_reversed = is_reversed;
845 gnc_completion_cell_gui_realize (BasicCell* bcell, gpointer data)
847 GnucashSheet* sheet = data;
848 GncItemEdit* item_edit = gnucash_sheet_get_item_edit (sheet);
850 PopBox* box = cell->cell.gui_private;
854 box->item_edit = item_edit;
855 box->item_list = GNC_ITEM_LIST(gnc_item_list_new (box->item_store));
857 block_list_signals (cell);
858 set_sort_column_enabled (box, FALSE);
859 unblock_list_signals (cell);
861 gtk_widget_show_all (GTK_WIDGET(box->item_list));
862 g_object_ref_sink (box->item_list);
865 cell->cell.gui_realize = NULL;
866 cell->cell.gui_move = gnc_completion_cell_gui_move;
867 cell->cell.enter_cell = gnc_completion_cell_enter;
868 cell->cell.leave_cell = gnc_completion_cell_leave;
869 cell->cell.gui_destroy = gnc_completion_cell_gui_destroy;
870 cell->cell.modify_verify = gnc_completion_cell_modify_verify;
871 cell->cell.direct_update = gnc_completion_cell_direct_update;
875 reset_item_list_to_default_setup (BasicCell* bcell)
877 PopBox* box = bcell->gui_private;
878 PopupToggle popup_toggle;
882 popup_toggle = box->item_edit->popup_toggle;
883 gtk_widget_set_sensitive (GTK_WIDGET(popup_toggle.tbutton), TRUE);
884 gtk_widget_set_visible (GTK_WIDGET(popup_toggle.tbutton), TRUE);
886 GtkTreeViewColumn *column = gtk_tree_view_get_column (
887 GTK_TREE_VIEW(box->item_list->tree_view), TEXT_COL);
888 gtk_tree_view_column_clear_attributes (column,box->item_list->renderer);
889 gtk_tree_view_column_add_attribute (column, box->item_list->renderer,
891 box->list_popped = FALSE;
895 gnc_completion_cell_gui_move (BasicCell* bcell)
897 PopBox* box = bcell->gui_private;
901 gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
902 NULL, NULL, NULL, NULL, NULL);
904 reset_item_list_to_default_setup (bcell);
908 popup_get_height (GtkWidget* widget,
910 G_GNUC_UNUSED
int row_height,
914 GtkScrolledWindow* scrollwin = GNC_ITEM_LIST(widget)->scrollwin;
918 if (box->item_edit->popup_allocation_height != -1)
919 height = box->item_edit->popup_allocation_height;
921 height = gnc_item_list_get_popup_height (GNC_ITEM_LIST(widget));
923 if (height < space_available)
927 gint ret_height = height ? height : 1;
929 gtk_widget_set_size_request (GTK_WIDGET(scrollwin), -1, ret_height);
930 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrollwin),
931 GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
935 gtk_widget_set_size_request (GTK_WIDGET(scrollwin), -1, -1);
937 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrollwin),
938 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
939 return space_available;
943 popup_autosize (GtkWidget* widget,
949 if (!box || !box->autosize)
952 return gnc_item_list_autosize (GNC_ITEM_LIST(widget)) + 20;
956 popup_set_focus (GtkWidget* widget,
957 G_GNUC_UNUSED gpointer user_data)
962 if (gnc_item_list_num_entries (GNC_ITEM_LIST(widget)))
963 gtk_widget_grab_focus (GTK_WIDGET (GNC_ITEM_LIST(widget)->tree_view));
967 popup_post_show (GtkWidget* widget,
968 G_GNUC_UNUSED gpointer user_data)
970 gnc_item_list_autosize (GNC_ITEM_LIST(widget));
971 gnc_item_list_show_selected (GNC_ITEM_LIST(widget));
975 popup_get_width (GtkWidget* widget,
976 G_GNUC_UNUSED gpointer user_data)
979 gtk_widget_get_allocation (GTK_WIDGET (GNC_ITEM_LIST(widget)->tree_view),
985 tree_view_size_allocate_cb (GtkWidget *widget,
986 G_GNUC_UNUSED GtkAllocation *allocation,
989 GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW(widget));
990 GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(widget));
992 if (gtk_tree_selection_get_selected (selection, &model, &iter))
997 gtk_tree_model_get (model, &iter, TEXT_COL, &item_text,
998 FOUND_LOCATION_COL, &found_location, -1);
999 horizontal_scroll_to_found_text (box, item_text, found_location);
1005 gnc_completion_cell_enter (BasicCell* bcell,
1006 int* cursor_position,
1007 int* start_selection,
1011 PopBox* box = bcell->gui_private;
1012 PopupToggle popup_toggle;
1014 gnc_item_edit_set_popup (box->item_edit,
1015 GTK_WIDGET(box->item_list),
1016 popup_get_height, popup_autosize,
1017 popup_set_focus, popup_post_show,
1018 popup_get_width, box);
1020 popup_toggle = box->item_edit->popup_toggle;
1021 gtk_widget_set_sensitive (GTK_WIDGET(popup_toggle.tbutton), FALSE);
1022 gtk_widget_set_visible (GTK_WIDGET(popup_toggle.tbutton), FALSE);
1024 GtkTreeViewColumn *column = gtk_tree_view_get_column (
1025 GTK_TREE_VIEW(box->item_list->tree_view), TEXT_COL);
1026 gtk_tree_view_column_clear_attributes (column, box->item_list->renderer);
1027 gtk_tree_view_column_add_attribute (column, box->item_list->renderer,
1028 "markup", TEXT_MARKUP_COL);
1030 g_signal_connect (G_OBJECT(box->item_list->tree_view),
"size-allocate",
1031 G_CALLBACK(tree_view_size_allocate_cb), box);
1033 completion_connect_signals (cell);
1035 *cursor_position = -1;
1036 *start_selection = 0;
1037 *end_selection = -1;
1043 gnc_completion_cell_leave (BasicCell* bcell)
1045 PopBox* box = bcell->gui_private;
1049 gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
1050 NULL, NULL, NULL, NULL, NULL);
1052 reset_item_list_to_default_setup (bcell);
1054 if (box->strict && !box->in_list_select)
1055 gnc_basic_cell_set_value_internal (bcell,
"");
1064 PopBox* box = cell->cell.gui_private;
1068 box->strict = strict;
1077 PopBox* box = cell->cell.gui_private;
1081 box->autosize = autosize;
The CompletionCell object implements a cell handler with a "combination-box" pull-down menu in it...
void gnc_completion_cell_reverse_sort(CompletionCell *cell, gboolean is_reversed)
Register the sort direction.
void gnc_completion_cell_set_sort_enabled(CompletionCell *cell, gboolean enabled)
Enable sorting of the menu item's contents.
void gnc_utf8_strip_invalid_and_controls(gchar *str)
Strip any non-utf8 characters and any control characters (everything < 0x20, , , ...
Public Declarations for GncItemList class.
Public declarations of GnucashRegister class.
Private declarations for GnucashSheet class.
Generic api to store and retrieve preferences.
void gnc_completion_cell_add_menu_item(CompletionCell *cell, const char *menustr)
Add a menu item to the hash table list.
Public declarations for GncItemEdit class.
void gnc_completion_cell_set_strict(CompletionCell *cell, gboolean strict)
Determines whether the cell will accept strings not in the menu.
Declarations for the Table object.
void gnc_completion_cell_set_autosize(CompletionCell *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.