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

rpms/bug-buddy/devel bug-buddy-2.10.0-gmenu.patch,1.4,1.5



Author: mclasen

Update of /cvs/dist/rpms/bug-buddy/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv3191

Modified Files:
	bug-buddy-2.10.0-gmenu.patch 
Log Message:
Bah


bug-buddy-2.10.0-gmenu.patch:
 Makefile.am |    2 -
 Makefile.in |    2 -
 bugzilla.c  |  110 +++++++++++++++++++++++++++++++++++++++++-------------------
 3 files changed, 78 insertions(+), 36 deletions(-)

Index: bug-buddy-2.10.0-gmenu.patch
===================================================================
RCS file: /cvs/dist/rpms/bug-buddy/devel/bug-buddy-2.10.0-gmenu.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- bug-buddy-2.10.0-gmenu.patch	10 Jul 2005 03:54:13 -0000	1.4
+++ bug-buddy-2.10.0-gmenu.patch	10 Jul 2005 04:05:11 -0000	1.5
@@ -1,5 +1,5 @@
 --- bug-buddy-2.10.0/src/bugzilla.c.gmenu	2005-02-10 06:01:10.000000000 -0500
-+++ bug-buddy-2.10.0/src/bugzilla.c	2005-07-09 23:48:50.000000000 -0400
++++ bug-buddy-2.10.0/src/bugzilla.c	2005-07-10 00:03:33.000000000 -0400
 @@ -40,7 +40,7 @@
  #include <libgnomevfs/gnome-vfs.h>
  
@@ -9,7 +9,7 @@
  
  #include <bonobo/bonobo-exception.h>
  #include <bonobo-activation/bonobo-activation.h>
-@@ -1123,30 +1123,30 @@
+@@ -1123,32 +1123,74 @@
  }
  
  static int
@@ -24,33 +24,83 @@
 +			       gmenu_tree_entry_get_name (b));
  }
  
++static GSList *get_all_applications_from_dir (GMenuTreeDirectory *directory,
++					      GSList             *list);
++
  static GSList *
 -get_all_applications_from_dir (MenuTreeDirectory *directory,
 -			       GSList            *list)
