Reformatted excerpts from Christian Dietrich's message of 2009-09-29:
> i am using sup now for just a few weeks and it is just amazing how
> good it works (the lack of folders iritated me a little bit at
> first).

Welcome!

> But now to my Request, i would like to have something like datelines
> in index mode, like:

Cool idea. I'd like to see how this looks.

> I tried to implement the feature by my self, but the mapping beetween
> `curpos' and `...@threads' in modes/thread-index-mode.rb made this a
> little bit hard, and i didn't know how to solve this problem without
> breaking sup. Perhaps you can give me a hint, how this problem with
> the direct mapping can be solved.

If you look at #regen_text, @text and @lines are the two variables that
control the display. @text is an array of the GUI elements for each line
of the display. Right now it's just set to one line for each thread. You
want to add one additional element at the appropriate position. for each
date line. GUI elements are represented as arrays of [color, text]
pairs; you can look at #text_for_thread_at for an example.

Then, you want to make sure that @lines is set correctly. @lines is a
map (hash) from line number to thread (so that when the user presses a
key, we know which thread the cursor is resting on).

Hope that helps.
-- 
William <wmorgan-...@masanjin.net>
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to