2006-03-19 [colin] 2.0.0cvs158
authorColin Leroy <colin@colino.net>
Sun, 19 Mar 2006 10:37:21 +0000 (10:37 +0000)
committerColin Leroy <colin@colino.net>
Sun, 19 Mar 2006 10:37:21 +0000 (10:37 +0000)
* src/addressbook.c
and put groups at the top, always

ChangeLog
PATCHSETS
configure.ac
src/addressbook.c

index ab82f4b..1a46fdd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-19 [colin]     2.0.0cvs158
+
+       * src/addressbook.c
+               and put groups at the top, always
+
 2006-03-19 [colin]     2.0.0cvs157
 
        * src/addressbook.c
index 7221fde..ddda6f6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.60.2.50 -r 1.60.2.51 src/addressbook.c;  ) > 2.0.0cvs155.patchset
 ( cvs diff -u -r 1.60.2.51 -r 1.60.2.52 src/addressbook.c;  ) > 2.0.0cvs156.patchset
 ( cvs diff -u -r 1.60.2.52 -r 1.60.2.53 src/addressbook.c;  ) > 2.0.0cvs157.patchset
+( cvs diff -u -r 1.60.2.53 -r 1.60.2.54 src/addressbook.c;  ) > 2.0.0cvs158.patchset
index 8bab5c0..be21dba 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=157
+EXTRA_VERSION=158
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 60f2af4..9cc0077 100644 (file)
@@ -683,6 +683,7 @@ static void addressbook_size_allocate_cb(GtkWidget *widget,
 }
 
 static gint sort_column_number = 0;
+static GtkSortType sort_column_type = GTK_SORT_ASCENDING;
 
 static gint list_case_sort(
        GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2 )
@@ -704,9 +705,9 @@ static gint list_case_sort(
        } else {
                /* Order groups before person */
                if( aio1->type == ITEMTYPE_GROUP ) {
-                       return -1;
+                       return (sort_column_type==GTK_SORT_ASCENDING) ? -1:+1;
                } else if( aio2->type == ITEMTYPE_GROUP ) {
-                       return 1;
+                       return (sort_column_type==GTK_SORT_ASCENDING) ? +1:-1;
                }
                return 0;
        }
@@ -719,6 +720,7 @@ static void addressbook_sort_list(GtkCList *clist, const gint col,
        GtkWidget *hbox, *label, *arrow;
 
        sort_column_number = col;
+       sort_column_type = sort_type;
        gtk_clist_set_compare_func(clist, list_case_sort);
        gtk_clist_set_sort_type(clist, sort_type);
        gtk_clist_set_sort_column(clist, col);