xfce-exec

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Wed Mar 3 02:02:21 CET 2004


Jasper Huijsmans wrote:
> Hey all,
> 
> This is the command execution function for the panel with startup
> notification support, changed to make it suitable for general use. I
> intend to put this in libxfcegui4 (startup notification needs X support)
> if there are no objections. 
> 
> So how does this look? 

I like it.

> void free_startup_timeout (void);

Since this function is part of the public API of a xfce library, it would be 
nice to have it prefixed with xfce_. Maybe xfce_exec_free_startup_timeout() or 
xfce_exec_free_resources(), so one knows that this belongs to the xfce-exec 
module when found in the source.

Another possibility would be to automatically register this function with 
g_atexit() once, e.g. in xfce_exec:

static gboolean atexit_registered = FALSE;
if (!atexit_registered) {
   atexit_registered = TRUE;
   g_atexit(free_startup_timeout);
}

This way we don't need the free_startup_timeout() in the public API. The only 
question is: What about modules? (not sure, since libxfcegui4 should be loaded 
in any case, shouldn't it?)

> gboolean xfce_exec (const char *cmd, gboolean in_terminal, gboolean use_sn,
> 	   	    GError **error);

IMHO, being able to pass environment variables would be nice as well. That'd 
provide a full replacement for the exec_command*() functions in dialogs.h, and 
we can deprecate them.

regards,
Benedikt

-- 
NetBSD Operating system:                       http://www.NetBSD.org/
pkgsrc "Work in progress":                  http://pkgsrc-wip.sf.net/
XFce desktop environment:                        http://www.xfce.org/
German Unix-AG Association:                   http://www.unix-ag.org/
os-network:                                 http://www.os-network.de/

OpenPGP Key: http://www.home.unix-ag.org/bmeurer/#gpg





More information about the Xfce4-dev mailing list