Hi Guys,

I patched up a diff for ya that creates the function efreet_menu_desktop_remove to go along with the _desktop_insert. I did not direct commit this because I'm not totally familiar with efreet internals yet.

Please have a look, comments welcome :)

dh
Index: efreet_menu.c
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_menu.c,v
retrieving revision 1.12
diff -u -r1.12 efreet_menu.c
--- efreet_menu.c	4 Apr 2007 12:00:40 -0000	1.12
+++ efreet_menu.c	5 Apr 2007 09:44:58 -0000
@@ -836,6 +836,28 @@
 
 /**
  * @param menu: The menu to work with
+ * @param desktop: The desktop to remove
+ * @return Returns 1 on success, 0 on failure
+ * @brief Remove a desktop element in a menu structure. Only accepts desktop files
+ * in default directories.
+ */
+int 
+efreet_menu_desktop_remove(Efreet_Menu *menu, Efreet_Desktop *desktop) 
+{
+    int found = 0;
+   
+    if (!desktop || !menu) return 0;
+    if (ecore_list_find(menu->entries, 
+			ECORE_COMPARE_CB(efreet_menu_cb_entry_compare_desktop), desktop))
+    {
+        found = 1;
+        ecore_list_remove(menu->entries);
+    }
+   return found;
+}
+
+/**
+ * @param menu: The menu to work with
  * @param indent: The indent level to print the menu at
  * @return Returns no value
  * @brief Dumps the contents of the menu to the command line
Index: efreet_menu.h
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_menu.h,v
retrieving revision 1.3
diff -u -r1.3 efreet_menu.h
--- efreet_menu.h	7 Feb 2007 02:14:46 -0000	1.3
+++ efreet_menu.h	5 Apr 2007 09:43:47 -0000
@@ -57,6 +57,7 @@
 void             efreet_menu_free(Efreet_Menu *menu);
 
 int              efreet_menu_desktop_insert(Efreet_Menu *menu, Efreet_Desktop *desktop, int pos);
+int              efreet_menu_desktop_remove(Efreet_Menu *menu, Efreet_Desktop *desktop);
 
 void             efreet_menu_dump(Efreet_Menu *menu, const char *indent);
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to