html.cc: convert Html_*_reset functions to methods
This changes Html_reset_form() to DilloHtmlForm::reset() and Html_reset_input() to DilloHtmlInput::reset() . It's part of the plan to move code that accesses DilloHtmlForm and DilloHtmlInput internals into methods and make the internals private. The patch is in two parts: the first makes the changes and the second moves the new methods to the right place in the file. If I roll the changes and the move into one then "diff" gets confused and creates an unreadable monster of a patch. I'd recommend feeding the two attachments to patch separately; it might do the right thing given the whole message in one go, but then again it might not. Comments are welcome. There are several other functions in html.cc that are really just methods in disguise and are future targets for the same treatment as Html_reset_form() and Html_reset_input() get here. Regards, Jeremy Henty
On Tue, May 27, 2008 at 05:03:13PM +0100, Jeremy Henty wrote:
This changes Html_reset_form() to DilloHtmlForm::reset() and Html_reset_input() to DilloHtmlInput::reset() . It's part of the plan to move code that accesses DilloHtmlForm and DilloHtmlInput internals into methods and make the internals private.
The patch is in two parts: the first makes the changes and the second moves the new methods to the right place in the file. If I roll the changes and the move into one then "diff" gets confused and creates an unreadable monster of a patch. I'd recommend feeding the two attachments to patch separately; it might do the right thing given the whole message in one go, but then again it might not.
Comments are welcome.
Patch committed. BTW, here diff made a nice single patch. BUG: Please notice that forms "reset" doesn't reset selection lists. (it also wasn't working before the patch).
There are several other functions in html.cc that are really just methods in disguise and are future targets for the same treatment as Html_reset_form() and Html_reset_input() get here.
OK. -- Cheers Jorge.-
On Tue, May 27, 2008 at 02:18:29PM -0400, Jorge Arellano Cid wrote:
On Tue, May 27, 2008 at 05:03:13PM +0100, Jeremy Henty wrote:
The patch is in two parts: the first makes the changes and the second moves the new methods to the right place in the file. If I roll the changes and the move into one then "diff" gets confused and creates an unreadable monster of a patch.
[...] BTW, here diff made a nice single patch.
I might have messed up the cut and paste on the first attempt and moved more code than I intended, which is why I got the monster diff. However I think that splitting up the patch into a change diff and a move diff might be better for reviewers as it gives them a diff that shows exactly what has changed rather than forcing them to manually compare a delete chunk in one place with an add chunk elsewhere. So I might continue splitting up diffs this way, unless you and the other reviewers think it just makes more work.
BUG: Please notice that forms "reset" doesn't reset selection lists. (it also wasn't working before the patch).
to_do_list++; Regards, Jeremy Henty
participants (2)
-
jcid@dillo.org
-
onepoint@starurchin.org