add sorting on number of bells
authorThomas Thurman <tthurman@gnome.org>
Mon, 31 Aug 2009 23:34:07 +0000 (19:34 -0400)
committerThomas Thurman <tthurman@gnome.org>
Mon, 31 Aug 2009 23:34:07 +0000 (19:34 -0400)
belltower.c

index 8972795..89e9574 100644 (file)
@@ -48,6 +48,7 @@ char *towersort_settings[] = {
   "Name of town",
   "Distance from you",
   "Days until practice night",
+  "Number of bells",
   "Weight of tenor",
   NULL
 };
@@ -73,6 +74,7 @@ typedef enum {
   TOWERSORT_TOWN,
   TOWERSORT_DISTANCE,
   TOWERSORT_PRACTICE,
+  TOWERSORT_BELLS,
   TOWERSORT_WEIGHT
 } TowersortSetting;
 
@@ -798,6 +800,9 @@ found_tower_new (tower *basis)
     case TOWERSORT_PRACTICE:
       result->sortkey = g_strdup ("FIXME");
       break;
+    case TOWERSORT_BELLS:
+      result->sortkey = g_strdup_printf ("%10s", basis->fields[FieldBells]);
+      break;
     case TOWERSORT_WEIGHT:
       result->sortkey = g_strdup_printf ("%10s", basis->fields[FieldWt]);
       break;