! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Module loading fails amusingly if you create directories in the same dir the ...
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description huggie 2007-05-24 15:07:36 CEST
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=425811

If you create a directory called say launcher in your home directory and then run the panel from that directory all the launcher plugins die.

Normally (without the launcher dir) you get:
DBG[panel-item-manager.c:358] update_plugin_list():  + class "launcher": name=La
uncher, comment=Program launcher with optional menu, icon=gnome-fs-executable, e
xternal=0, path=/usr/lib/xfce4/panel-plugins/liblauncher.so

With the launcher dir you get:
DBG[panel-item-manager.c:358] update_plugin_list():  + class "launcher": name=La
uncher, comment=Program launcher with optional menu, icon=gnome-fs-executable, e
xternal=0, path=launcher

Note path is different.

This is because of the g_file_test in new_panel_class_from_desktop_file in panel/panel-item-manager.c:

         else if ((value = xfce_rc_read_entry (rc, "X-XFCE-Module", NULL)))
         {
            if (g_file_test (value, G_FILE_TEST_EXISTS))


So when you have a desktop file with:
X-XFCE-Module=launcher
X-XFCE-Module-Path=/usr/lib/xfce4/panel-plugins

Then it won't even consider the module path.

Possible ways to fix this:
 1. move the parsing of X-XFCE-Module-Path up before the g_file_test (i.e. swap the if and else)
 2. check for a leading / in X-XFCE-Module before the g_file_test

You might even want to do both.

I will attach the trivial patch to do the second which I've tested and works as expected.
Comment 1 huggie 2007-05-24 15:08:16 CEST
Created attachment 1154 
Patch to check for leading / in X-XFCE-Module

This is the patch I mentioned which works as a workaround.
Comment 2 Nick Schermer editbugs 2007-05-24 18:20:11 CEST
I cleaned up the module functions and discovered this bug yesterday, so a fix will be committed within a couple of minutes.

Bug #3279

Reported by:
huggie
Reported on: 2007-05-24
Last modified on: 2010-11-20

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Attachments

Patch to check for leading / in X-XFCE-Module (507 bytes, application/octet-stream)
2007-05-24 15:08 CEST , huggie
no flags

Additional information