Thanks Hans. Got the basic idea now.

On Sat, Jun 29, 2013 at 5:36 AM, Hans Breuer <[email protected]> wrote:

> 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
> ______________________________**_________________
> dia-list mailing list
> [email protected]
> https://mail.gnome.org/**mailman/listinfo/dia-list<https://mail.gnome.org/mailman/listinfo/dia-list>
> FAQ at http://live.gnome.org/Dia/Faq
> Main page at http://live.gnome.org/Dia
>
>
_______________________________________________
dia-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia

Reply via email to