>>>>> "Heath" == Heath Martin <[EMAIL PROTECTED]> writes:
Heath> Hi Alexandru,
Heath> You've mentioned you are working on the code in
Heath> gnucash/src/gnome, and you also noticed a while back a
Heath> problem with loading a file from the toolbar. In case you
Heath> haven't tracked that down yet, it's in the file open
Heath> callback in the function gnc_ui_filemenu_cb in
Heath> window-main.c. We need to make a call to
Heath> gnc_ui_acct_ctree_fill there to fill the tree.
I have not toouched the code in window-main.c yet. I just posted a
patch for the window register code, and now I plan to move to the
window-main.c -- I found some bugs in it. However Jeremy has posted a
patch for that bug, and now it's fixed.
Heath> When I worked on that file a while back, I added a function
Heath> gnc_ui_refresh_tree, and this gets called by
Heath> refreshMainWindow. When a file is specified on the command
Heath> line, mainWindow calls gnc_ui_acct_ctree_fill, but when the
Heath> file is opened from the menu, the callback only calls
Heath> refreshMainWindow, and of course the tree isn't filled.
Heath> Also, the call to gnc_ui_acct_ctree_fill needs to be
Heath> removed from gnc_ui_refresh_tree, since every time the tree
Heath> is refreshed, the _fill puts another copy in with it.
Heath> But, when a new file is opened, we also need to be sure to
Heath> unfill the current ctree, because otherwise a ctree_refresh
Heath> is going to find stale pointers and do a segfault. I'm not
Heath> sure quite when to clear the current ctree; ideally
Heath> gncFileOpen would return a TRUE/FALSE value saying whether
Heath> a new file was actually opened, and then we could either
Heath> clear the tree or not.
Heath> Also, in your work in dialog-add.c, shouldn't the call to
Heath> gtk_ctree_insert_node in the function
Heath> gnc_ui_accWindow_create_callback insert the node as a
Heath> non-leaf (i.e., the next to last argument should be FALSE).
Heath> If it's inserted as a leaf, then we can't add any subnodes
Heath> to it.
Heath> I would do some of this, but I knew you were already
Heath> working on some of these files, so maybe you've already
Heath> fixed all of this. Let me know one way or the other.
I have not touched that part of the code. I supposed adding the new
account to the main window works. However, I'm not working on
dialog-add.c so if you want to make some modifications you will not
interfere with me, just go ahead.
Best regards,
Alex.
Heath> Best Regards, Heath Martin
--
----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body