[PATCH] Add a "sort role" for sorting the dive list

Linus Torvalds torvalds at linux-foundation.org
Wed May 29 13:50:26 PDT 2013


On Wed, May 29, 2013 at 9:38 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> I merged both your code and Linus' patch - it's all there in master (and
> I'm in the process of adding a few more commits)

Hmm. Tomaz' code ends up disabling sorting entirely, so now my patch
doesn't seem to matter any more. I'm not exactly sure why sorting got
disabled, maybe it's a side effect of catching that "header-clicked"
event, and thus the default sorting action never happens. Tomaz
probably knows. Tomaz?

Also, your preference changes are a bit odd. Not using "gboolean" is
fine, but why use "short" for a bit value? That's 16 bits, and
generally generates worse code too. Why not just a "unsigned char" or
even a bitfield (although bitfields cannot have their address taken,
so they are often useless for things like this)

I also get a compiler warning that looks very relevant:

  prefs.c:186:3: warning: format ‘%lf’ expects argument of type
‘double *’, but argument 3 has type ‘short int *’ [-Wformat=]

(same for line 192). You changed prefs.gflow/gfhigh to integers rather
than the doubles they used to be, but didn't change that prefs.c code.
Is it dead gtk code?

           Linus


More information about the subsurface mailing list