File gnome-panel-bnc356242-recently-used-apps-hidden.patch of Package gnome-panel

Index: gnome-panel/panel-recent.c
===================================================================
--- gnome-panel/panel-recent.c.orig	2010-01-14 11:31:23.000000000 +1100
+++ gnome-panel/panel-recent.c	2010-01-14 11:31:25.000000000 +1100
@@ -196,6 +196,23 @@ recent_documents_clear_cb (GtkMenuItem
 	gtk_widget_show (clear_recent_dialog);
 }
 
+static gboolean
+panel_recent_filter_recent_apps (const GtkRecentFilterInfo *filter_info,
+				 gpointer user_data)
+{
+	int i;
+
+	if (filter_info->groups == NULL)
+		return TRUE;
+
+	for (i = 0; filter_info->groups[i]; i++) {
+		if (strcmp (filter_info->groups[i], "recently-used-apps") == 0)
+			return FALSE;
+	}
+
+	return TRUE;
+}
+
 void
 panel_recent_append_documents_menu (GtkWidget        *top_menu,
 				    GtkRecentManager *manager)
@@ -203,6 +220,7 @@ panel_recent_append_documents_menu (GtkW
 	GtkWidget      *recent_menu;
 	GtkWidget      *menu_item;
 	int             size;
+	GtkRecentFilter *filter;
 
 	menu_item = gtk_image_menu_item_new ();
 	setup_menu_item_with_icon (menu_item,
@@ -231,6 +249,11 @@ panel_recent_append_documents_menu (GtkW
 			  G_CALLBACK (recent_documents_activate_cb),
 			  NULL);
 
+	filter = gtk_recent_filter_new ();
+	gtk_recent_filter_add_custom (filter, GTK_RECENT_FILTER_GROUP, panel_recent_filter_recent_apps, NULL, NULL);
+	gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (recent_menu), filter);
+	/* Hrm, causes a crash? g_object_unref (filter); */
+
 	//FIXME this is not possible with GtkRecent...: egg_recent_view_gtk_set_icon_size (view, panel_menu_icon_get_size ());
 
 	g_signal_connect_object (manager, "changed",