[Kde-pim] kmail dbus method to hide in systray doesn't work

Kevin Krammer kevin.krammer at gmx.at
Sun Nov 9 20:53:13 GMT 2008


On Sunday 09 November 2008, vatbier wrote:
> --- On Sat, 11/8/08, Thomas McGuire <mcguire at kde.org> wrote:
> > qdbus works for me:
> > qdbus org.kde.kmail /kmail/kmail_mainwindow_1 setHidden
> > true
>
> Thomas,
>
> yes, thank you, that qdbus command also works for me.
> Are we supposed to use qdbus instead of dbus-send in KDE?
> I can't see what I'm doing wrong with my dbus-send command:
>
> dbus-send --type=method_call --dest=org.kde.kmail /kmail/kmail_manwindow_1
>  com.trolltech.Qt.QWidget.setHidden boolean:true

I think it is just
b:true

The D-Bus type signature for boolean is just "b" [1]

> I can't find better info on how to use dbus-send.

I guess it is mainly intended to be a testing tool for D-Bus developers.
Maybe there would be some volunteers to create power-user level documentation 
if one asks around.

> I can't find no info at all on how to use qdbus, is there any tutorial?

It uses D-Bus introspection, i.e. calling special methods on D-Bus objects to 
ask them about their interfaces, methods and their signatures, so it can 
automatically convert parameters passed to it into the correct type for the 
respective call.

This has the disadvantage that it can only be used for calls on objects which 
implement this introspection interface, but has the advantage of allowing to 
discover exported functionalit.

If called without parameters it will list all D-Bus services, if a service is 
passed, it will list all its objects and so on.

Cheers,
Kevin

[1] 
http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20081109/fd468c8f/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list