[Goodies-commits] r2809 - in xfce4-places-plugin/trunk: . panel-plugin

Diego Ongaro ongardie at xfce.org
Mon Jun 4 06:15:44 CEST 2007


Author: ongardie
Date: 2007-06-04 04:15:43 +0000 (Mon, 04 Jun 2007)
New Revision: 2809

Modified:
   xfce4-places-plugin/trunk/ChangeLog
   xfce4-places-plugin/trunk/configure.ac
   xfce4-places-plugin/trunk/panel-plugin/model_system.c
Log:
2007-06-03	Diego Ongaro <ongardie at gmail.com>

* Use exo_str_is_equal (adds direct exo dependency)



Modified: xfce4-places-plugin/trunk/ChangeLog
===================================================================
--- xfce4-places-plugin/trunk/ChangeLog	2007-06-03 21:11:29 UTC (rev 2808)
+++ xfce4-places-plugin/trunk/ChangeLog	2007-06-04 04:15:43 UTC (rev 2809)
@@ -1,5 +1,6 @@
 2007-06-03	Diego Ongaro <ongardie at gmail.com>
 
+	* Use exo_str_is_equal (adds direct exo dependency)
 	* Added optional search command
 	* Use thunar-vfs to get and update trash icon (empty/full)
 

Modified: xfce4-places-plugin/trunk/configure.ac
===================================================================
--- xfce4-places-plugin/trunk/configure.ac	2007-06-03 21:11:29 UTC (rev 2808)
+++ xfce4-places-plugin/trunk/configure.ac	2007-06-04 04:15:43 UTC (rev 2809)
@@ -28,6 +28,7 @@
 XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.99.1])
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.99.1])
 XDT_CHECK_PACKAGE([THUNAR_VFS], [thunar-vfs-1], [0.4.0])
+XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.10])
 
 XDT_FEATURE_DEBUG()
 

Modified: xfce4-places-plugin/trunk/panel-plugin/model_system.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/model_system.c	2007-06-03 21:11:29 UTC (rev 2808)
+++ xfce4-places-plugin/trunk/panel-plugin/model_system.c	2007-06-04 04:15:43 UTC (rev 2809)
@@ -24,8 +24,9 @@
 #include "model_system.h"
 #include "model.h"
 #include <libxfce4util/libxfce4util.h>
+#define EXO_API_SUBJECT_TO_CHANGE
+#include <exo/exo.h>
 #include <thunar-vfs/thunar-vfs.h>
-#include <string.h> // for strcmp()
 
 #define bookmarks_system_check_existence data
 
@@ -116,7 +117,7 @@
     // see if trash gets a different icon (e.g., was empty, now full)
     bi = g_ptr_array_index(b->bookmarks, 1);
     ThunarVfsInfo *trash_info = thunar_vfs_info_new_for_path(b->trash_path, NULL);
-    if(trash_info->custom_icon != NULL && strcmp(trash_info->custom_icon, bi->icon) != 0){
+    if(trash_info->custom_icon != NULL && !exo_str_is_equal(trash_info->custom_icon, bi->icon)){
         g_free(bi->icon);
         bi->icon = g_strdup(trash_info->custom_icon);
         ret = TRUE;
@@ -164,7 +165,7 @@
     gchar   *default_label;
     
     default_label    = g_filename_display_basename(other->uri);
-    label_is_default = (strcmp(default_label, other->label) == 0);
+    label_is_default = exo_str_is_equal(default_label, other->label);
     g_free(default_label);
 
     BookmarkInfo *bi;
@@ -172,11 +173,11 @@
     for(k=0; k < b->bookmarks->len; k++){
         bi = g_ptr_array_index(b->bookmarks, k);
 
-        if(G_UNLIKELY(strcmp(other->uri, bi->uri) == 0)){
+        if(G_UNLIKELY(exo_str_is_equal(other->uri, bi->uri))){
             g_free(other->icon);
             other->icon = g_strdup(bi->icon);
 
-            if(label_is_default && strcmp(other->label, bi->label) != 0){
+            if(label_is_default && !exo_str_is_equal(other->label, bi->label)){
                 g_free(other->label);
                 other->label = g_strdup(bi->label);
             }




More information about the Goodies-commits mailing list