[Bf-taskforce25] Filename number buttons in space_file.

Johannes Meng johannes.meng at student.kit.edu
Tue Jul 7 10:55:13 CEST 2009


Hey everyone, 

I hope this is the correct place to submit a patch, if it isn't, just ignore
this email (and tell me where to send this stuff :D).

I just finished my first patch for 2.5. It adds buttons to space_file
that invoke the filename number increment/decrement operation.

There are two versions of this patch, compare them here:

http://www.jmeng.de/patches/fnum_plain.patch
http://www.jmeng.de/patches/fnum_nice.patch

I hope that the different revisions don't matter; the relevant file
(file_draw.c) wasn't changed in either of them.

Anyways, both patches add two buttons, which are only shown when there is
enough space. For now, those buttons use plain text to display the + and -
signs.

The "nice" patch is is a rewrite of the entire function. I thought that the
original one was rather ugly, with alot of magic numbers and very long lines.
The patch thus fixes the numbers problem by introducing a few constants. Those
can be used to customize the setup, should that become neccessary. I tried to
preserve as much of the original code as possible, however.

I personally prefer the "nice" patch, of course. Note that I'm not really sure
about the long lines issue. I wasn't able to find a coding conventions page in
the wiki, there is only a dead link. The 80 chars max doctrine is just one that
I'm used to.

Thanks,
Johannes (jmeng)



More information about the Bf-taskforce25 mailing list