Austin Donnelly <[EMAIL PROTECTED]> writes:

> > > Since we now have a number of these *-format strings, has someone
> > > taken the time to generalise my code for image-title-format?
> > 
> > please excuse my ignorance, what code are you talking about ?
> gdisplay.c: gdisplay_format_title()
> (It may have moved in 1.3.x)

app/display/gimpdisplayshell.c: gimp_display_shell_format_title()

> It's a large switch statement, with hard-coded characters and their
> expansions.  If different expansions are needed, perhaps its time to
> write a function (eg expand_format()) which takes a format string, an
> environment, and a table of format chars and their expansions.  I
> didn't do it this way originally because it was more complicated and
> at the time there was really only one set of format chars.
> If now we're expansing different format strings, then perhaps the time
> has come to generalise the code.

we're still expanding only one set of format chars, we just do it for
two strings (one for the title, one for the statusbar). The function
looks pretty straightforward to me also it is still a large switch 

Salut, Sven
Gimp-developer mailing list

Reply via email to