Re: [Deskbar] Module with multiple actions



That was it thanks!

On Mon, 2007-09-03 at 12:06 +0200, Sebastian P�erl wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Matthew Gregg schrieb:
> > On Sun, 2007-09-02 at 13:00 +0200, Sebastian P�erl wrote:
> > Matthew Gregg schrieb:
> >>>> I'm trying to extend one of my existing modules to support multiple
> >>>> actions.  I'm using a single match with multiple "add_actions".  Unless
> >>>> I include one of the stock actions, CopyToClipboardAction for example,
> >>>> Deskbar seems to pick the first action and ignore the rest.  I'm
> >>>> probably doing something horribly wrong, can anyone help?  I've attached
> >>>> a very simple test module that attempts to show what I am doing.
> >>>>
> > Deskbar takes the first action you added when you activate the match. If
> > a match has more than one action a '>' is displayed on the right. If you
> >  click on it you will see a list of actions.
> 
> Right. A closer look revealed the problem. If two actions return the
> same value for get_hash() (default is None) they will be treated as the
> same and only the first action is actually added.
> I guess I should return the default value of get_hash to something
> different. I'm thinking of id(self).
> 
> - --
> Greetings,
> Sebastian P�erl
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFG29y71ygZeJ3lLIcRArlrAJ9TX+8iy7qHLcR+jDy5nnMD/rLeBgCfeA1z
> oE5AzyINizSyOm8pdMrpFiE=
> =Rca0
> -----END PGP SIGNATURE-----
-- 
Matthew Gregg <mcg braintube com>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]