diff -uprN gnome-panel/trunk/gnome-panel/panel-run-dialog.c gnome-panel/local/gnome-panel/panel-run-dialog.c
--- gnome-panel/trunck/gnome-panel/panel-run-dialog.c	2006-08-07 17:07:46.000000000 -0400
+++ gnome-panel/local/gnome-panel/panel-run-dialog.c	2006-10-23 18:11:16.000000000 -0400
@@ -59,6 +59,14 @@

 #include "panel-xutils.h"
 #include "panel-icon-names.h"
+#include <gtk/gtkrecentmanager.h>

#define ICON_SIZE 48.0
 
 typedef struct {
@@ -112,6 +120,8 @@ enum {
 
 static void panel_run_dialog_disconnect_pixmap (PanelRunDialog *dialog);
 
+static void panel_run_dialog_update_recent_apps (PanelRunDialog *dialog, const gchar *cmd);
+
 static void
 panel_run_dialog_destroy (PanelRunDialog *dialog)
 {
@@ -420,6 +430,8 @@ panel_run_dialog_execute (PanelRunDialog
 		gnome_entry_prepend_history (GNOME_ENTRY (dialog->gnome_entry),
 					     TRUE, /* save item in history */
 					     command);
+
+		panel_run_dialog_update_recent_apps (dialog, command);
 		
 		/* only close the dialog if we successfully showed or launched something */
 		gtk_widget_destroy (dialog->run_dialog);
@@ -672,6 +684,160 @@ panel_run_dialog_find_command_idle (Pane
 	return FALSE;
 }
 
+static void
+panel_run_dialog_update_recent_apps (PanelRunDialog *dialog, const gchar *cmd)
+{
+	GtkTreeIter   iter;
+	GtkTreeModel *model = NULL;
+	GtkTreePath  *path  = NULL;
+
+	gchar *found_ditem_path = NULL;
+	gchar *found_ditem_uri  = NULL;
+	gchar *found_cmd        = NULL;
+
+	gchar *cmd_i;
+	gchar *ditem_path_i;
+
+	gboolean fuzzy;
+
+	GtkRecentManager *recent_manager;
+	GtkRecentData     recent_data;
+
+	GError *error = NULL;
+
+	
+	if (! cmd)
+		return;
+
+	model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->program_list));
+	path  = gtk_tree_path_new_first ();
+	
+	if (! path || ! gtk_tree_model_get_iter (model, & iter, path)) {
+		if (path)
+			gtk_tree_path_free (path);
+
+		return;
+	}
+
+	do {
+		cmd_i        = NULL;
+		ditem_path_i = NULL;
+
+		gtk_tree_model_get (
+			model, & iter,
+			COLUMN_EXEC, & cmd_i,
+			COLUMN_PATH, & ditem_path_i,
+			-1
+		);
+
+        	if (cmd_i && ditem_path_i) {
+			fuzzy = FALSE;
+
+			if (fuzzy_command_match (sure_string (cmd), cmd_i, & fuzzy)) {
+				g_free (found_ditem_path);
+				
+				found_ditem_path = g_strdup (ditem_path_i);
+				found_cmd        = g_strdup (cmd_i);
+				
+				if (! fuzzy) {
+					/*
+					 * if not fuzzy then we have a precise
+					 * match and we can quit, else keep
+					 * searching for a better match
+					 */
+					g_free (cmd_i);
+					g_free (ditem_path_i);
+
+					break;
+				}
+			}
+		}
+
+		g_free (cmd_i);
+		g_free (ditem_path_i);
+
+	} while (gtk_tree_model_iter_next (model, & iter));
+
+	gtk_tree_path_free (path);
+
+	recent_manager = gtk_recent_manager_get_default ();
+
+	if (! recent_manager)
+		goto exit;
+
+	if (found_ditem_path) {
+		found_ditem_uri = g_filename_to_uri (found_ditem_path, NULL, & error);
+
+		if (! error) {
+			recent_data.display_name = NULL;
+			recent_data.description  = NULL;
+			recent_data.mime_type    = g_strdup ("application/x-desktop");
+			recent_data.is_private   = TRUE;
+
+			recent_data.app_name = g_strdup (g_get_application_name ());
+			if (! recent_data.app_name)
+				recent_data.app_name = g_strdup ("gnome-panel run dialog");
+
+			recent_data.app_exec = g_strdup (g_strdup (found_cmd));
+			if (! recent_data.app_exec)
+				recent_data.app_exec = g_strdup ("gnome-open %u");
+
+			recent_data.groups     = g_new0 (gchar *, 2);
+			recent_data.groups [0] = g_strdup ("recently-used-apps");
+			recent_data.groups [1] = NULL;
+
+			gtk_recent_manager_add_full (recent_manager, found_ditem_uri, & recent_data);
+
+			g_free (recent_data.mime_type);
+			g_free (recent_data.app_name);
+			g_free (recent_data.app_exec);
+			g_free (recent_data.groups [0]);
+			g_free (recent_data.groups);
+
+		}
+		else {
+			g_warning ("unable to create uri from [%s] to insert into recent file list.\n",
+				found_ditem_path);
+
+			g_error_free (error);
+		}
+	}
+
+	g_object_unref (recent_model);
+
+exit:
+
+	g_free (found_ditem_path);
+	g_free (found_ditem_uri);
+	g_free (found_cmd);
+}
+
 static gboolean
 panel_run_dialog_add_icon_idle (PanelRunDialog *dialog)
 {
