Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-panel/ChangeLog,v
retrieving revision 1.600
diff -u -r1.600 ChangeLog
--- ChangeLog	5 Dec 2003 05:52:05 -0000	1.600
+++ ChangeLog	6 Dec 2003 00:33:22 -0000
@@ -1,3 +1,9 @@
+2003-12-06  Jan Arne Petersen  <jpetersen@uni-bonn.de>
+
+	* gnome-panel/panel-run-dialog.c: (panel_run_dialog_destroy),
+	(file_button_browse_response), (file_button_clicked): replace
+	GtkFileSelection with GtkFileChooser
+
 2003-12-05  Vijaykumar Patwari <vijaykumar.patwari@wipro.com>
 
 	* gnome-panel/panel-force-quit.c (kill_window_question): Replaced
Index: gnome-panel/panel-run-dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-run-dialog.c,v
retrieving revision 1.14
diff -u -r1.14 panel-run-dialog.c
--- gnome-panel/panel-run-dialog.c	28 Oct 2003 14:41:04 -0000	1.14
+++ gnome-panel/panel-run-dialog.c	6 Dec 2003 00:33:25 -0000
@@ -76,8 +76,6 @@
 	
 	GtkListStore     *program_list_store;
 
-	GtkFileSelection *file_sel;
-	
 	GList            *executables;
 	GCompletion      *completion;
 	
@@ -110,10 +108,6 @@
 {
 	GList *l;
 
-	if (dialog->file_sel != NULL)
-		gtk_widget_destroy (GTK_WIDGET (dialog->file_sel));
-	dialog->file_sel = NULL;
-
 	g_object_unref (dialog->program_list_box);
 	
 	g_slist_foreach (dialog->add_icon_paths, (GFunc) gtk_tree_path_free, NULL);
@@ -1014,26 +1008,19 @@
 }
 
 static void
-file_button_browse_ok (GtkWidget      *button,
-		       PanelRunDialog *dialog)
-{
-	const char *file;
-	
-	file = gtk_file_selection_get_filename (dialog->file_sel);
-	panel_run_dialog_append_file (dialog, file);
+file_button_browse_response (GtkWidget      *chooser,
+			     gint            response,
+			     PanelRunDialog *dialog)
+{
+	char *file;
+	
+	if (response == GTK_RESPONSE_OK) {
+		file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
+		panel_run_dialog_append_file (dialog, file);
+		g_free (file);
+	}
 	
-	gtk_widget_destroy (GTK_WIDGET (dialog->file_sel));
-	dialog->file_sel = NULL;
-
-	gtk_widget_grab_focus (dialog->gtk_entry);
-}
-
-static void
-file_button_browse_cancel (GtkWidget      *button,
-			   PanelRunDialog *dialog)
-{
-	gtk_widget_destroy (GTK_WIDGET (dialog->file_sel));
-	dialog->file_sel = NULL;
+	gtk_widget_destroy (chooser);
 
 	gtk_widget_grab_focus (dialog->gtk_entry);
 }
@@ -1042,25 +1029,27 @@
 file_button_clicked (GtkButton      *button,
 		     PanelRunDialog *dialog)
 {
-	char *home;
+	GtkWidget *chooser;
 
-	dialog->file_sel = GTK_FILE_SELECTION (gtk_file_selection_new (
-						       _("Choose a file to append to the command...")));
+	chooser = gtk_file_chooser_dialog_new (_("Choose a file to append to the command..."),
+					       GTK_WINDOW (dialog->run_dialog),
+					       GTK_FILE_CHOOSER_ACTION_OPEN,
+					       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+					       GTK_STOCK_OK, GTK_RESPONSE_OK,
+					       NULL);
+	
+	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser),
+					     g_get_home_dir ());
 	
-	home = g_strconcat (g_get_home_dir (), "/", NULL);
-	gtk_file_selection_set_filename (dialog->file_sel, home);
-	g_free (home);
+	gtk_dialog_set_default_response (GTK_DIALOG (chooser), GTK_RESPONSE_OK);
 	
-	gtk_window_set_transient_for (GTK_WINDOW (dialog->file_sel),
-				      GTK_WINDOW (dialog->run_dialog));
+	gtk_window_set_destroy_with_parent (GTK_WINDOW (chooser), TRUE);
+	gtk_window_set_default_size (GTK_WINDOW (chooser), 600, 400);
 				      
-	g_signal_connect (dialog->file_sel->ok_button, "clicked",
-			  G_CALLBACK (file_button_browse_ok), dialog);
+	g_signal_connect (chooser, "response",
+			  G_CALLBACK (file_button_browse_response), dialog);
 			  
-	g_signal_connect (dialog->file_sel->cancel_button, "clicked",
-		 	  G_CALLBACK (file_button_browse_cancel), dialog);
-
-	gtk_window_present (GTK_WINDOW (dialog->file_sel));
+	gtk_window_present (GTK_WINDOW (chooser));
 }
 
 static void
