xfrun4 D-BUS service

Brian J. Tarricone bjt23 at cornell.edu
Tue Aug 1 00:14:59 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/31/2006 12:19 PM, Jannis Pohlmann wrote:
> Hey Brian,
> 
> I noticed that Verve doesn't work with the xfrun D-BUS implementation
> you commited a few days ago. This is because you implement a different
> OpenDialog method. AFAIK, we agreed on using this:
> 
>   OpenDialog (dir : STRING, display : STRING) : VOID
> 
>   dir     : either a file:-URI or an absolute path.
>   display : the screen on which to display the file properties
>             or "" to use the default screen of the current panel
>             instance.
> 
> In xfrun-dbus.c, you pass three arguments to this method
> (the third one is a variable named "run_argument"). Also, you pass them
> in wrong order (display, dir, run_argument) instead of (dir, display).
> Is the run_argument really needed? If so, we might want to add it to
> the interface but if not, I can write a patch for removing it from
> xfrun4.

Oops.  Yeah, I forgot we actually agreed on an interface.  I don't care
about the order, so feel free to change it.  I just feel it's more
consistent to have the display first.

The run_arugment is needed to support old xfrun behavior: If you run
"xfrun4 file.txt" from the cmdline, the box pops open to ask you what
you want to open "file.txt" with.  So if you put, say, 'mousepad' in the
xfrun box, "mousepad file.txt" gets launched.  There's no way to do that
without adding an argument.

Is there any way to do optional arguments with dbus?  It would be nice
to make run_argument optional...  I found that passing NULL to
dbus_message_add_args() (or whatever it is) doesn't work.

> Another thing I noticed is that no DBUS_NAME_FLAGs are passed to
> dbus_bus_request_name() in line 230. Ideally, you'd pass
> DBUS_NAME_FLAG_ALLOW_REPLACEMENT (only when using D-BUS >= 0.60) in
> order to allow other services to take over the ownership for
> org.xfce.RunDialog. This is important because programs like Verve are
> likely to be started after the xfrun4 (as invoked by the D-BUS daemon).

I'm not convinced we *want* other things to be able to steal the service
ownership.  That sounds like bad, unpredictable UI.  At any rate, I
didn't really do much with the d-bus stuff other than reformat it: that
code is mostly verbatim from what either you or Jani wrote and posted to
bugzilla.

	-brian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEzoDj6XyW6VEeAnsRAkz7AJ0YOOqCZc5jbr+otvB3Q1CxmWREfwCgkX1U
FxV1PwVqAaIe9S67FsePLUs=
=W/ec
-----END PGP SIGNATURE-----



More information about the Xfce4-dev mailing list