]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Show dives "latest-first" by default
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Nov 2011 18:30:34 +0000 (16:30 -0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Nov 2011 18:30:34 +0000 (16:30 -0200)
You can still order them by date by just setting the sort order on the
date column, but normally you'd be more interested in the most recent
dives.

I tried to just scroll down to the last ones automatically instead, but
gtk makes that *really* hard to do.  If you do it in the natural place
for it, the scroll bar wll show up later and then cover up the last
entry anyway.  So you'd have to do some crazy expose event thing or
something.  Which may be the right thing to do eventually anyway, but
not worth the pain right now.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
divelist.c

index cebe6ce9b1ba2dd4ece5751fe757bd7f6c04d274..93ea34f6368a13735dc9c210cc2e1ef3c30b1b63 100644 (file)
@@ -457,7 +457,8 @@ static void fill_dive_list(void)
 
        store = GTK_LIST_STORE(dive_list.model);
 
-       for (i = 0; i < dive_table.nr; i++) {
+       i = dive_table.nr;
+       while (--i >= 0) {
                struct dive *dive = dive_table.dives[i];
 
                update_cylinder_related_info(dive);