Check-in [a388e9da2e]
Not logged in
Overview

SHA1 Hash:a388e9da2e292647f5de9a681013630c57dd74bd
Date: 2009-12-26 13:43:34
User: stephan
Comment:timeline descendants view now properly behaves when there are no descendents, and it also sigularizes the word 'descendents' when there is only one.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/timeline.c from [d9475b1de8] to [b36ed4e648].

@@ -484,13 +484,13 @@
     blob_appendf(&sql, " AND event.objid IN ok");
     nd = 0;
     if( d_rid ){
       compute_descendants(d_rid, nEntry+1);
       nd = db_int(0, "SELECT count(*)-1 FROM ok");
-      if( nd>0 ){
+      if( nd>=0 ){
         db_multi_exec("%s", blob_str(&sql));
-        blob_appendf(&desc, "%d descendants", nd);
+        blob_appendf(&desc, "%d descendant%s", nd,(1==nd)?"":"s");
       }
       timeline_add_dividers(
         db_text("1","SELECT datetime(mtime,'localtime') FROM event"
                     " WHERE objid=%d", d_rid)
       );