GNOME Bugzilla – Bug 52221
Search/replace should remember previous searches
Last modified: 2004-12-22 21:47:04 UTC
(Version is Gnumeric CVS, 17 March 2001) The Search & Replace dialog should remember previous search & replace terms. It seems the combo boxes where places in the dialog for that purpose. If they were not, they should be removed as they are misleading. The best thing would be to remember search & replace within the same session so that the user can go back and change or select a previous entry.
This is indeed the intended long-term behaviour. For now, it does not work because we destroy the dialog between invocations.
My bug...
We should see if any of these parameters are saved in XL files. Many of the other dialogs store their params there eg sorting, consolidation, solver
Do you want the search entries to be saved locally to a workbook, or generally to the whole application? If the latter, an quick way would be to save and load the GnomeEntry histories, using the gnome_entry_*_history functions. This hack wouldn't save all the info (eg: the radio button values), but would at least save the search entry text. It survives dialog invocations, even different sessions. The original bug submission is right to say that this is why combo boxes are used... I presume GnomeEntry was used with this in mind anyway. Would you accept a patch which calls the gnome_entry_*_history functions to save and load the histories?
Created attachment 6253 [details] [review] Patch to remember the search/replace history
My patch above saves the history globablly. The glade files already had set the history to a limit of 10, which is pretty nice. I've tested it, it survives dialog invocations and different sessions. As the user might be looking for the same text in different files, I think doing it globally is the right way to do it (as opposed to saving the history per file). Can we please commit this patch and close the bug? :)
Fixed in cvs.