Menu

#5 Shaded bg color

open
None
5
2002-09-16
2002-09-16
Tom Picot
No

Hi there,

I've been using your program and its great :) However I
felt the UI was a little lacking so I made a quick hack
and have allowed the user to change the shading colors.

The edited files are attached. The option dialog is a little
ugly :) And those lines going down on the left went all
wide, I couldnt be bothered finding out how to change
that lol.

Basically I just added 2 new variables to the cfg struct,
allowed the user to select a color, and then edited the
defines to include a bgcolor tag.

Discussion

  • Tom Picot

    Tom Picot - 2002-09-16

    Shaded BG Patch

     
  • Tom Picot

    Tom Picot - 2002-09-16
     
  • Tom Picot

    Tom Picot - 2002-09-16

    Logged In: YES
    user_id=284374

    Opps, first upload works but, had unneeded double defines
    which do the same thing.

     
  • Jonas Jensen

    Jonas Jensen - 2002-09-16
    • assigned_to: nobody --> bones0
     
  • Jonas Jensen

    Jonas Jensen - 2002-09-16

    Logged In: YES
    user_id=63933

    Thanks for the patch. I won't apply it in this form, though,
    because there are a number of problems with it.

    1. You've added shadecolor1 and shadecolor2 right in the
    middle of the SpyAmpConfig structure, which means that the
    configuration will be messed up when upgrading from previous
    spyamp versions. They have to be added at the end, cutting
    into "reserved".

    2. Are you sure there has to be two shade colors? I can
    imagine a lot of color schemes that can be pretty with one,
    not two.

    3. You added shadecolor1 and shadecolor2 to the <body> tag.
    Surely this is a typo.

    4. You submit your changes as one big zip file containing
    all the files you changed. Do you expect me to just
    overwrite my files with yours and then release? It happens
    that I'm working on changes too, and just overwriting the
    files would of course undo my own changes.
    Of course there's a solution to this, and it's called the
    unified diff format. I run the "diff" program on the files
    to generate a patch so I can apply only your changes, not
    the entire files, and hopefully they won't conflict with
    what I changed myself. Here you can see what your patch
    looks like after diffing it:
    http://knef.dk/tmp/162-shade.diff.html
    You changed a LOT of stuff that has nothing to do with
    shaded backgrounds. For example, you changed the comments
    from // to /* */. If you want me to change the coding style
    in SpyAmp, submit that as a seperate patch. Patches that
    have nothing to do with each other should be split apart,
    making each patch as small as possible because:
    A. You avoid stepping on the other changed I've made myself.
    B. I can read the patch and see what it does, and see all
    bugs that may be hiding.
    C. A big patch is all-or-nothing. I don't want to change
    half the source code into your coding style just because I
    want the shading feature.

    I like your feature, though, so I'd like to see it included.
    If you want your change to go into the official version,
    please submit the smallest possible patch. To generate the
    diffs yourself (if you want to make sure that only the
    neccesary things have changed), use the command "diff -du
    OLD NEW" on the directories OLD and NEW. You can do this
    from any Linux/unix box, or you can download diff for
    Windows as part of the cygwin distribution: http://cygwin.com .
    If you really think there must be two different
    shade-colors, please tell me why.
    I'd also recommend that you wait until I release spyamp
    2.0.2 (hopefully later tonight), because a lot of things
    have changed, and it won't be easy to apply your patch if
    it's against 1.6.2.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.