xfrun4 + dbus
Benedikt Meurer
benedikt.meurer at unix-ag.uni-siegen.de
Tue Feb 7 16:10:33 CET 2006
Jani Monoses wrote:
>>>>>VOID OpenDialog (STRING working_directory)
>>>>>VOID OpenDialogOnDisplay (STRING working_directory, STRING display)
>
> thinking a bit more about this, wouldn't the first function be
> equivalent to the second being called with display="" meaning default
> just as passing "" as working_directory means don't care, use current?
> Would make implementing simpler.
I'm working on the implementation for Thunar, and I was thinking the
same. ;-)
I guess an OpenDialog(STRING working_directory, STRING display) will do,
as in 99% of the cases this method will be invoked by a library
function, which will automatically determined the correct display
string, i.e.
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 ();
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.
> Jani
Benedikt
More information about the Xfce4-dev
mailing list