Mike Mestnik wrote:
> --- Russell Francis <[EMAIL PROTECTED]> wrote:
>
>>>Mike Mestnik wrote:
>>>
>>>
>>>>I was using GTK2 from the files sections, but started to use CVS. I was forced to
>>>>revert back
>>
>>to
>>
>>>>what dpkg-buld gave me (GTK1). I notesed right away that the arrows on sort
>>>>fileds(size
>>
>>mostly)
>>
>>>>were correct, where in GTK2 I thought/knew thay were backwards.
>>>>
>>>>The corect way is for the big half of the arrow to represent the bigger value, it
>>>>being ontop
>>>>means that the bigger values will be first. And vice versa :)
>>>>
>>>>GTK1 is correct GTK2 is backwards IMHO.
>>
>>Mike,
>>
>>I looked into your complaint and agree that the arrows indicating the
>>sort order in the gtk1 and gtk2 interface are inconsistent with each other.
>>
>>After looking at the code, it is my opinion that the gtk2 interface is
>>aok. My reason is as follows.
>>
>>When creating a column in a GtkTreeView, the default sorting function
>>and the arrow icon are provided by and handled by the gtk2 library. The
>>Gtk2 interface uses this default sorting function and lets the gtk2
>>library handle the drawing of the directional arrow (for some of the
>>rows). So, I think that if this is a bug, it should be filed with the
>>gtk2 developers.
>>
>>Peace,
>>Russ
>>
>
> Russ,
>
> I just looked at how nautils(size) workes, it's correct the way I said it should be.
>
> Peace,
> Mike
The size button in the mozilla-mail application sorts correctly, the way
I said it should be ;-) so does the filename and type column in
nautilus. It appears that there really is no standard for this across
different applications. I still stick to my conviction that the correct
way to handle this is to follow the default behavior provided by the
gtk2 library.
Although, as a person who gets frustrated at software that doesn't
behave the way I *think* it should, I can sympathize with you. To ease
your frustration, I have provided a small patch against the most recent
CVS which incorrectly :-) sorts the search pane, size and # columns and
the upload pane size column.
Please feel free to use it, although I can't in good conscience
recommend it gets committed to CVS.
Peace,
Russ
Index: src/search_gui2.c
===================================================================
RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/search_gui2.c,v
retrieving revision 1.58
diff -u -r1.58 search_gui2.c
--- src/search_gui2.c 9 Aug 2003 22:16:03 -0000 1.58
+++ src/search_gui2.c 23 Aug 2003 20:45:34 -0000
@@ -442,7 +442,7 @@
gtk_tree_model_get(model, a, c_sr_record, &rec_a, (-1));
gtk_tree_model_get(model, b, c_sr_record, &rec_b, (-1));
- return SIGN(rec_a->size, rec_b->size);
+ return SIGN(rec_b->size, rec_a->size);
}
static gint search_gui_compare_count_func(
@@ -450,7 +450,7 @@
{
guint m = (guint) gtk_tree_model_iter_n_children(model, a);
guint n = (guint) gtk_tree_model_iter_n_children(model, b);
- return SIGN(m, n);
+ return SIGN(n, m);
}
#if 0
Index: src/uploads_gui2.c
===================================================================
RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/uploads_gui2.c,v
retrieving revision 1.30
diff -u -r1.30 uploads_gui2.c
--- src/uploads_gui2.c 12 Aug 2003 18:13:49 -0000 1.30
+++ src/uploads_gui2.c 23 Aug 2003 20:45:36 -0000
@@ -162,7 +162,7 @@
});
COMPARE_FUNC(sizes, {
- return SIGN(rd_a->size, rd_b->size);
+ return SIGN(rd_b->size, rd_a->size);
});
COMPARE_FUNC(ranges, {