r22387 - gnucash/trunk/src/gnome-search - Correct error in search dialog where results sub-window(s) is(are) erroneously created.

J. Alex Aycinena alex.aycinena at code.gnucash.org
Fri Sep 14 18:12:03 EDT 2012


Author: alex.aycinena
Date: 2012-09-14 18:12:02 -0400 (Fri, 14 Sep 2012)
New Revision: 22387
Trac: http://svn.gnucash.org/trac/changeset/22387

Modified:
   gnucash/trunk/src/gnome-search/dialog-search.c
Log:
Correct error in search dialog where results sub-window(s) is(are) erroneously created.

To reproduce the error, open Gnucash (for example with --nofile argument), open a Find Transactions dialog (Edit->Find), open a Find Customer dialog (Business->Customer->Find Customer), open a Gnucash Preferences dialog (Edit->Preferences) and change some preference (for example, under the Register tab, select Use system theme colors). Each time a preference is changed the Find dialogs get wider as a new results sub window is created and added to the dialog. This happens because any time gnc_gui_refresh_all is called, which is the case when a preference is changed, and on other occasions as well, the refresh_handler in dialog-search.c is called for any open search dialog which calls gnc_search_dialog_display_results which, in turn, erroneously creates and adds the sub window. If the search dialog was initially created with a result_cb, as is the case for Find Transactions, the results sub window should never be created. If it was not, as is the case with Find Customer and all other calls, only one sub window should be created per dialog and it should only be refreshed if it already exists.




More information about the gnucash-patches mailing list