Re: [CSCMail-Users] Billenium Bug
Brought to you by:
countzer0
|
From: Maher A. <mu...@mu...> - 2001-10-05 20:54:43
|
Hi Steve,
I fixed this for Pronto on Sept. 9th when it all happened. Here is what
you need to do:
$message_clist->set_compare_func(\&my_sort_func);
sub my_sort_func
{
my ($clist, $first, $second) = @_;
if ($first =~ /^\d+$/) {
if ($first > $second) { return -1; }
if ($first == $second) { return 0; }
return 2;
}
my @stuff = ($first,$second);
my @sorted = sort {uc($a) cmp uc($b)} @stuff;
if ($sorted[0] eq $first) { return -1; }
if ($first eq $second) { return 0; }
return 2;
}
This function sorts numerric and alphas the right way, as the gtk built in
function always does alpha sort.
Maher
On Fri, 05 Oct 2001 16:15:40 -0400, Steven Kordik said:
> Ok, fun fun fun...
>
> To fix this, I need to setup a custom sort function to pass to
> gtk_clist_set_compare_func()
>
> It'll take me a bit of time because I have to figure out how to do this in the
> context of the Perl bindings (it would be trivial in C, but wrappers make
> things complex) I'll see what I can hack together over the weekend.
>
> Also, Gavin: what version of CSCMail are you running? (I am sure this bug
> exists in all versions, but I am curious due to the line number differences you
> mention)
>
> -CZ
>
> Gavin Brown wrote:
>
> > > If you want to see this column, simply comment out line 4760 in cscmail.
> >
> > In both installations of cscmail I checked, line 4760 looks like
> >
> > $folder_tree->{'popup'}->{'emptyfolder'}->signal_connect("activate" =>
> > \&empty_folder);
> >
> > which I guess deals with the context menu options in the Folders pane. I did
> > find line 4771 though:
> >
> > $message_clist(set_column_visibility(7,0);
> >
> > Changing 0 to 1 did the trick.
> >
> > The hidden field shows a correct timestamp but when viewed, messages from
> > before and after the billenium look like this:
> >
> > blah blah blah 1002310777
> > blah blah blah 997052467
> >
> > Sorted alphanumerically, 1002310777 comes before 997052467, since the list
> > order is A-Za-z0-9. Sorted numerically it's the other way around.
> >
> > I've had e-mail from two other people reporting the same bug.
> >
> > Hope this helps.
> >
> > Gavin.
>
>
> _______________________________________________
> | Be sure to read the CSCMail FAQ:
> | http://www.cscmail.net/cscmail.faq
> |
> | CSCMail Home Page:
> | http://www.cscmail.net
> |
> | To unsubscribe or change your preferences:
> | https://lists.sourceforge.net/lists/listinfo/cscmail-users
>
>
--
http://www.muhri.net -- mu...@mu...
|