Re: [E-devel] [PATCH] Efreet: use eina_list instead of ecore_dlist

2009-03-26 Thread Albin Tonnerre
Hi,
Please find attached an updated patch which sets to NULL the pointer to a list
being merged into another list.

Regards,
-- 
Albin Tonnerre
diff --git a/src/lib/efreet_desktop.c b/src/lib/efreet_desktop.c
index 9357add..2dfa357 100644
--- a/src/lib/efreet_desktop.c
+++ b/src/lib/efreet_desktop.c
@@ -1089,7 +1089,7 @@ efreet_desktop_environment_check(Efreet_Ini *ini)
 
 /**
  * @param desktop: the desktop entry
- * @param files: an ecore list of file names to execute, as either absolute paths,
+ * @param files: an eina list of file names to execute, as either absolute paths,
  * relative paths, or uris
  * @param func: a callback to call for each prepared command line
  * @param data: user data passed to the callback
@@ -1105,8 +1105,8 @@ efreet_desktop_command_get(Efreet_Desktop *desktop, Eina_List *files,
 
 /**
  * @param desktop: the desktop entry
- * @param files an ecore list of local files, as absolute paths, local paths, or file:// uris (or NULL to get exec string with no files appended)
- * @return Returns an ecore list of exec strings
+ * @param files an eina list of local files, as absolute paths, local paths, or file:// uris (or NULL to get exec string with no files appended)
+ * @return Returns an eina list of exec strings
  * @brief Get the command to use to execute a desktop entry
  *
  * The returned list and each of its elements must be freed.
@@ -1153,7 +1153,7 @@ efreet_desktop_command_local_get(Efreet_Desktop *desktop, Eina_List *files)
 
 /**
  * @param desktop: the desktop entry
- * @param files: an ecore list of file names to execute, as either absolute paths,
+ * @param files: an eina list of file names to execute, as either absolute paths,
  * relative paths, or uris
  * @param cb_command: a callback to call for each prepared command line
  * @param cb_progress: a callback to get progress for the downloads
diff --git a/src/lib/efreet_menu.c b/src/lib/efreet_menu.c
index 1a77a38..e11336a 100644
--- a/src/lib/efreet_menu.c
+++ b/src/lib/efreet_menu.c
@@ -41,7 +41,7 @@ struct Efreet_Menu_Internal
 } name;   /** The names for this menu */
 
 Efreet_Desktop *directory; /** The directory */
-Ecore_DList *directories;  /** All the directories set in the menu file */
+Eina_List *directories;  /** All the directories set in the menu file */
 
 Efreet_Menu_Move *current_move; /** The current move */
 
@@ -50,7 +50,7 @@ struct Efreet_Menu_Internal
 Eina_List *app_pool;   /** application pool */
 Eina_List *applications;   /** applications in this menu */
 
-Ecore_DList *directory_dirs;/** .directory file directories */
+Eina_List *directory_dirs;/** .directory file directories */
 Eina_Hash *directory_cache;/** .directory dirs */
 
 Eina_List *moves;  /** List of moves to be handled by the menu */
@@ -1001,10 +1001,10 @@ efreet_menu_internal_free(Efreet_Menu_Internal *internal)
 
 internal-applications = eina_list_free(internal-applications);
 
-IF_FREE_DLIST(internal-directories);
+IF_FREE_LIST(internal-directories, free);
 IF_FREE_LIST(internal-app_dirs, efreet_menu_app_dir_free);
 IF_FREE_LIST(internal-app_pool, efreet_menu_desktop_free);
-IF_FREE_DLIST(internal-directory_dirs);
+IF_FREE_LIST(internal-directory_dirs, free);
 IF_FREE_HASH(internal-directory_cache);
 
 IF_FREE_LIST(internal-moves, efreet_menu_move_free);
