2011/1/19 Julien Lavergne <[email protected]>:
> 2011/1/19 Joost van der Hoff <[email protected]>:
>> I am having a problem adding the standard LXPanel right-click dropdown
>> menu the GlobalMenu plugin I am writing. Adding it to the plugin's top
>> level container as in the example plugin doesn't work. I can add a
>> mouseclick listener to the GlobalMenu widget but that overrides the
>> listener which makes the GlobalMenu applet useful as a global menubar.
>> Does anyone know how to add the right click dropdown menu without losing
>> major functionality?
>
> Try to remove any g_signal_connect to the top level container of the plugin.
> From you example in the howto, try to remove :
> g_signal_connect (G_OBJECT (p->pwid), "button_press_event", G_CALLBACK
> (button_press_event), (gpointer) p);
>
> It worked for me for my indicator plugin.

Sorry, I posted too fast, it worked when I added more signals. I have this :

    g_signal_connect(p->pwid, "button-press-event",
G_CALLBACK(plugin_button_press_event), p);
    g_signal_connect(indicator->menubar, "button-press-event",
G_CALLBACK(menubar_press), NULL);
    g_signal_connect(indicator->menubar, "scroll-event", G_CALLBACK
(menubar_scroll), NULL);
    g_signal_connect_after(indicator->menubar, "expose-event",
G_CALLBACK(menubar_on_expose), indicator->menubar);

where p->pwid is the top level plugin widget, and indicator->menubar
the widget embedded into this top level plugin widget. I remembered
that I had the same problem than you until I connect the signals of
the indicator widget.

Hope it will help.

Regards,
Julien Lavergne

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to