size/lines clist initialisation fix.



hello,

some hrs ago you got the size/lines patch from me and during my
excercise through this i've detected that the size/lines clist
item doesn't get initialized.

this means.

#, S, A, From, Subject, Date

gets initialized, means it gets values about a default width, all
these default widths counted together gives us 640 pixels

but the new size/lines item isn't initialized this means it's in
a fuzzy state, no clean width no clean initialisation. it's *said*
that it *works* but what about a new user that starts balsa the
first time and he gets a 640x480 pixel of balsa window now he
clicks the first time on the clist tree to list all his emails.
there may be the possibility that the size/lines item is really
small or whatever. i can't prove what may happen or what not. the
only thing i know is that size/lines has no default values and no
values that gets stored to the prefs. it only depends on the dynamic
calculation of the widget itself. e.g. if the user enlargens then
whole window to e.g. 1024x786 so the default values stay and the
size/lines field is getting dynamically increased but the value is
not saved. now think any further. e.g. you want to add another item
behind it. also some 'case' switches in the code only counts from
0-5 but we have 6 fields so under certain circumstances we get an
output telling us (clist item not valid or whatever).

well. i was really curious about this. if this is ok as it was or
if it should be initialized correctly. so i went through several
3rd party applications and i saw that all of them initialize these
values correctly (also balsa's left clist, the list with all your
mailboxes listed has these values initialized correctly. means
mailbox, unread, total are getting inizialized correctly)

so i made this fix that solves this problem. it also adds a new
prefs line that completely fits into the present one, now this value
gets calculated and stored correctly. after you applied this patch
and recompile balsa, you may notice some (unbehave) because this item
is getting a 'default' defined value set by balsas internal default
value table, so it may be a bit big, but don't worry adjust this field
and it gets stored correctly. if you start for example as a complete new
user or a complete new balsa prefs, then these default values are correct
and it also looks correct its only now because it wasn't initialized at
all.

a note to pawel:

in balsa-app.h 640 pixels are only calculated for the 5 items

#, S, A, From, Subject, Date

now i adjusted some pixels for these values so that all 6 items

#, S, A, From, Subject, Date, Size

are 640 pixels. i've taken a lot care that these values fits and
looks reasonable. don't worry as soon as the people enlargens the
default 640x480 of balsa window, these values are getting dynamically
recalulated to the correct values. they look brilliant for a new
user that starts a new balsa instance from scratch. also note that
if you test this, then make sure your window managaer dont remember
your old balsa window dimension :)

this patch was written for balsa CVS with last changelog entry
of 2001-08-09 but should smoothly apply to current CVS. this patch
has nothing to do with my previous one. but if you want to apply both
of them then please apply this first. it also works the other way but
you may get some notices by 'patch' that it patches some lines above
or down. don't worry about them. both patches are kept separate.

-- 
Name....: Ali Akcaagac
Status..: Student Of Computer & Economic Science
E-Mail..: mailto:ali.akcaagac@stud.fh-wilhelmshaven.de
WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa

balsa-size-fix.patch



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]