2006-03-21 [colin] 2.0.0cvs161
[claws.git] / src / addressbook.c
index 60f2af4f1ba40d1b77e97a8bb2b90db6af6e6424..de90282e54d6e325b1d42800b6b77c6695982039 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);  
@@ -4239,7 +4241,7 @@ void addrbookctl_build_map( GtkWidget *window ) {
        atci->showInTree = TRUE;
        atci->treeExpand = TRUE;
        atci->treeLeaf = FALSE;
-       atci->displayName = _( "LDAP Server" );
+       atci->displayName = _( "LDAP servers" );
        atci->iconXpm = ldapxpm;
        atci->maskXpm = ldapxpmmask;
        atci->iconXpmOpen = ldapxpm;