[PATCH] Make eel (HEAD) work with new gnome-menus



gnome-menus API changed. This patch makes eel compile again.

-- 
Christian Neumair <chris gnome-de org>
? INSTALL
? depcomp
? eel-2.0-uninstalled.pc
? install-sh
? missing
? mkinstalldirs
? stamp-h1
Index: configure.in
===================================================================
RCS file: /cvs/gnome/eel/configure.in,v
retrieving revision 1.191
diff -u -r1.191 configure.in
--- configure.in	24 Mar 2005 12:49:03 -0000	1.191
+++ configure.in	26 Mar 2005 10:42:39 -0000
@@ -15,7 +15,7 @@
 GAIL_REQUIRED=0.16
 LIBGLADE_REQUIRED=2.0.0
 LIBGNOME_DESKTOP_REQUIRED=2.1.4
-LIBGNOME_MENU_REQUIRED=2.9.1
+LIBGNOME_MENU_REQUIRED=2.11.1
 
 AC_SUBST(ART_REQUIRED)
 AC_SUBST(GCONF_REQUIRED)
Index: eel/eel-open-with-dialog.c
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-open-with-dialog.c,v
retrieving revision 1.7
diff -u -r1.7 eel-open-with-dialog.c
--- eel/eel-open-with-dialog.c	26 Jan 2005 09:36:58 -0000	1.7
+++ eel/eel-open-with-dialog.c	26 Mar 2005 10:42:39 -0000
@@ -523,21 +523,30 @@
 get_all_applications_from_dir (MenuTreeDirectory *directory,
 			       GSList            *list)
 {
-	GSList *subdirs;
+	GSList *contents;
 	GSList *l;
 
-	list = g_slist_concat (list,
-	menu_tree_directory_get_entries (directory));
+	contents = menu_tree_directory_get_contents (directory);
 
-	subdirs = menu_tree_directory_get_subdirs (directory);
-	for (l = subdirs; l; l = l->next) {
-		MenuTreeDirectory *subdir = l->data;
+	for (l = contents; l; l = l->next) {
+		MenuTreeItem *item = l->data;
 
-		list = get_all_applications_from_dir (subdir, list);
+		switch (menu_tree_item_get_type (item)) {
+			case MENU_TREE_ITEM_DIRECTORY:
+				list = get_all_applications_from_dir (MENU_TREE_DIRECTORY (item), list);
+				menu_tree_item_unref (item);
+				break;
+
+			case MENU_TREE_ITEM_ENTRY:
+				list = g_slist_prepend (list, item);
+				break;
 
-		menu_tree_directory_unref (subdir);
+			default:
+				break;
+		}
 	}
-	g_slist_free (subdirs);
+
+	g_slist_free (contents);
 
 	return list;
 }
@@ -556,7 +565,7 @@
 
 	retval = get_all_applications_from_dir (root, NULL);
 
-	menu_tree_directory_unref (root);
+	menu_tree_item_unref (root);
 	menu_tree_unref (tree);
 
 	retval = g_slist_sort (retval,
@@ -593,7 +602,7 @@
 		GtkTreePath   *path;
 
 		if (prev_name && strcmp (menu_tree_entry_get_name (entry), prev_name) == 0) {
-			menu_tree_entry_unref (entry);
+			menu_tree_item_unref (entry);
 			continue;
 		}
 
@@ -612,7 +621,7 @@
 		}
 
 		prev_name = menu_tree_entry_get_name (entry);
-		menu_tree_entry_unref (entry);
+		menu_tree_item_unref (entry);
 	}
 	g_slist_free (all_applications);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]