Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] safe index in the after-poll.rb ?
@ 2008-08-06 12:24 Daniel Neubacher
  2008-08-13  3:22 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Neubacher @ 2008-08-06 12:24 UTC (permalink / raw)


Hello there,
i've build me a after-poll hook to display the unread mail count in my
window manager:
system ("echo 0 widget_tell mystatusbar mails text
\\|#{num_inbox_total_unread}\\| | awesome-client")

This is working, but only when the index is safed. When i read some
mails and do not safe the index the count doesnt give me the right
amount of unread mails back. So is there a way to save the index
automaticly after polling my mails ?

thanks in advance
Daniel Neubacher


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [sup-talk] safe index in the after-poll.rb ?
  2008-08-06 12:24 [sup-talk] safe index in the after-poll.rb ? Daniel Neubacher
@ 2008-08-13  3:22 ` William Morgan
  0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2008-08-13  3:22 UTC (permalink / raw)


Reformatted excerpts from Daniel Neubacher's message of 2008-08-06:
> This is working, but only when the index is safed. When i read some
> mails and do not safe the index the count doesnt give me the right
> amount of unread mails back. So is there a way to save the index
> automaticly after polling my mails ?

Let's see... this is untested, but in your after-poll hook you
could try something like:

  BufferManager.buffers.each { |name, b| b.save if b.is_a? ThreadIndexMode }
-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-13  3:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-06 12:24 [sup-talk] safe index in the after-poll.rb ? Daniel Neubacher
2008-08-13  3:22 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox