libxfcegui4 dialogs

Benedikt Meurer Benedikt.Meurer at unix-ag.uni-siegen.de
Wed Mar 12 14:04:50 CET 2003


On Wed, 12, Mar 2003, Jasper Huijsmans wrote:

> On Wed, 12 Mar 2003 13:07:53 +0100
> Benedikt Meurer <Benedikt.Meurer at unix-ag.uni-siegen.de> wrote:
> 
> > Hello Jasper,
> > 
> > I'd like to replace the show_{error,info,warning} functions in
> > libxfcegui4 with the following functions:
> > [...]

> If it's only convenience for having to do a g_strdup_printf() before the
> dialog I think it's overkill, if it's more sophisticated with error
> numbers and such, I think it won't help us much since many of the
> error's in xfce4 come from gtk and are encapsulated by a GError *
> anyway.

Good point. I think you're right. So the functions should be something
like that:

	xfce_err(const GError *, const gchar *, ...)
	and so on...

> I'm not pricipally against it, it's just that I want to make sure we
> keep things as simple as possible. Basically, what I'm saying is I'd
> only like to add stuff that solves a problem now, or makes things easier
> now, or reduces duplication or something. I don't want to have things
> that may be very useful in the future or the equivalent of the Java
> class library incorporated with xfce ;-)(ok, so that's a tiny bit over
> the top :-))

The functions themselve are quite simple: the functions without the 'v'
simply call the corresponding 'v'-functions. The 'v'-functions format
the string and call a static popup_message()-function.

Its intended to reduce redundant code all over the Xfce modules (now :),
and to make life a bit easier, since this really safes a call to
g_strdup_printf() which in turn has really a large overhead for simple
string formating.

The xfce_*() functions will use a static message buffer to reduce the
g_strdup overhead (and therefore unneccessary memory fragmentation).

And besides that: I'd like to see Java support for Xfce :-)

> 	Jasper

regards,
Benedikt

-- 
Those who do not understand Unix are condemned to reinvent it, poorly.
    -- Henry Spencer



More information about the Xfce4-dev mailing list