b0d86cf007d3e3bb207d2e57df41ae8c5cdd46ce
diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
index 1a8a16a..6f0ec0b 100644
--- a/gnome-panel/panel-run-dialog.c
+++ b/gnome-panel/panel-run-dialog.c
@@ -41,7 +41,6 @@
 #include <gio/gio.h>
 #include <gdk/gdkkeysyms.h>
 #include <glade/glade-xml.h>
-#include <libgnomeui/gnome-entry.h>
 #include <gconf/gconf-client.h>
 #include <gmenu-tree.h>
 
@@ -72,8 +71,7 @@ typedef struct {
 	GtkWidget        *main_box;
 	GtkWidget        *program_list_box;
 
-	GtkWidget        *gnome_entry;
-	GtkWidget        *gtk_entry;
+	GtkWidget        *combobox;
 	GtkWidget        *pixmap;
 	GtkWidget        *run_button;
 	GtkWidget        *file_button;
@@ -337,6 +335,74 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog,
 	return result;
 }
 
+#define HISTORY_KEY "/apps/gnome-settings/gnome-panel/history-gnome-run"
+#define MAX_HISTORY 10
+
+static GtkTreeModel *
+get_recent_programs_list ()
+{
+	GtkListStore *list;
+
+	GSList *gconf_items;
+	GSList *items;
+	int i = 0;
+
+	list = gtk_list_store_new (1, G_TYPE_STRING);
+
+	gconf_items = gconf_client_get_list (panel_gconf_get_client (),
+					     HISTORY_KEY,
+					     GCONF_VALUE_STRING, NULL);
+
+	for (items = gconf_items; items && i < MAX_HISTORY; items = items->next)
+	{
+		GtkTreeIter iter;
+		gtk_list_store_prepend (list, &iter);
+		gtk_list_store_set (list, &iter, 0, items->data, -1);
+		i++;
+	}
+
+	g_slist_free (gconf_items);
+
+	return GTK_TREE_MODEL (list);
+}
+
+static void
+save_recent_programs_list (GtkComboBoxEntry *entry, char *lastcommand)
+{
+	GtkTreeModel *model;
+	GSList *gconf_items = NULL;
+	GtkTreeIter iter;
+	char *first;
+
+	model = gtk_combo_box_get_model (GTK_COMBO_BOX (entry));
+
+	g_assert (gtk_tree_model_get_iter_first (model, &iter) != FALSE);
+
+	gtk_tree_model_get (model, &iter, 0, &first, -1);
+
+	gconf_items = g_slist_prepend (gconf_items, lastcommand);
+	gconf_items = g_slist_prepend (gconf_items, first);
+
+	while (gtk_tree_model_iter_next (model, &iter))
+	{
+		char *elem;
+
+		gtk_tree_model_get (model, &iter, 0, &elem, -1);
+
+		if (strcmp (elem, lastcommand) == 0)
+			continue;
+
+		gconf_items = g_slist_prepend (gconf_items, elem);
+	}
+
+	gconf_client_set_list (panel_gconf_get_client (),
+			       HISTORY_KEY,
+			       GCONF_VALUE_STRING, gconf_items,
+			       NULL);
+
+	g_slist_free (gconf_items);
+}
+
 static void
 panel_run_dialog_execute (PanelRunDialog *dialog)
 {
@@ -346,7 +412,8 @@ panel_run_dialog_execute (PanelRunDialog *dialog)
 	char     *disk;
 	char     *scheme;	
 	
-	command = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->gtk_entry)));
+	command = g_strdup (gtk_combo_box_get_active_text
+				(GTK_COMBO_BOX (dialog->combobox)));
 	command = g_strchug (command);
 
 	if (!command || !command [0]) {
@@ -412,9 +479,8 @@ panel_run_dialog_execute (PanelRunDialog *dialog)
 		
 	if (result) {
 		/* only save working commands in history */
-		gnome_entry_prepend_history (GNOME_ENTRY (dialog->gnome_entry),
-					     TRUE, /* save item in history */
-					     command);
+		save_recent_programs_list
+			(GTK_COMBO_BOX_ENTRY (dialog->combobox), command);
 		
 		/* only close the dialog if we successfully showed or launched
 		 * something */
@@ -475,20 +541,21 @@ panel_run_dialog_append_file_utf8 (PanelRunDialog *dialog,
 {
 	const char *text;
 	char       *quoted, *temp;
+	GtkWidget  *entry;
 	
 	/* Don't allow filenames beginning with '-' */
 	if (!file || !file[0] || file[0] == '-')
 		return;
 	
 	quoted = quote_string (file);
-	text = gtk_entry_get_text (GTK_ENTRY (dialog->gtk_entry));
-	
+	entry = gtk_bin_get_child (GTK_BIN (dialog->combobox));
+	text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->combobox));
 	if (text && text [0]) {
 		temp = g_strconcat (text, " ", quoted, NULL);
-		gtk_entry_set_text (GTK_ENTRY (dialog->gtk_entry), temp);
+		gtk_entry_set_text (GTK_ENTRY (entry), temp);
 		g_free (temp);
 	} else
-		gtk_entry_set_text (GTK_ENTRY (dialog->gtk_entry), quoted);
+		gtk_entry_set_text (GTK_ENTRY (entry), quoted);
 	
 	g_free (quoted);
 }
@@ -586,7 +653,8 @@ panel_run_dialog_find_command_idle (PanelRunDialog *dialog)
 	
 	model = GTK_TREE_MODEL (dialog->program_list_store);
 	path = gtk_tree_path_new_first ();
-	text = sure_string (gtk_entry_get_text (GTK_ENTRY (dialog->gtk_entry)));
+	text = sure_string (gtk_combo_box_get_active_text
+				(GTK_COMBO_BOX (dialog->combobox)));
 	found_icon = NULL;
 	found_name = NULL;
 	fuzzy = FALSE;
@@ -964,7 +1032,8 @@ program_list_selection_changed (GtkTreeSelection *selection,
 	char         *path, *stripped;
 	gboolean      terminal;
 	GKeyFile     *key_file;
-		
+	GtkWidget    *entry;
+
 	if (!gtk_tree_selection_get_selected (selection, &filter_model,
 					      &filter_iter))
 		return;
@@ -997,21 +1066,20 @@ program_list_selection_changed (GtkTreeSelection *selection,
 	if (dialog->item_name)
 		g_free (dialog->item_name);
 	dialog->item_name = NULL;
-	
+
 	/* Order is important here. We have to set the text first so that the
 	 * drag source is enabled, otherwise the drag icon can't be set by
 	 * panel_run_dialog_set_icon.
 	 */
+	entry = gtk_bin_get_child (GTK_BIN (dialog->combobox));
 	temp = panel_key_file_get_string (key_file, "Exec");
 	if (temp) {
 		stripped = remove_parameters (temp);
-		gtk_entry_set_text (GTK_ENTRY (dialog->gtk_entry),
-				    stripped);
+		gtk_entry_set_text (GTK_ENTRY (entry), stripped);
 		g_free (stripped);
 	} else {
 		temp = panel_key_file_get_string (key_file, "URL");
-		gtk_entry_set_text (GTK_ENTRY (dialog->gtk_entry),
-				    sure_string (temp));
+		gtk_entry_set_text (GTK_ENTRY (entry), sure_string (temp));
 	}
 	g_free (temp);
 
@@ -1096,7 +1164,7 @@ panel_run_dialog_update_content (PanelRunDialog *dialog,
 					      dialog->list_expander);
 
 		gtk_window_set_resizable (GTK_WINDOW (dialog->run_dialog), FALSE);
-                gtk_widget_grab_focus (dialog->gtk_entry);
+                gtk_widget_grab_focus (dialog->combobox);
 		
 	} else if (show_list) {
 		gtk_window_resize (GTK_WINDOW (dialog->run_dialog), 100, 300);
@@ -1105,7 +1173,7 @@ panel_run_dialog_update_content (PanelRunDialog *dialog,
 		
         } else if (!show_list) {
 		gtk_window_set_resizable (GTK_WINDOW (dialog->run_dialog), FALSE);
-                gtk_widget_grab_focus (dialog->gtk_entry);
+                gtk_widget_grab_focus (dialog->combobox);
         }
 }
 
@@ -1174,7 +1242,7 @@ file_button_browse_response (GtkWidget      *chooser,
 
 	gtk_widget_destroy (chooser);
  
- 	gtk_widget_grab_focus (dialog->gtk_entry);
+	gtk_widget_grab_focus (dialog->combobox);
 }
 
 static void
@@ -1415,9 +1483,9 @@ panel_run_dialog_update_completion (PanelRunDialog *dialog,
 }
 
 static gboolean
-entry_event (GtkEditable    *entry,
-	     GdkEventKey    *event,
-	     PanelRunDialog *dialog)
+combobox_event (GtkEditable    *entry,
+		GdkEventKey    *event,
+		PanelRunDialog *dialog)
 {
 	GtkTreeSelection *selection;
 	char             *prefix;
@@ -1498,10 +1566,10 @@ entry_event (GtkEditable    *entry,
 
 			prefix = g_strconcat (temp, nprefix, NULL);
 
-			g_signal_handler_block (dialog->gtk_entry,
+			g_signal_handler_block (dialog->combobox,
 						dialog->changed_id);
 			gtk_editable_delete_text (entry, 0, -1);
-			g_signal_handler_unblock (dialog->gtk_entry,
+			g_signal_handler_unblock (dialog->combobox,
 						  dialog->changed_id);
 
 			gtk_editable_insert_text (entry,
@@ -1527,14 +1595,14 @@ entry_event (GtkEditable    *entry,
 }
 
 static void
-entry_changed (GtkEntry       *entry,
-	       PanelRunDialog *dialog)
+combobox_changed (GtkComboBox    *combobox,
+		  PanelRunDialog *dialog)
 {
 	const char *text;
 	const char *start;
 	char       *msg;
 
-	text = gtk_entry_get_text (entry);
+	text = gtk_combo_box_get_active_text (combobox);
 
 	start = text;
 	while (*start != '\0' && g_ascii_isspace (*start))
@@ -1665,34 +1733,42 @@ panel_run_dialog_setup_entry (PanelRunDialog *dialog,
 {
 	GdkScreen             *screen;
 	int                    width_request;
+	GtkWidget             *entry;
 	
-	dialog->gnome_entry = glade_xml_get_widget (gui, "gnome_entry");
-	dialog->gtk_entry   = glade_xml_get_widget (gui, "gtk_entry");
+	dialog->combobox = glade_xml_get_widget (gui, "comboboxentry");
+
+	entry = gtk_bin_get_child (GTK_BIN (dialog->combobox));
+	gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
+
+	gtk_combo_box_set_model (GTK_COMBO_BOX (dialog->combobox),
+				 get_recent_programs_list ());
+	gtk_combo_box_entry_set_text_column
+		(GTK_COMBO_BOX_ENTRY (dialog->combobox), 0);
 
 	screen = gtk_window_get_screen (GTK_WINDOW (dialog->run_dialog));
 
         /* 1/4 the width of the first monitor should be a good value */
 	width_request = panel_multiscreen_width (screen, 0) / 4;
-	g_object_set (G_OBJECT (dialog->gnome_entry),
+	g_object_set (G_OBJECT (dialog->combobox),
 		      "width_request", width_request,
 		      NULL);
 
-        g_signal_connect (dialog->gtk_entry, "key-press-event",
-			  G_CALLBACK (entry_event), dialog);
+        g_signal_connect (entry, "key-press-event",
+			  G_CALLBACK (combobox_event), dialog);
 			  
-        dialog->changed_id = g_signal_connect (dialog->gtk_entry, "changed",
-					       G_CALLBACK (entry_changed),
+        dialog->changed_id = g_signal_connect (dialog->combobox, "changed",
+					       G_CALLBACK (combobox_changed),
 					       dialog);
 
-	gtk_drag_dest_unset (dialog->gtk_entry);
+	gtk_drag_dest_unset (dialog->combobox);
 	
-	gtk_drag_dest_set (dialog->gtk_entry,
+	gtk_drag_dest_set (dialog->combobox,
 			   GTK_DEST_DEFAULT_MOTION|GTK_DEST_DEFAULT_HIGHLIGHT,
 			   NULL, 0,
 			   GDK_ACTION_COPY);
-	gtk_drag_dest_add_uri_targets (dialog->gtk_entry);
+	gtk_drag_dest_add_uri_targets (dialog->combobox);
 
-	g_signal_connect (dialog->gtk_entry, "drag_data_received",
+	g_signal_connect (dialog->combobox, "drag_data_received",
 			  G_CALLBACK (entry_drag_data_received), dialog);
 }
 
@@ -1707,7 +1783,7 @@ panel_run_dialog_create_desktop_file (PanelRunDialog *dialog)
 	char       *scheme;
 	char       *save_uri;
 
-	text = gtk_entry_get_text (GTK_ENTRY (dialog->gtk_entry));
+	text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->combobox));
 	
 	if (!text || !text [0])
 		return NULL;
@@ -1875,7 +1951,7 @@ panel_run_dialog_new (GdkScreen *screen,
 
 	gtk_window_set_screen (GTK_WINDOW (dialog->run_dialog), screen);
 
-	gtk_widget_grab_focus (dialog->gtk_entry);
+	gtk_widget_grab_focus (dialog->combobox);
 	gtk_widget_realize (dialog->run_dialog);
 	gdk_x11_window_set_user_time (dialog->run_dialog->window,
 				      activate_time);
@@ -1915,7 +1991,7 @@ panel_run_dialog_present (GdkScreen *screen,
 		gtk_window_set_screen (GTK_WINDOW (static_dialog->run_dialog), screen);
 		gtk_window_present_with_time (GTK_WINDOW (static_dialog->run_dialog),
 					      activate_time);
-		gtk_widget_grab_focus (static_dialog->gtk_entry);
+		gtk_widget_grab_focus (static_dialog->combobox);
 		return;
 	}
 
diff --git a/gnome-panel/panel-run-dialog.glade b/gnome-panel/panel-run-dialog.glade
index 148acc2..8398abd 100644
--- a/gnome-panel/panel-run-dialog.glade
+++ b/gnome-panel/panel-run-dialog.glade
@@ -1,14 +1,13 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
+<?xml version="1.0"?>
 <glade-interface>
-  <requires lib="gnome"/>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
   <widget class="GtkDialog" id="panel_run_dialog">
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Run Application</property>
     <property name="resizable">False</property>
-    <property name="window_position">GTK_WIN_POS_CENTER</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="window_position">center</property>
+    <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox1">
@@ -36,8 +35,8 @@
                         <property name="yalign">0</property>
                         <property name="stock">gtk-missing-image</property>
                         <accessibility>
-                          <atkproperty name="AtkObject::accessible_name" translatable="yes">Command icon</atkproperty>
-                          <atkproperty name="AtkObject::accessible_description" translatable="yes">The icon of the command to be run.</atkproperty>
+                          <atkproperty name="AtkObject::accessible-name" translatable="yes">Command icon</atkproperty>
+                          <atkproperty name="AtkObject::accessible-description" translatable="yes">The icon of the command to be run.</atkproperty>
                         </accessibility>
                       </widget>
                     </child>
@@ -46,6 +45,7 @@
                     <property name="expand">False</property>
                     <property name="fill">False</property>
                     <property name="padding">10</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
@@ -53,22 +53,12 @@
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GnomeEntry" id="gnome_entry">
+                      <widget class="GtkComboBoxEntry" id="comboboxentry">
                         <property name="visible">True</property>
-                        <property name="history_id">gnome-run</property>
-                        <property name="max_saved">10</property>
-                        <accessibility>
-                          <atkproperty name="AtkObject::accessible_name" translatable="yes">Command entry</atkproperty>
-                          <atkproperty name="AtkObject::accessible_description" translatable="yes">Enter a command string here to run it.</atkproperty>
-                        </accessibility>
-                        <child internal-child="entry">
-                          <widget class="GtkEntry" id="gtk_entry">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="activates_default">True</property>
-                          </widget>
-                        </child>
                       </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
                     <child>
                       <widget class="GtkHBox" id="hbox2">
@@ -76,24 +66,29 @@
                         <property name="spacing">12</property>
                         <child>
                           <widget class="GtkCheckButton" id="terminal_checkbox">
+                            <property name="label" translatable="yes">Run in _terminal</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="label" translatable="yes">Run in _terminal</property>
+                            <property name="receives_default">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <accessibility>
-                              <atkproperty name="AtkObject::accessible_description" translatable="yes">Select this box to run the command in a terminal window.</atkproperty>
+                              <atkproperty name="AtkObject::accessible-description" translatable="yes">Select this box to run the command in a terminal window.</atkproperty>
                             </accessibility>
                           </widget>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
                         </child>
                         <child>
                           <widget class="GtkButton" id="file_button">
+                            <property name="label" translatable="yes">Run with _file...</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="label" translatable="yes">Run with _file...</property>
+                            <property name="receives_default">False</property>
                             <property name="use_underline">True</property>
                             <accessibility>
-                              <atkproperty name="AtkObject::accessible_description" translatable="yes">Click this button to browse for a file whose name to append to the command string.</atkproperty>
+                              <atkproperty name="AtkObject::accessible-description" translatable="yes">Click this button to browse for a file whose name to append to the command string.</atkproperty>
                             </accessibility>
                           </widget>
                           <packing>
@@ -115,6 +110,7 @@
               </widget>
               <packing>
                 <property name="expand">False</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
@@ -130,20 +126,23 @@
                       <widget class="GtkScrolledWindow" id="scrolledwindow1">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                        <property name="shadow_type">GTK_SHADOW_IN</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
                         <child>
                           <widget class="GtkTreeView" id="program_list">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="headers_visible">False</property>
                             <accessibility>
-                              <atkproperty name="AtkObject::accessible_name" translatable="yes">List of known applications</atkproperty>
+                              <atkproperty name="AtkObject::accessible-name" translatable="yes">List of known applications</atkproperty>
                             </accessibility>
                           </widget>
                         </child>
                       </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
                     <child>
                       <widget class="GtkLabel" id="program_label">
@@ -188,47 +187,57 @@
         <child internal-child="action_area">
           <widget class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="layout_style">end</property>
             <child>
               <widget class="GtkButton" id="help_button">
+                <property name="label">gtk-help</property>
+                <property name="response_id">-11</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
-                <property name="label">gtk-help</property>
+                <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">-11</property>
               </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
             </child>
             <child>
               <widget class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="response_id">-6</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
-                <property name="label">gtk-cancel</property>
+                <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">-6</property>
               </widget>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
             <child>
               <widget class="GtkButton" id="run_button">
+                <property name="response_id">-5</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
-                <property name="response_id">-5</property>
+                <property name="receives_default">False</property>
                 <accessibility>
-                  <atkproperty name="AtkObject::accessible_description" translatable="yes">Click this button to run the selected application or the command in the command entry field.</atkproperty>
+                  <atkproperty name="AtkObject::accessible-description" translatable="yes">Click this button to run the selected application or the command in the command entry field.</atkproperty>
                 </accessibility>
                 <child>
-                  <widget class="GtkAlignment" id="alignment1">
+                  <widget class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
                     <property name="xscale">0</property>
                     <property name="yscale">0</property>
                     <child>
-                      <widget class="GtkHBox" id="hbox2">
+                      <widget class="GtkHBox" id="hbox1">
                         <property name="visible">True</property>
                         <property name="spacing">2</property>
                         <child>
@@ -240,6 +249,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
+                            <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
@@ -262,13 +272,16 @@
                 </child>
               </widget>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">2</property>
               </packing>
             </child>
           </widget>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
       </widget>
