On 2009/05/25 12:43, Romain Bignon <rom...@peerfuse.org> wrote:
> On 25/May - 09:45, Max Kellermann wrote:
> > I'd like to have a more generic approach to this in the long run, but
> > your code is a good start, to get this feature quickly.
> 
> What kind of generic approach do you want? This patch provides a way to set a
> second column value, right aligned. Perhaps you want to support real tables 
> with
> unlimited column numbers?

Yes, sort of.  Let the list callback return a "const void *" instead
of "const char *", and have another callback function (the "line
renderer") which draws this line.  The default renderer assumes the
pointer is a C string.  Other renderers may operate on a mpd_song
object, and display various information in a table.  Or they might
display directories in a different color.

At compile time, you could decide to hard-code the renderer, so
ncmpc-mini has only the existing (inlined) simple string renderer.

> Fixed and pushed on my public repository.

Better now.  I have merged your patch.

Max

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to