Xfce Wiki

Sub domains
 

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:howto:panel_plugins [2010/04/06 03:40]
hashimo old revision restored
dev:howto:panel_plugins [2017/04/18 04:27] (current)
andreldm Fix panel plugins path
Line 1: Line 1:
 ====== Xfce Panel Plugins How To ====== ====== Xfce Panel Plugins How To ======
-{{wiki:​package.png ​ }} [[http://​foo-projects.org/​~nick/​packages/​xfce4-sample-plugin.tar.bz2|Download]] ​the external ​sample plugin. You can also [[http://svn.xfce.org/svn/goodies/​xfce4-sample-plugin/trunk/|checkout]] the goodies svn. +<note tip>You can get the sample plugin ​from [[https://git.xfce.org/panel-plugins/​xfce4-sample-plugin/​|git]].</​note>​
  
 ===== Introduction ===== ===== Introduction =====
Line 45: Line 44:
   X-XFCE-Unique=true   X-XFCE-Unique=true
  
 +If the plugin is compatible with GTK+ 3, you need to add this line:
 +
 +  X-XFCE-API=2.0
  
 ===== Library ===== ===== Library =====
Line 272: Line 274:
  
 For creating a release you need to run ''​./​autogen.sh && make distcheck''​. Fix all warnings and errors in make distcheck before distributing the package. For creating a release you need to run ''​./​autogen.sh && make distcheck''​. Fix all warnings and errors in make distcheck before distributing the package.
 +
 +To help development,​ you can also test plugins without installing them on panel'​s prefix (e.g. /usr), you can also directly run plugins from the source so you don't need to to overwrite a plugin version from your distribution. To accomplish this, build the plugin with make and then follow these steps:
 +
 +  * Create a symbolic link from your plugin binary to the panel'​s prefix installation,​ e.g. ''​ln -s /​home/​johndoe/​where/​your/​src/​is/​panel-plugin/​.libs/​libyourplugin.so /​usr/​lib/​xfce4/​panel-plugins/​libyourplugin-git.so''​
 +  * Copy ''/​usr/​share/​xfce4/​panel/​plugins/​yourplugin.desktop''​ to ''/​usr/​share/​xfce4/​panel/​plugins/​yourplugin-git.desktop''​
 +  * Edit the latter to point at '​yourplugin-git'​ instead of '​yourplugin',​ modify the ''​Name''​ entry to distinguish your instance and ''​X-XFCE-Module''​ to match the symbolic link, i.e. ''​libyourplugin-git''​.
 +  * If you're porting a plugin to GTK+ 3, make sure to add ''​X-XFCE-API=2.0''​ to the desktop-git file.
 +
 +Now the '​git'​ version of the panel plugin should be available in the 'add plugin'​ panel dialog. Whenever you make changes and compile the plugin, all you need to do is to add the plugin to panel again or simply refresh the panel ''​xfce4-panel -r''​.
  
 ===== Debugging ===== ===== Debugging =====
-One can use Valgrind to debug external plugins, using the technique described [[:howto/panel_plugin_debug|here]].+One can use GDB and Valgrind to debug external plugins, using the technique described [[https://​docs.xfce.org/​xfce/​xfce4-panel/​debugging|here]].
  
dev/howto/panel_plugins.1270518054.txt.gz · Last modified: 2010/10/02 17:26 (external edit)