summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-11-16 16:30:34 -0200
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-11-16 16:30:34 -0200
commit1268e0d22597593e3276ffa574e7eeb679d0dbd2 (patch)
tree5a545fed0b224a1d4888ea45009099bfb758767f /divelist.c
parent7930567c275d292b84ded6142e8c78e5b40c5941 (diff)
downloadsubsurface-1268e0d22597593e3276ffa574e7eeb679d0dbd2.tar.gz
Show dives "latest-first" by default
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>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/divelist.c b/divelist.c
index cebe6ce9b..93ea34f63 100644
--- a/divelist.c
+++ b/divelist.c
@@ -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);