Index: ChangeLog
===================================================================
RCS file: /cvs/menus/desktop-file-utils/ChangeLog,v
retrieving revision 1.113
diff -u -p -r1.113 ChangeLog
--- ChangeLog	31 Aug 2005 20:14:28 -0000	1.113
+++ ChangeLog	15 Apr 2006 10:31:34 -0000
@@ -1,3 +1,11 @@
+2006-04-15  Vincent Untz  <vuntz@gnome.org>
+
+	Use GKeyFile instead and kill egg-* usage.
+
+	* src/Makefile.am: remove egg-*
+	* src/update-desktop-database.c: (process_desktop_file): use GKeyFile
+	(get_default_search_path): use g_get_system_data_dirs()
+
 2005-08-31  Ray Strode  <rstrode@redhat.com>
 	
 	* src/eggdesktopentries.[ch]:
Index: src/Makefile.am
===================================================================
RCS file: /cvs/menus/desktop-file-utils/src/Makefile.am,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile.am
--- src/Makefile.am	11 Nov 2004 15:08:38 -0000	1.21
+++ src/Makefile.am	15 Apr 2006 10:31:34 -0000
@@ -24,12 +24,7 @@ desktop_file_install_SOURCES=			\
 	install.c
 
 update_desktop_database_SOURCES =		\
-	update-desktop-database.c		\
-	eggdesktopentries.c			\
-	eggdesktopentries.h			\
-	eggintl.h				\
-	eggdirfuncs.c				\
-	eggdirfuncs.h
+	update-desktop-database.c
 
 desktop_file_validate_LDADD = $(DESKTOP_FILE_UTILS_LIBS)
 desktop_file_install_LDADD = $(DESKTOP_FILE_UTILS_LIBS)
Index: src/update-desktop-database.c
===================================================================
RCS file: /cvs/menus/desktop-file-utils/src/update-desktop-database.c,v
retrieving revision 1.7
diff -u -p -r1.7 update-desktop-database.c
--- src/update-desktop-database.c	10 Jan 2005 00:43:48 -0000	1.7
+++ src/update-desktop-database.c	15 Apr 2006 10:31:34 -0000
@@ -31,10 +31,7 @@
 
 #include <popt.h>
 #include <glib.h>
-
-#include "eggdesktopentries.h"
-#include "eggdirfuncs.h"
-#include "eggintl.h"
+#include <glib/gi18n.h>
 
 #define NAME "update-desktop-database"
 #define CACHE_FILENAME "mimeinfo.cache"
@@ -175,16 +172,15 @@ process_desktop_file (const char  *deskt
                       GError     **error)
 {
   GError *load_error; 
-  EggDesktopEntries *entries;
+  GKeyFile *keyfile;
   char **mime_types; 
   int i;
 
+  keyfile = g_key_file_new ();
+
   load_error = NULL;
-  entries = 
-    egg_desktop_entries_new_from_file (desktop_file, NULL,
-                                       EGG_DESKTOP_ENTRIES_DISCARD_COMMENTS |
-                                       EGG_DESKTOP_ENTRIES_DISCARD_TRANSLATIONS,
-                                       &load_error);
+  g_key_file_load_from_file (keyfile, desktop_file,
+                             G_KEY_FILE_NONE, &load_error);
 
   if (load_error != NULL) 
     {
@@ -192,12 +188,11 @@ process_desktop_file (const char  *deskt
       return;
     }
 
-  mime_types = egg_desktop_entries_get_string_list (entries, 
-                                  egg_desktop_entries_get_start_group (entries),
-                                                    "MimeType", NULL, 
-                                                    &load_error);
+  mime_types = g_key_file_get_string_list (keyfile,
+                                           g_key_file_get_start_group (keyfile),
+                                           "MimeType", NULL, &load_error);
 
-  egg_desktop_entries_free (entries);
+  g_key_file_free (keyfile);
 
   if (load_error != NULL) 
     {
@@ -281,8 +276,8 @@ process_desktop_files (const char  *desk
       if (process_error != NULL)
         {
           if (!g_error_matches (process_error, 
-                                EGG_DESKTOP_ENTRIES_ERROR,
-                                EGG_DESKTOP_ENTRIES_ERROR_KEY_NOT_FOUND))
+                                G_KEY_FILE_ERROR,
+                                G_KEY_FILE_ERROR_KEY_NOT_FOUND))
             {
               udd_print ("Could not parse file '%s': %s\n", full_path,
                          process_error->message);
@@ -434,13 +429,13 @@ static const char **
 get_default_search_path (void)
 {
   static char **args = NULL;
-  char **data_dirs;
+  const char * const *data_dirs;
   int i;
 
   if (args != NULL)
     return (const char **) args;
 
-  data_dirs = egg_get_secondary_data_dirs ();
+  data_dirs = g_get_system_data_dirs ();
 
   for (i = 0; data_dirs[i] != NULL; i++);
 
@@ -451,8 +446,6 @@ get_default_search_path (void)
 
   args[i] = NULL;
 
-  g_strfreev (data_dirs);
-
   return (const char **) args;
 }
 
