[Xfce4-commits] r25755 - in xfce4-panel/branches/xfce_4_4: . panel

Nick Schermer nick at xfce.org
Thu May 24 20:40:41 CEST 2007


Author: nick
Date: 2007-05-24 18:40:41 +0000 (Thu, 24 May 2007)
New Revision: 25755

Modified:
   xfce4-panel/branches/xfce_4_4/ChangeLog
   xfce4-panel/branches/xfce_4_4/NEWS
   xfce4-panel/branches/xfce_4_4/panel/panel-item-manager.c
Log:
	* panel/panel-item-manager.c, NEWS: Fix loading internal plugins 
	if a similar file exists in the start directory (Bug #3279).

Modified: xfce4-panel/branches/xfce_4_4/ChangeLog
===================================================================
--- xfce4-panel/branches/xfce_4_4/ChangeLog	2007-05-24 18:25:31 UTC (rev 25754)
+++ xfce4-panel/branches/xfce_4_4/ChangeLog	2007-05-24 18:40:41 UTC (rev 25755)
@@ -1,3 +1,8 @@
+2007-05-24 20:37  nick
+
+	* panel/panel-item-manager.c, NEWS: Fix loading internal plugins 
+	if a similar file exists in the start directory (Bug #3279).
+
 2007-04-09 10:05  maximilian
 
 	* libexo/trunk/po-doc/fr.po, libexo/trunk/po/fr.po,

Modified: xfce4-panel/branches/xfce_4_4/NEWS
===================================================================
--- xfce4-panel/branches/xfce_4_4/NEWS	2007-05-24 18:25:31 UTC (rev 25754)
+++ xfce4-panel/branches/xfce_4_4/NEWS	2007-05-24 18:40:41 UTC (rev 25755)
@@ -6,6 +6,8 @@
   (Jasper)
 - Fix area that is off-limits to other windows (_NET_WM_STRUT hints) for a
   Xinerama setup with differently sized monitors (Bug #3097). (Jasper)
+- Fix loading internal plugins if a similar file exists in the start directory
+  (Bug #3279). (Nick)
 
 4.4.1
 =====

Modified: xfce4-panel/branches/xfce_4_4/panel/panel-item-manager.c
===================================================================
--- xfce4-panel/branches/xfce_4_4/panel/panel-item-manager.c	2007-05-24 18:25:31 UTC (rev 25754)
+++ xfce4-panel/branches/xfce_4_4/panel/panel-item-manager.c	2007-05-24 18:40:41 UTC (rev 25755)
@@ -217,6 +217,7 @@
         xfce_rc_set_group (rc, "Xfce Panel");
 
         if ((value = xfce_rc_read_entry (rc, "X-XFCE-Exec", NULL)) 
+            && g_path_is_absolute (value)
             && g_file_test (value, G_FILE_TEST_EXISTS))
 
         {
@@ -225,24 +226,27 @@
         }
         else if ((value = xfce_rc_read_entry (rc, "X-XFCE-Module", NULL)))
         {
-            if (g_file_test (value, G_FILE_TEST_EXISTS))
+            if ((dir = xfce_rc_read_entry (rc, "X-XFCE-Module-Path", NULL)))
             {
-                class = create_item_class (value, FALSE);
-                DBG ("Internal plugin: %s", value);
-            }
-            else if ((dir = xfce_rc_read_entry (rc, "X-XFCE-Module-Path", 
-                                                NULL)))
-            {
                 path = g_module_build_path (dir, value);
 
-                if (g_file_test (path, G_FILE_TEST_EXISTS))
+                if (g_path_is_absolute (path)
+                    && g_file_test (path, G_FILE_TEST_EXISTS))
                 {
                     class = create_item_class (path, FALSE);
+                    
                     DBG ("Internal plugin: %s", path);
                 }
 
                 g_free (path);
             }
+            else if (g_path_is_absolute (value)
+                     && g_file_test (value, G_FILE_TEST_EXISTS))
+            {
+                class = create_item_class (value, FALSE);
+                
+                DBG ("Internal plugin: %s", value);
+            }
         }
 
         if (class)



More information about the Xfce4-commits mailing list