@@ -1053,10 +1053,10 @@ static int
 efreet_menu_handle_menu(Efreet_Menu_Internal *internal, Efreet_Xml *xml)
 {
 Efreet_Xml *child;
+Eina_List *l;
 int (*cb)(Efreet_Menu_Internal *parent, Efreet_Xml *xml);
 
-ecore_list_last_goto(xml-children);
-while ((child = ecore_dlist_previous(xml-children)))
+EINA_LIST_REVERSE_FOREACH(xml-children, l, child)
 {
 cb = eina_hash_find(efreet_menu_handle_cbs, child-tag);
 if (cb)
@@ -1206,13 +1206,13 @@ efreet_menu_handle_directory_dir(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
 if (!path) return 0;
 
 /* we've already got this guy in our list we can skip it */
-if (ecore_list_find(parent-directory_dirs, ECORE_COMPARE_CB(strcmp), path))
+if (eina_list_search_unsorted(parent-directory_dirs, EINA_COMPARE_CB(strcmp), path))
 {
 FREE(path);
 return 1;
 }
 
-ecore_dlist_prepend(parent-directory_dirs, path);
+parent-directory_dirs = eina_list_prepend(parent-directory_dirs, path);
 
 return 1;
 }
@@ -1237,10 +1237,10 @@ efreet_menu_handle_default_directory_dirs(Efreet_Menu_Internal *parent, Efreet_X
 desktop-directories);
 EINA_LIST_FOREACH(dirs, l, dir)
 {
-if (ecore_list_find(parent-directory_dirs, ECORE_COMPARE_CB(strcmp), dir))
+if (eina_list_search_unsorted(parent-directory_dirs, EINA_COMPARE_CB(strcmp), dir))
 continue;
 
-ecore_dlist_prepend(parent-directory_dirs, strdup(dir));
+

Re: [E-devel] [PATCH] Efreet: use eina_list instead of ecore_dlist

2009-03-26 Thread Cedric BAIL
On Thu, Mar 26, 2009 at 5:16 PM, Albin Tonnerre
albin.tonne...@gmail.com wrote:
 Please find attached an updated patch which sets to NULL the pointer to a list
 being merged into another list.

In svn.

-- 
Cedric BAIL

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [PATCH] Simple patch for default E theme

2009-03-26 Thread Mike Rutter

Here is a patch to create a version of the alternate shelf
theme that works when the shelf is vertical.  All it does
is take the alternate version and removes the shine part.
The shine part bands horribly when the shelf is vertical.
Removing it creates a nice gradient with the over part
creating separation for the darker portion of the shelf.

Mike

Index: e/data/themes/default.edc
===
--- e/data/themes/default.edc   (revision 39699)
+++ e/data/themes/default.edc   (working copy)
@@ -6779,6 +6779,159 @@
   }
}
 
+   /* This is a vertical version of the alternate shelf. It provides a 
+* stylistic alternative, that works vertically, to  make the shelf
+* more dynamic to your tastes and wallpaper. It is  selected in the 
+* Shelf Configuration. More alternative shelfs can be provided by 
+* using more group names. eg, e/shelf/black/base */
+   group { name: e/shelf/alternate_vert/base;
+  images {
+image: shelf_alt_bg.png COMP;
+image: shelf_alt_over.png COMP;
+  }
+  parts {
+part { name: base;
+   mouse_events: 0;
+   description { state: default 0.0;
+   color_class: shelf_base;
+  image.normal: shelf_alt_bg.png;
+  fill.smooth: 0;
+   }
+}
+part { name: e.swallow.content;
+   type: SWALLOW;
+   description { state: default 0.0;
+  rel1 {
+ relative: 0.0 0.0;
+ offset: 3 3;
+  }
+  rel2 {
+ relative: 1.0 1.0;
+ offset: -4 -4;
+  }
+   }
+}
+part { name: over;
+   mouse_events: 0;
+   description { state: default 0.0;
+  image.normal: shelf_alt_over.png;
+  image.border: 5 5 5 5;
+  image.middle: 0;
+  fill.smooth: 0;
+   }
+}
+  }
+  /* Because programs can not respond to 2 different types of signals,
+   * the programs are split into individual programs that point towards
+   * the base program for its orientation. */
+  programs {
+/* Left orientation */
+//  program { name: left;
+// signal: e,state,orientation,left;
+// source: e;
+// action: STATE_SET left 0.0;
+// target: base;
+// target: over;
+// target: shine;
+//  }
+//  program { name: left_top;
+// signal: e,state,orientation,left_top;
+// source: e;
+// after: left;
+//  }
+//  program { name: left_bottom;
+// signal: e,state,orientation,left_bottom;
+// source: e;
+// after: left;
+//  }
+//  /* Right orientation */
+//  program { name: right;
+// signal: e,state,orientation,right;
+// source: e;
+// action: STATE_SET right 0.0;
+// target: base;
+// target: over;
+// target: shine;
+//  }
+//  program { name: right_top;
+// signal: e,state,orientation,right_top;
+// source: e;
+// after: right;
+//  }
+//  program { name: right_bottom;
+// signal: e,state,orientation,right_bottom;
+// source: e;
+// after: right;
+//  }
+  }
+   }
+   group { name: e/shelf/alternate_vert/inset;
+  images {
+image: inset_raised.png COMP;
+  }
+  parts {
+part { name: base;
+   type: RECT;
+   description { state: default 0.0;
+  rel1 {
+ to: inset;
+ offset: 4 4;
+  }
+  rel2 {
+ to: inset;
+ offset: -5 -5;
+  }
+  color: 0 0 0 0;
+   }
+}
+part { name: clip;
+   type: RECT;
+   description { state: default 0.0;
+  rel1.to: base;
+  rel2.to: base;
+  color: 255 255 255 255;
+   }
+}
+part { name: e.swallow.content;
+   type: SWALLOW;
+   clip_to: clip;
+   description { state: default 0.0;
+  rel1 {
+ to: base;
+ offset: 0 0;
+  }
+  rel2 {
+ to: base;
+ offset: -1 -1;
+  }
+   }
+}
+part { name: inset;
+   mouse_events: 0;
+   description { state: default 0.0;
+  rel1.offset: -1 -1;
+  rel2.offset: 0 0;
+  image.normal: inset_raised.png;
+  image.middle: 0;
+  image.border: 7 7 7 7;
+  fill.smooth: 0;
+   }
+}
+  }
+   }
+   group { name: e/shelf/alternate_vert/plain;
+  parts {
+part { name: e.swallow.content;
+   type: SWALLOW;
+   description { state: default 0.0;
+  rel1.offset: 1 1;
+