mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix the lack of action strings in the popup menu. The problem occurs
because the menu is populated before the the item edit widget is created. Add a list store to track these strings (what the old menustrings list did) which is then passed off to the item_edit widget when that is created. Fixes 334592. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13699 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
58609204d9
commit
089197fd7f
@ -1,3 +1,12 @@
|
||||
2006-03-25 David Hampton <david@hampton-pc.rainbolthampton.net>
|
||||
|
||||
* src/register/register-gnome/combocell-gnome.c: Fix the lack of
|
||||
action strings in the popup menu. The problem occurs because the
|
||||
menu is populated before the the item edit widget is created. Add
|
||||
a list store to track these strings (what the old menustrings list
|
||||
did) which is then passed off to the item_edit widget when that is
|
||||
created. Fixes 334592.
|
||||
|
||||
2006-03-24 David Hampton <david@hampton-pc.rainbolthampton.net>
|
||||
|
||||
* src/gnome/ui/gnc-reconcile-window-ui.xml:
|
||||
|
@ -53,6 +53,7 @@ typedef struct _PopBox
|
||||
GnucashSheet *sheet;
|
||||
GncItemEdit *item_edit;
|
||||
GncItemList *item_list;
|
||||
GtkListStore *tmp_store;
|
||||
|
||||
gboolean signals_connected; /* list signals connected? */
|
||||
|
||||
@ -142,6 +143,7 @@ gnc_combo_cell_init (ComboCell *cell)
|
||||
box->sheet = NULL;
|
||||
box->item_edit = NULL;
|
||||
box->item_list = NULL;
|
||||
box->tmp_store = gtk_list_store_new (1, G_TYPE_STRING);
|
||||
box->signals_connected = FALSE;
|
||||
box->list_popped = FALSE;
|
||||
box->autosize = FALSE;
|
||||
@ -430,7 +432,12 @@ gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr)
|
||||
gnc_item_list_select (box->item_list, menustr);
|
||||
|
||||
unblock_list_signals (cell);
|
||||
}
|
||||
} else {
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_list_store_append(box->tmp_store, &iter);
|
||||
gtk_list_store_set(box->tmp_store, &iter, 0, menustr, -1);
|
||||
}
|
||||
|
||||
/* If we're going to be using a pre-fab quickfill,
|
||||
* then don't fill it in here */
|
||||
@ -742,7 +749,10 @@ gnc_combo_cell_gui_realize (BasicCell *bcell, gpointer data)
|
||||
/* initialize gui-specific, private data */
|
||||
box->sheet = sheet;
|
||||
box->item_edit = item_edit;
|
||||
box->item_list = gnc_item_edit_new_list(box->item_edit, cell->shared_store);
|
||||
if (cell->shared_store)
|
||||
box->item_list = gnc_item_edit_new_list(box->item_edit, cell->shared_store);
|
||||
else
|
||||
box->item_list = gnc_item_edit_new_list(box->item_edit, box->tmp_store);
|
||||
g_object_ref (box->item_list);
|
||||
gtk_object_sink (GTK_OBJECT(box->item_list));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user