[chirp_devel] [developer] Control fontsize of file browser display - #1697
Patch attached. -dan
# HG changeset patch # User Dan Drogichen chirp.cordless@xoxy.net # Date 1403149386 25200 # Wed Jun 18 20:43:06 2014 -0700 # Node ID d03df310f7ae9734ee1a78128d062f334f81114b # Parent 293cf2f7da0fa9d4000faf71bf8b4872f78f0bb1 [developer] Add diffs-only mode to file diff utility - #1699
Adds an alternate display mode to the developer tools dump/diff utility in which only lines which are different are printed. Ranges of one or more lines that do not differ are replaced with a single blank line.
Man, I *really* don't understand why this is a better way to look at it, but maybe I've been looking at real diffs for too long :)
This mode is invoked by setting the first memory location in the "Diff Radios" popup to -2. The existing functionality invoked by -1 is not affected.
Hmm, setting one of them to -2 and the other to what? The point of the first/second box is so that you can diff two different memory locations in two images. Does this enable only diffing two corresponding locations in this special mode?
How about we just add another entry to the menu so that we have "Diff memories" and "Naked diff memories" (or some other name that conveys what we're talking about.
- blankprinted = True for line in lines: if line.startswith("-"): tags = ("red", "bold") elif line.startswith("+"): tags = ("blue", "bold")
blankprinted = False
elif diffsonly == True:
if blankprinted:
continue
else:
line = ""
tags = ()
blankprinted = True
This is really confusing. Is the point to ensure that after a + line you get a blank line? Regardless, doing this in the display routine seems like the wrong place to do this. Why not modify common.simple_diff() to generate what you want in the first place?
--Dan
Patch respun as discussed to move the line-eliding logic to common.simple_diff() Patch attached.
-dan
Patch respun as discussed to move the line-eliding logic to common.simple_diff() Patch attached.
Note that I've applied this and it's in the public tree, but a build won't go out with it until I get my infrastructure back online. That should happen this weekend.
Thanks!
--Dan
participants (2)
-
chirp.cordless@xoxy.net
-
Dan Smith