patches and double druids

Neil Williams linux at codehelp.co.uk
Wed Nov 17 04:57:48 EST 2004


I've fixed the AccountGroup problem with qof_book_merge. There remain one or 
two problems with some accounts being parented to unexpected accounts but 
some of this comes down to the example account files themselves. e.g. the 
Expense account for childcare is a different account type to the one in Car 
Loan. One has Expenses as 'expense', one as 'liability'. This results in two 
top level Expenses accounts with different children. I also need to improve 
the 'best match' code.

Should I harmonise the example account trees so that all the accounts with the 
same name are the same type in each? Should it be left to the user?

Do you want me to send in a patch at this stage?

Should I incorporate the patch from 31st October into this one or will that be 
applied soon (the one from 31st Oct already includes one from 22nd Oct)?

With the 1.8 branch work, should I leave you in peace for a while longer?
:-)

I've also re-discovered that problem with the currency editor not displaying, 
that you found first time around:
http://lists.gnucash.org/pipermail/gnucash-devel/2004-October/012155.html
assertion `GTK_IS_WIDGET (widget)' failed.

It never appears for me in KDE, only when I run GnuCash under Gnome (although 
my Gnome environment may not be complete, I hardly ever use it).

It's related to loading two druids at the same time. 
merge_druid is loaded to explain the process, create the second QofSession and 
start a hidden hierarchy druid. Then on Next, the druids are swapped (widget 
show and widget hide) and hierarchy druid takes over within the new session.

qof_book_merge_window = gnc_create_merge_druid();
g_return_if_fail(qof_book_merge_window != NULL);
gnc_ui_hierarchy_druid();
druid_hierarchy_window = gnc_ui_hierarchy_running();
gtk_widget_hide (druid_hierarchy_window);
gtk_object_set_data (GTK_OBJECT (druid_hierarchy_window), "Merge Druid", 
qof_book_merge_window);
gtk_widget_show (qof_book_merge_window);

Then on clicking Next in the merge druid:
gtk_widget_show(druid_hierarchy_window);
gtk_widget_hide(qof_book_merge_window);

When the hierarchy druid is done, it closes normally - leaving the QofBook in 
the session which the merge druid code then handles. i.e. I wrap the 
hierarchy druid inside the merge_druid and thereby inside a second 
QofSession.

Rather than duplicating all the hierarchy druid glade code inside merge.glade, 
I'm trying to use hide and show (as I would have on Windows). I had problems 
initially when I tried to get merge_druid to wait until hierarchy druid had 
finished. Is that the better way of doing it? Call hierarchy_druid, set a 
flag that tells the hierarchy druid code to call merge_druid on finish and do 
without the first explanation page of merge_druid?

Even on KDE, my current method causes the hierarchy druid to appear and 
disappear instantaneously - the user is aware of an interruption/flash. Are 
Gnome druid's modal?

(I did say I'd need help with the GUI!)

-- 

Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20041117/21d18090/attachment.bin


More information about the gnucash-devel mailing list