-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi!

On Mon, 1 Apr 2013, Carlos R. Mafra wrote:

> Are you sure this patch is needed for the wmbiff from the dockapps git
> repository?

Well...

I worked on mboxClient.c from wmbiff-0.4.27.tar.gz because the file from 
dockapps has the same md5sum. Without my patch countMessages() function 
set TotalMsgs to 1 and UnreadMsgs to 0 for a mbox file containing only the 
pseudo-message. Which is wrong. With my patch TotalMsgs is 0.

But!

I just compiles (debug_default = DEBUG_INFO ) the wmbiff from dockapps 
without my patch and... well, does not work. At all!

.wmbiffrc:
interval=10
label.0=Mail
path.0=/var/spool/mail/gabriel
notify.0=beep
action.0=

label.1  = Test
path.1   = /home/gabriel/mail/saved-messages
notify.1 = beep
action.1 =

/var/spool/mail/gabriel: one pseudo-message, 0 messages.
/home/gabriel/mail/saved-messages: one pseudo-message, 2 messages

Still, wmbiff gui show 0 messages for "Mail" and 0 messages for "Test".

Debug output:
$ ./wmbiff
wmbiff: config_file = /home/gabriel/.wmbiffrc.
wmbiff: @interval.-1=10@
wmbiff: @label..0=Mail@
wmbiff: @path..0=/var/spool/mail/gabriel@
wmbiff: @notify..0=beep@
wmbiff: @label..1=Test@
wmbiff: @path..1=/home/gabriel/mail/saved-messages@
wmbiff: @notify..1=beep@
wmbiff/Mail mbox: str = '/var/spool/mail/gabriel'
wmbiff/Mail mbox: path= '/var/spool/mail/gabriel'
wmbiff/Test mbox: str = '/home/gabriel/mail/saved-messages'
wmbiff/Test mbox: path= '/home/gabriel/mail/saved-messages'
wmbiff: looking for /usr/share/wmbiff/skins/wmbiff-master-led.xpm
wmbiff: looking for /usr/share/wmbiff/skins/wmbiff-master-led.xpm
wmbiff: looking for /usr/local/share/wmbiff/skins/wmbiff-master-led.xpm
wmbiff: looking for ./wmbiff-master-led.xpm
wmbiff: found ./wmbiff-master-led.xpm
wmbiff: running 2 mailboxes w 64 h 31
wmbiff/Mail  working on [0].label=>Mail < [0].path=>/var/spool/mail/gabriel<
wmbiff/Mail  curtime=1364842703, prevtime=0, interval=10
wmbiff/Mail  shell: expanded to /var/spool/mail/gabriel
wmbiff/Mail  >Mailbox: '/var/spool/mail/gabriel'
wmbiff:  /var/spool/mail/gabriel was changed, mTIME: 0 -> 1364841083; SIZE: 0 
-> 550
wmbiff/Mail  from: 1 status: 1
wmbiff/Test  working on [1].label=>Test < 
[1].path=>/home/gabriel/mail/saved-messages<
wmbiff/Test  curtime=1364842703, prevtime=0, interval=10
wmbiff/Test  shell: expanded to /home/gabriel/mail/saved-messages
wmbiff/Test  >Mailbox: '/home/gabriel/mail/saved-messages'
wmbiff:  /home/gabriel/mail/saved-messages was changed, mTIME: 0 -> 1364841082; 
SIZE: 0 -> 2294
wmbiff/Test  from: 3 status: 3
wmbiff/Mail  working on [0].label=>Mail < [0].path=>/var/spool/mail/gabriel<
wmbiff/Mail  curtime=1364842723, prevtime=1364842703, interval=10
wmbiff/Mail  shell: expanded to /var/spool/mail/gabriel
wmbiff/Mail  >Mailbox: '/var/spool/mail/gabriel'
wmbiff/Test  working on [1].label=>Test < 
[1].path=>/home/gabriel/mail/saved-messages<
wmbiff/Test  curtime=1364842723, prevtime=1364842703, interval=10
wmbiff/Test  shell: expanded to /home/gabriel/mail/saved-messages
wmbiff/Test  >Mailbox: '/home/gabriel/mail/saved-messages'
^C

So... I don't know what to say... countMessages() function in 
mboxClient.c works almost OK (also count the pseudo-message), count_mail() 
also have the correct values (I just printed  mbox[item].UnreadMsgs and
mbox[item].TotalMsgs values and they are the same as in countMessages()).

Why do yo print 0 instead of TotalMsgs if UnreadMsgs is 0 in 
blitMsgCounters()?
I'm sorry but this is bogus!

I am (not sure about others) very, very interested on how many messages 
are in each mbox. Yes, I know, there is a limit but most of us rarely 
reach this limit. And we can get rid of ":" after the name and increase 
the number of emails by 1 digit.


> Because I wrote a patch to wmbiff to make it display only the unread
> messages, since I find it completely useless to have the 13982 number
> displayed as the current count from my INBOX. There was also an issue 
> about how many digits can be displayed whitout overlapping with the
> mailbox name (that was actually the stronger reason to write the patch).
You can also have 13982 _new_ messages which make you changes absolutely 
useless.

I do not like that you did, really. I'm going to avoid wmbiff from 
dockapps since is not doing what I need anymore.


Gabriel

- -- 

// Gabriel VLASIU
//
// OpenGPG-KeyID      : 44952F15
// OpenGPG-Fingerprint: 4AC5 7C26 2FE9 02DA 4906  24B2 D32B 7ED7 4495 2F15
// OpenGPG-URL        : http://www.vlasiu.net/public.key


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)

iQIcBAEBCgAGBQJRWd9TAAoJENMrftdElS8VnCAQAIKAdxvPcsHbPNamk2VON1lR
ZIAkX1lz1fPtzg2tgn/yD4d15Xdw95BErJsU74rNWY7af23/E/julAppbyC28RtI
luPC/e8pqItWxcIzcLlGynC00n55v0RnSc8SLvasf3/5NROW9Zu32J14fKnISPMK
YufC2rkhifl3WfDfw4Oov/h/qQhDlPuFTXadRalVkHDcAO2adzgqfwTfwxcb/V8b
tEgzlwFJdQ7fhVc5uBvlQKkIFy4zfW0GYJ90SzKhEL/iVwsIdZEyYGBCtwoDNrrW
aTZFG6sSg6O4nfC4SwLn3RCpjzkqv1PnfIqZB7CQbHYpkcMIe5FD9f97sQ73LtLo
Mged83PULe5DO9QBpfqRzLBfCVDoDvuZ0H2uXfJ9y8eqJlrnFEp86Z3WM8v5crbo
jsYuU2/REQdla2aLoryDU2/3lsR++O6ca/jHfrU3/KkeSqEvmJhJ5s//3DL/RGle
FLRDNoudBAHWIsPCqf3bRtN8TM8EHkuNz410mcyyGRL9KP1jVt27a1IUxsyMm5LR
thaFGfmBrEU/6Nde5hMOeIy0RR2rzeSE0K4/VuHLcaWGh3QzDPV5Jl44oCbvSeNR
DffBa8J187vpX2Gdc2NCv01m671h9uN88gjaXQEKYin1WsVIwDbODO0WjPbRwdVj
TJmtVPd1MjFj18vjguj9
=8wKK
-----END PGP SIGNATURE-----


-- 
To unsubscribe, send mail to [email protected].

Reply via email to