-+get_all_applications_from_dir (GMenuTreeDirectory *directory,
-+			       GSList             *list)
++get_all_applications_from_alias (GMenuTreeAlias *alias,
++				 GSList         *list)
  {
- 	GSList *subdirs;
- 	GSList *l;
+-	GSList *subdirs;
+-	GSList *l;
++	GMenuTreeItem *aliased_item;
++
++	aliased_item = gmenu_tree_alias_get_item (alias);
++
++	switch (gmenu_tree_item_get_type (aliased_item)) {
++	case GMENU_TREE_ITEM_DIRECTORY:
++		list = get_all_applications_from_dir (GMENU_TREE_DIRECTORY (aliased_item), list);
++		break;
++
++	case GMENU_TREE_ITEM_ENTRY:
++		list = g_slist_append (list, gmenu_tree_item_ref (aliased_item));
++		break;
++
++	default:
++		break;
++	}
++
++	gmenu_tree_item_unref (aliased_item);
  
- 	list = g_slist_concat (list,
+-	list = g_slist_concat (list,
 -			       menu_tree_directory_get_entries (directory));
-+			       gmenu_tree_directory_get_entries (directory));
++	return list;
++}
++
++static GSList *
++get_all_applications_from_dir (GMenuTreeDirectory *directory,
++			       GSList             *list)
++{
++	GSList *items;
++	GSList *l;
  
 -	subdirs = menu_tree_directory_get_subdirs (directory);
-+	subdirs = gmenu_tree_directory_get_subdirs (directory);
- 	for (l = subdirs; l; l = l->next) {
+-	for (l = subdirs; l; l = l->next) {
 -		MenuTreeDirectory *subdir = l->data;
-+		GMenuTreeDirectory *subdir = l->data;
- 
- 		list = get_all_applications_from_dir (subdir, list);
++	items = gmenu_tree_directory_get_contents (directory);
++	for (l = items; l; l = l->next) {
++		GMenuTreeItem *item = l->data;
++
++		switch (gmenu_tree_item_get_type (item)) {
++		case GMENU_TREE_ITEM_DIRECTORY:
++			list = get_all_applications_from_dir (GMENU_TREE_DIRECTORY (item), list);
++			break;
++
++		case GMENU_TREE_ITEM_ENTRY:
++			list = g_slist_append (list, gmenu_tree_item_ref (item));
++			break;
++
++		case GMENU_TREE_ITEM_ALIAS:
++			list = get_all_applications_from_alias (GMENU_TREE_ALIAS (item), list);
++			break;
+ 
+-		list = get_all_applications_from_dir (subdir, list);
++		default:
++			break;
++		}
  
 -		menu_tree_directory_unref (subdir);
-+		gmenu_tree_directory_unref (subdir);
++		gmenu_tree_item_unref (item);
  	}
- 	g_slist_free (subdirs);
+-	g_slist_free (subdirs);
++
++	g_slist_free (items);
  
-@@ -1156,18 +1156,18 @@
+ 	return list;
+ }
+@@ -1156,18 +1198,18 @@
  static GSList *
  get_all_applications (void)
  {
@@ -71,12 +121,21 @@
  
 -	menu_tree_directory_unref (root);
 -	menu_tree_unref (tree);
-+	gmenu_tree_directory_unref (root);
++	gmenu_tree_item_unref (root);
 +	gmenu_tree_unref (tree);
  
  	retval = g_slist_sort (retval, (GCompareFunc) compare_applications);
  
-@@ -1193,28 +1193,28 @@
+@@ -1181,7 +1223,7 @@
+ 	GnomeIconTheme *git;
+ 	GSList         *all_applications;
+ 	GSList         *l;
+-	const char     *prev_name;
++	const char     *prev_name = NULL;
+ 	GError	       *error = NULL;
+ 
+ 	druid_data.program_to_application = g_hash_table_new (g_str_hash, g_str_equal);
+@@ -1193,28 +1235,28 @@
  	for (l = all_applications; l; l = l->next) {
  		GnomeDesktopItem *ditem;
  		char *icon;
@@ -86,7 +145,7 @@
 -		if (prev_name && strcmp (menu_tree_entry_get_name (entry), prev_name) == 0) {
 -			menu_tree_entry_unref (entry);
 +		if (prev_name && strcmp (gmenu_tree_entry_get_name (entry), prev_name) == 0) {
-+			gmenu_tree_entry_unref (entry);
++			gmenu_tree_item_unref (entry);
  			continue;
  		}
 -		ditem = gnome_desktop_item_new_from_uri (menu_tree_entry_get_desktop_file_path (entry), 
@@ -101,18 +160,18 @@
  				error = NULL;
  			}
 -			menu_tree_entry_unref (entry);
-+			gmenu_tree_entry_unref (entry);
++			gmenu_tree_item_unref (entry);
  			continue;
  		}
      
  		if ((gnome_desktop_item_get_entry_type (ditem) != GNOME_DESKTOP_ITEM_TYPE_APPLICATION) || !gnome_desktop_item_get_string (ditem, BUGZILLA_BUGZILLA)) {
  			gnome_desktop_item_unref (ditem);	
 -			menu_tree_entry_unref (entry);
-+			gmenu_tree_entry_unref (entry);
++			gmenu_tree_item_unref (entry);
  			continue;
  		}
  
-@@ -1231,9 +1231,9 @@
+@@ -1231,9 +1273,9 @@
  			gnome_desktop_item_get_string (ditem, GNOME_DESKTOP_ITEM_EXEC),
  			gnome_desktop_item_get_string (ditem, BUGZILLA_OTHER_BINARIES));
  		g_free (icon);
@@ -120,7 +179,7 @@
 +		prev_name = gmenu_tree_entry_get_name (entry);
  		gnome_desktop_item_unref (ditem);	
 -		menu_tree_entry_unref (entry);
-+		gmenu_tree_entry_unref (entry);
++		gmenu_tree_item_unref (entry);
  	}
  	g_slist_free (all_applications);
  


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