Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques core and applet Dbus interfaces are up-to-date for the 2.4
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] core and applet Dbus interfaces are up-to-date for the 2.4
fabounet English 10 fabounet [Read]
25 November 2011 à 12:06

fabounet, Friday 08 July 2011 à 15:34


Subscription date : 30 November 2007
Messages : 17118
Both the core and applet Dbus interfaces are up-to-date for the 2.4 now:
http://www.glx-dock.org/ww_page.php?p=Documentation&lang=en
http://glx-dock.org/ww_page.php?p=Control_your_dock_with_DBus&lang=en
feel free to correct, comment, and/or translate

matttbe, Wednesday 13 July 2011 à 14:56


Subscription date : 24 January 2009
Messages : 12573
Thank you

PS: I've just added a few --print-reply option for all Get* functions

tristangrimaux, Tuesday 22 November 2011 à 21:18


Subscription date : 22 November 2011
Messages : 9
Can't get the Animate to work using dBus via bash or python

this is from the example

dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Animate string:fire int32:60 string:"module=clock"

nothing happens

using Python

import dbus

DBUSI = 'org.cairodock.CairoDock'
DBUSP = '/org/cairodock/CairoDock'

bus = dbus.SessionBus()
obj = bus.get_object(DBUSI, DBUSP)

cairo = dbus.Interface(obj, DBUSI)

#This works!!!
cairo.SetQuickInfo( '2 unread', 'class=icedove')

#This does not!!!
cairo.DemandsAttention("true", "rotate", "Clock")
cairo.DemandsAttention("true", "rotate", "class=icedove")

#Not working either
cairo.Animate("rotate", 2, "Clock")
cairo.Animate("rotate", 2, "class=icedove")


using 2.4.0.2 from Debian Testing

matttbe, Tuesday 22 November 2011 à 23:07


Subscription date : 24 January 2009
Messages : 12573
Hello,

This is strange, I used these commands and it works with the latest rev of Cairo-Dock and python 2.7.2
>>> import dbus
>>>
>>> DBUSI = 'org.cairodock.CairoDock'
>>> DBUSP = '/org/cairodock/CairoDock'
>>>
>>> bus = dbus.SessionBus()
>>> obj = bus.get_object(DBUSI, DBUSP)
>>>
>>> cairo = dbus.Interface(obj, DBUSI)
>>> cairo.SetQuickInfo( '2 unread', 'class=firefox')
>>> cairo.Animate("rotate", 2, "class=firefox")
>>> cairo.DemandsAttention("true", "rotate", "class=firefox")
>>> cairo.DemandsAttention("true", "rotate", "module=musicPlayer")
>>> cairo.Animate("rotate", 2, "module=musicPlayer")

You can also test these commands:
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.DemandsAttention boolean:true string:default string:"class=firefox"
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Animate string:fire int32:60 string:"module=clock"
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Animate string:default int32:2 string:"class=firefox"


Or maybe you've disable a few options in the config panel of the DBus plugin. Can you also launch the dock from a terminal with this command and check if there is some strange warnings when you try to animate an icon through DBus
cairo-dock -l debug

tristangrimaux, Wednesday 23 November 2011 à 12:13


Subscription date : 22 November 2011
Messages : 9
It's working now. But if there is no default animation assigned, the Animate or the DemandsAttention commands fails silently on launchers.

One more thing: if the DBus command fails to find the object, it throws an exception that about setting the value to false without specifying an error, so the python program aborts.

And, I couldn't find the CDApplet for python in my installation. All files are missing

matttbe, Wednesday 23 November 2011 à 12:26


Subscription date : 24 January 2009
Messages : 12573
And, I couldn't find the CDApplet for python in my installation. All files are missing
Bug already reported to our Debian packagers...

tristangrimaux, Wednesday 23 November 2011 à 12:51


Subscription date : 22 November 2011
Messages : 9
Yeap! I saw the report! Can you tell me if the behavior I've described is a bug or a feature? I mean, the fact that launchers don't animate unless they have a hover animation?

fabounet, Wednesday 23 November 2011 à 16:27


Subscription date : 30 November 2007
Messages : 17118
please refer to the doc:
http://www.glx-dock.org/ww_page.php?p=Control_your_dock_with_DBus&lang=en#15-Animate

so cairo.DemandsAttention("true", "rotate", "class=icedove") is wrong because it's True, not "true"

cairo.Animate("rotate", 2, "class=icedove") will work if icedove is realy the class of the launcher (and since icedove is a weird Thunderbird recompilation, it's maybe not the case)

tristangrimaux, Thursday 24 November 2011 à 22:22


Subscription date : 22 November 2011
Messages : 9
mmm it's working with "true" and "True"

One more question:
cairo.DemandsAttention("False", "none", "class=icedove")

is bringing, sometimes, a strange demand: The icon stares, doesn't move but is on top...

matttbe, Friday 25 November 2011 à 00:30


Subscription date : 24 January 2009
Messages : 12573
is bringing, sometimes, a strange demand: The icon stares, doesn't move but is on top...
Can you be more precise than 'sometimes'?
(Every time after one specific thing or only when the icon was like that)

fabounet, Friday 25 November 2011 à 12:06


Subscription date : 30 November 2007
Messages : 17118
"none" is not a valid animation
you should use either "default", or the name of an animation (see the doc for the list of available animations; also keep in mind that some animations require the OpenGL backend).

I don't see how it can work with "true" because it's a string and the method expects a boolean ... maybe Python is doing some clever things under the hood

Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] core and applet Dbus interfaces are up-to-date for the 2.4
fabounet English 10 fabounet [Read]
25 November 2011 à 12:06


Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques core and applet Dbus interfaces are up-to-date for the 2.4 Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.