Re: How to deal with menupath in dia.register_callback()
- From: Hans Breuer <hans breuer org>
- To: dia-list gnome org
- Subject: Re: How to deal with menupath in dia.register_callback()
- Date: Sat, 29 Jun 2013 14:36:42 +0200
At 29.06.2013 13:13, Bao Niu wrote:
I tried this in my code:
dia.register_callback("ModKeys", "<Display>/Database/ModKeys", mod_keys())
There is one obvious bug in your code: you are supposed to pass the
function as paramter to register_callback, not the return value of your
function.
I was expecting that there would be a new menu called "Database" showing up
in the top, but instead it is "ModKeys=>Activate", what is the logic of
menupath here?
- You are not supposed to create top level menu entries
just from the plug-in
- If you really need such it has to be added to the corresponding
ui file first (integrate-ui.xml or display-ui.xml)
- The random text in the menu might be an artifact coming from your script.
In my experiments I haven't seen such.
I couldn't find documentation on this topic in our forum.
> Could anybody please help explain a bit? Many thanks.
If you want help debugging your source it is generally a good idea to
provide a minimal working example exhibiting the behavior you don't understand.
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]