Diff
Not logged in

Differences From:

File src/timeline.c part of check-in [74534cc91e] - Remove dead code from timeline.c. Make sure all shortened UUIDs have at least one hexadecimal digit greater than '9' to avoid confusing them with decimal numbers. by drh on 2009-12-18 23:09:36. [view]

To:

File src/timeline.c part of check-in [a388e9da2e] - timeline descendants view now properly behaves when there are no descendents, and it also sigularizes the word 'descendents' when there is only one. by stephan on 2009-12-26 13:43:34. [view]

@@ -485,11 +485,11 @@
     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)