Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:howto:panel_plugins [2017/10/17 22:50] – Fix links in introduction andreashae | dev:howto:panel_plugins [2019/02/17 10:31] – use XFCE_PANEL_PLUGIN_REGISTER instead of older macros lorb | ||
---|---|---|---|
Line 53: | Line 53: | ||
line like this: | line like this: | ||
- | XDT_CHECK_PACKAGE ([LIBXFCE4PANEL], | + | XDT_CHECK_PACKAGE ([LIBXFCE4PANEL], |
The above assumes that you are using the xfce4-dev-tools package, which you really should, | The above assumes that you are using the xfce4-dev-tools package, which you really should, | ||
Line 67: | Line 67: | ||
===== Plugin Registration ===== | ===== Plugin Registration ===== | ||
- | To register a plugin with the plugin system there are two macros | + | To register a plugin with the plugin system there is one macro available that should be used, instead of using the library functions directly. |
- | instead of using the library functions directly; one for internal plugins and one for external plugins. | + | XFCE_PANEL_PLUGIN_REGISTER(construct); |
+ | |||
+ | Older versions use the following two deprecated macros, | ||
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(construct); | XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(construct); | ||
Line 279: | Line 281: | ||
* Create a symbolic link from your plugin binary to the panel' | * Create a symbolic link from your plugin binary to the panel' | ||
* Copy ''/ | * Copy ''/ | ||
- | * Edit the latter to point at ' | + | * Edit the latter to point at ' |
* If you're porting a plugin to GTK+ 3, make sure to add '' | * If you're porting a plugin to GTK+ 3, make sure to add '' | ||
+ | |||
+ | An example: | ||
+ | |||
+ | < | ||
+ | $cat / | ||
+ | [Xfce Panel] | ||
+ | Type=X-XFCE-PanelPlugin | ||
+ | Encoding=UTF-8 | ||
+ | Name=Disk Performance Monitor (git) | ||
+ | Comment=Show disk performance | ||
+ | Icon=drive-harddisk | ||
+ | X-XFCE-Internal=FALSE | ||
+ | X-XFCE-Module=diskperf-git | ||
+ | X-XFCE-API=2.0 | ||
+ | </ | ||
Now the ' | Now the ' |