A similar place where we should look at the ordering of items:
when we open the gui window to create a filter and we get to
the Filter Expression dialog where all the protocols are listed as
expansions.
when we open, say, the SMB expansion there are a LOT of entries there and
they are all
in "random" order. This makes it difficult to search for the one we want
(for those that hasnt memorized all displayfilter
field names).
Maybe we should add code to present this list as a sorted list instead?
either we could
1, sort all the entries before adding them to the global header field list
inside the function proto_register_field_array()
or
2, we could sort it in the code that builds the Filter Expression dialog.
I think 1 would be "better" since then the list would be sorted for every
subsystem that walks this global list and not just the Filter Expression
thing. It would also mean that the sorting would only occur once, when
ethereal starts up and not every time we open this dialog.
(however, option 2 is better for me and others that never use this dialog)
many protocols register quite a number of display filter fields so we might
need to be careful on how we implement the sorting.
since it is normal text strings (but of unknown length) and the data might
be large i think the best solution would
be a small handrolled RADIX SORT implemented inside
proto_register_field_array().
RADIX SORT is O(n) and should be fast enough.
It shouldnt take more than ~100 lines of code to hack that up.
As a second stage we might want to create additional subexpansions in this
dialog.
For example, since there are many fields named such as "afs.fs. ..." we
could then
create a subexpansion "AFS.FS" where all these fields were kept.
----- Original Message -----
From: "Ulf Lamping"
Sent: Monday, February 16, 2004 6:35 AM
Subject: Re: [Ethereal-dev] Open Recent
> Michael Tuexen wrote:
>
> > Dear all,
> >
> > the items in the Open Recent list are ordered in a way that the most
> > recently
> > used item is at the bottom. I would expect this at the top.
> > Should this be changed?
> >
> The latest CVS should be doing exactly that and also should show a
> <clear file list> menuitem at the bottom.
>
> What version do you use?
>
> Regards, ULFL
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev