[Goodies-dev] [request] python plugin tutorial
Alexandre Leray
newsletters at alexandreleray.com
Thu Jan 31 18:40:43 CET 2008
Hi,
thanks for your response. I got this error :
"Traceback (most recent call last):
File "test.py", line 9, in ?
plugin = xfce4.panel.Plugin()
RuntimeError: could not create xfce4.panel.ExternalPanelPlugin object"
In the documentation the right object is called
external.ExternalPanelPlugin.
Any idea ?
Bye
Martin Forsgren wrote:
> Hi,
> there isn't much documentation, atleast what I've found, but
> its not so hard. Check http://code.google.com/p/pynetworkmanager/ and look
> at the panel-plugin code.
>
> Maby this below is enough for you... (it's copy/paste code and can contain
> errors)
>
> ------
>
> # External libraries
> import gtk # use gtk-library
> import xfce4.panel # to create xfce4 panel plugin
>
> # Button with status icon and menu plopping up on clicking it
> button = gtk.Button( "Hello World" )
> button.show()
>
> # create an xfce panel plugin
> plugin = xfce4.panel.Plugin()
>
> plugin.add( button )
>
> # Add right mouse button action
> plugin.add_action_widget( button )
>
> # Show plugin
> plugin.show()
>
> # Close plugin on destroy
> plugin.connect("destroy", pynm.stop )
>
> # Ready. Start plugin
> gtk.main_loop()
>
> ---------
>
> Den 2008-01-25 18:44:59 skrev Alexandre Leray
> <newsletters at alexandreleray.com>:
>
>
>> Hi everybody,
>>
>> It's quite hard to find documentation on pyxfce and python plugins. Does
>> anybody could make me a brief tutorial (like "hello world" in a panel)
>> or give me links for?
>>
>> Thanks!
>> _______________________________________________
>> Goodies-dev mailing list
>> Goodies-dev at xfce.org
>> http://foo-projects.org/mailman/listinfo/goodies-dev
>>
>
>
> _______________________________________________
> Goodies-dev mailing list
> Goodies-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/goodies-dev
>
More information about the Goodies-dev
mailing list