[Gnucash-changes] r13699 - gnucash/trunk - Fix the lack of action
strings in the popup menu. The problem occurs
David Hampton
hampton at cvs.gnucash.org
Sat Mar 25 11:35:32 EST 2006
Author: hampton
Date: 2006-03-25 11:35:31 -0500 (Sat, 25 Mar 2006)
New Revision: 13699
Trac: http://svn.gnucash.org/trac/changeset/13699
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/register/register-gnome/combocell-gnome.c
Log:
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.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-03-25 02:53:51 UTC (rev 13698)
+++ gnucash/trunk/ChangeLog 2006-03-25 16:35:31 UTC (rev 13699)
@@ -1,3 +1,12 @@
+2006-03-25 David Hampton <david at 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 at hampton-pc.rainbolthampton.net>
* src/gnome/ui/gnc-reconcile-window-ui.xml:
Modified: gnucash/trunk/src/register/register-gnome/combocell-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/combocell-gnome.c 2006-03-25 02:53:51 UTC (rev 13698)
+++ gnucash/trunk/src/register/register-gnome/combocell-gnome.c 2006-03-25 16:35:31 UTC (rev 13699)
@@ -53,6 +53,7 @@
GnucashSheet *sheet;
GncItemEdit *item_edit;
GncItemList *item_list;
+ GtkListStore *tmp_store;
gboolean signals_connected; /* list signals connected? */
@@ -142,6 +143,7 @@
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,8 +432,13 @@
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 */
if (FALSE == box->use_quickfill_cache)
@@ -742,7 +749,10 @@
/* 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));
More information about the gnucash-changes
mailing list