xfrun4 + dbus

Jani Monoses jani.monoses at gmail.com
Tue Feb 7 16:41:18 CET 2006


> 
> gboolean
> xfce_run_dialog (const gchar *working_directory,
>                  GdkScreen   *screen,
>                  GError     **error)
> {
>   gboolean result = FALSE;
>   gchar   *display_name;
> 
>   if (G_UNLIKELY (screen == NULL))
>     screen = gdk_screen_get_default ();

I was wondering seeing G_UNLIKEY used so much whether it is worth using 
it in functions which are rarely called and there's no perceivable 
benefit to a branch optimisation, especially since most things are not
CPU bound?


>   display_name = gdk_screen_make_display_name (screen);
> 
>   ...
> 
>   g_free (display_name);
> 
>   return result;
> }
> 
> The working directory should always be specified, because else the user
> might invoke xfrun4 from "/whatever/directory", which contains a file
> "foo", and xfrun4 will be unable to complete "f" to "foo", because the
> daemon was initially started in the home dir.

what should the working dir be considered when pressing the xfrun 
shortcut? The users home?

Jani




More information about the Xfce4-dev mailing list