<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="DejaVu Sans">Hi All, <br>
I want to write a panel app for xfce so I decided to get copilot
to write an example for me - what could possibly go wrong. As far
as I can tell everything is OK but I can't add the app from
Panel->AddNewItem.<br>
<br>
xfce_panel_plugin_example.c:<br>
<br>
#include <libxfce4panel/xfce-panel-plugin.h><br>
#include <libxfce4panel/libxfce4panel.h><br>
#include <gtk/gtk.h><br>
<br>
static void<br>
my_plugin_construct(XfcePanelPlugin *plugin)<br>
{<br>
GtkWidget *label = gtk_label_new("Hello XFCE Panel!");<br>
gtk_container_add(GTK_CONTAINER(plugin), label);<br>
gtk_widget_show(label);<br>
}<br>
<br>
XFCE_PANEL_PLUGIN_REGISTER(my_plugin_construct);<br>
<br>
<br>
----------------------------------------------------------------<br>
<br>
</font><font face="DejaVu Sans">xfce_panel_plugin_example.desktop:<br>
<br>
</font><font face="DejaVu Sans">[Xfce Panel]<br>
Version=1.0<br>
Type=X-XFCE-PanelPlugin<br>
Name=Example Panel Plugin<br>
Comment=Displays a simple label on the XFCE panel<br>
Icon=applications-system<br>
X-XFCE-Module=xfce_panel_plugin_example<br>
X-XFCE-Internal=false<br>
X-XFCE-Unique=true<br>
X-XFCE-API=2.0<br>
<br>
<br>
------------------------------------------------------------------<br>
<br>
Compilation:<br>
<br>
gcc -fPIC -shared xfce_panel_plugin_example.c -o
xfce_panel_plugin_example.so $(pkg-config --cflags --libs
libxfce4panel-2.0 gtk+-3.0)<br>
<br>
(compiled without any issues)<br>
<br>
-----------------------------------------------------------------<br>
<br>
I put the desktop file in .local/share/xfce4/panel/plugins<br>
and the .so file in .local/lib/xfce4/panel/plugins<br>
<br>
I ran xfce4-panel -r (several times) without any warnings or
errors. I also created another panel and tried to add the app to
that panel.<br>
<br>
I even tried putting them in the appropriate system level
directories and did a reboot.<br>
<br>
I also tried copying and modifying the .so file and .desktop file
of one that is on my panel and so I know it works. <br>
<br>
Nothing worked. It feels like I'm missing some step - like some
way to let the system know about my app other than putting it in
the appropriate directories.<br>
<br>
<br>
Thoughts?<br>
<br>
<br>
Regards,<br>
Peter<br>
</font>
</body>
</html>