Index: gnome-panel/launcher.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/launcher.c,v
retrieving revision 1.248
diff -u -r1.248 launcher.c
--- gnome-panel/launcher.c	1 Jul 2003 18:29:16 -0000	1.248
+++ gnome-panel/launcher.c	7 Jul 2003 19:03:45 -0000
@@ -98,12 +98,11 @@
 
 	gnome_desktop_item_save (ditem, NULL, TRUE, &error);
 	if (error) {
-		panel_error_dialog (
-			screen,
-			"cannot_save_launcher",
-			_("Cannot save launcher to disk, "
-			  "the following error occured:\n\n%s"),
-			error->message);
+		panel_error_dialog (screen,
+				    "cannot_save_launcher",
+				    _("Cannot save launcher to disk"),
+				    error->message);
+
 		g_error_free (error);
 	}
 }
@@ -126,20 +125,21 @@
 	screen = launcher_get_screen (launcher);
 
 	if (!url) {
-		panel_error_dialog (
-			screen,
-			"no_url_dialog",
-			_("This launch icon does not specify a url to show"));
+		panel_error_dialog (screen,
+				    "no_url_dialog",
+				    _("Cannot launch icon"),
+				    _("This launch icon does not specify a url to show."));
 		return;
 	}
 
 	egg_url_show_on_screen (url, screen, &error);
 	if (error) {
-		panel_error_dialog (
-			screen,
-			"cant_show_url_dialog",
-			_("Cannot show %s\n%s"),
-			url, error->message);
+		panel_error_dialog (screen,
+				    "cannot_show_url_dialog",
+				    _("Cannot show %s"),
+				    error->message,
+				    url);
+
 		g_clear_error (&error);
 	}
 }
@@ -167,17 +167,11 @@
 		panel_ditem_launch (
 			item, NULL, 0, launcher_get_screen (launcher), &error);
 		if (error) {
-			char *msg;
-			msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-				_("Cannot launch icon"),
-				_("Details"), error->message);
-
-			panel_error_dialog (
-				launcher_get_screen (launcher),
-				"cannot_launch_icon",
-				msg);
+			panel_error_dialog (launcher_get_screen (launcher),
+					    "cannot_launch_icon",
+					    _("Cannot launch icon"),
+					    error->message);
 
-			g_free (msg);
 			g_clear_error (&error);
 		}
 	}
@@ -218,11 +212,10 @@
 	g_strfreev (envp);
 
 	if (error) {
-		panel_error_dialog (
-			launcher_get_screen (launcher),
-			"cannot_launch_icon",
-			_("Cannot launch icon\n%s"),
-			error->message);
+		panel_error_dialog (launcher_get_screen (launcher),
+				    "cannot_launch_icon",
+				    _("Cannot launch icon"),
+				    error->message);
 		g_clear_error (&error);
 	}
 
@@ -1110,17 +1103,11 @@
 				launcher->ditem, "X-GNOME-DocPath");
 	panel_show_gnome_kde_help (screen, docpath, &error);
 	if (error) {
-		char *msg;
-		msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-			_("Cannot display help document"),
-			_("Details"), error->message);
-
-		panel_error_dialog (
-			screen,
-			"cannot_show_gnome_kde_help",
-			msg);
+		panel_error_dialog (screen,
+				    "cannot_show_gnome_kde_help",
+				    _("Cannot display help document"),
+				    error->message);
 
-		g_free (msg);
 		g_error_free (error);
 	}
 }
Index: gnome-panel/menu-ditem.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/menu-ditem.c,v
retrieving revision 1.21
diff -u -r1.21 menu-ditem.c
--- gnome-panel/menu-ditem.c	5 Jul 2003 17:54:43 -0000	1.21
+++ gnome-panel/menu-ditem.c	7 Jul 2003 19:03:45 -0000
@@ -111,19 +111,11 @@
 
 	saving_error = g_object_get_data (G_OBJECT (dedit), "SavingError");
 
-	if (saving_error) {
-		char *msg;
-		msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-			_("Cannot save changes to launcher"),
-			_("Details"), saving_error);
-
-		panel_error_dialog (
-			gtk_window_get_screen (GTK_WINDOW (dialog)),
-			"cannot_save_entry",
-			msg);
-
-		g_free (msg);
-	}
+	if (saving_error)
+		panel_error_dialog (gtk_window_get_screen (GTK_WINDOW (dialog)),
+				    "cannot_save_entry",
+				    _("Cannot save changes to launcher"),
+				    saving_error);
 }
 
 static gboolean
@@ -451,10 +443,11 @@
 
 	/* check for valid name */
 	if (string_empty (gnome_desktop_item_get_localestring (ditem, GNOME_DESKTOP_ITEM_NAME))) {
-		dialog = panel_error_dialog (
-				gtk_window_get_screen (GTK_WINDOW (d)),
-				"cannot_create_launcher",
-				_("You have to specify a name for the launcher."));
+		dialog = panel_error_dialog (gtk_window_get_screen (GTK_WINDOW (d)),
+					     "cannot_create_launcher",
+					     _("Cannot create launcher"),
+					     _("You have to specify a name."));
+
 		g_signal_connect_swapped (G_OBJECT (dialog),
 					  "destroy",
 					  G_CALLBACK (panel_pop_window_busy),
@@ -467,10 +460,10 @@
 	     string_empty (gnome_desktop_item_get_string (ditem, GNOME_DESKTOP_ITEM_EXEC))) ||
 	    (gnome_desktop_item_get_entry_type (ditem) == GNOME_DESKTOP_ITEM_TYPE_LINK &&
 	     string_empty (gnome_desktop_item_get_string (ditem, GNOME_DESKTOP_ITEM_URL)))) {
-		dialog = panel_error_dialog (
-				gtk_window_get_screen (GTK_WINDOW (d)),
-				"cannot_create_launcher",
-				_("You have to specify a valid URL or command."));
+		dialog = panel_error_dialog (gtk_window_get_screen (GTK_WINDOW (d)),
+					     "cannot_create_launcher",
+					     _("Cannot create launcher"),
+					     _("You have to specify a valid URL or command."));
 		g_signal_connect_swapped (G_OBJECT (dialog),
 					  "destroy",
 					  G_CALLBACK (panel_pop_window_busy),
@@ -498,17 +491,11 @@
 				 TRUE /* force */,
 				 &error);
 	if (error) {
-		char *msg;
-		msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-			_("Cannot save menu item to disk"),
-			_("Details"), error->message);
-
-		panel_error_dialog (
-			gtk_window_get_screen (GTK_WINDOW (d)),
-			"cannot_save_menu_item" /* class */,
-			msg);
+		panel_error_dialog (gtk_window_get_screen (GTK_WINDOW (d)),
+				    "cannot_save_menu_item" /* class */,
+				    _("Cannot save menu item to disk"),
+				    error->message);
 
-		g_free (msg);
 		g_clear_error (&error);
 	}
 
@@ -528,11 +515,10 @@
 	GtkWidget *dee;
 
 	if (!is_item_writable (item_loc, NULL)) {
-		dialog = panel_error_dialog (
-				screen,
-				"cannot_create_launcher",
-				_("You can not create a new launcher at this location "
-				  "since the location is not writable."));
+		dialog = panel_error_dialog (screen,
+					     "cannot_create_launcher",
+					     _("Cannot create launcher"),
+					     _("This location since the location is not writable."));
 
 		return dialog;
 	}
Index: gnome-panel/menu.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/menu.c,v
retrieving revision 1.672
diff -u -r1.672 menu.c
--- gnome-panel/menu.c	7 Jul 2003 10:37:59 -0000	1.672
+++ gnome-panel/menu.c	7 Jul 2003 19:03:47 -0000
@@ -327,19 +327,13 @@
 {
 	GdkScreen *screen = menuitem_to_screen (menuitem);
 
-	if (egg_screen_execute_async (screen, g_get_home_dir (), 1, &program_path) < 0) {
-		char *msg;
-		msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s %s",
-			_("Can't execute 'About GNOME'"),
-			_("Details"), program_path,
-			_("probably does not exist"));
-
+	if (egg_screen_execute_async (screen, g_get_home_dir (), 1, &program_path) < 0)
 		panel_error_dialog (screen,
-		                    "cannot_exec_about_gnome",
-		                    msg);
-
-		g_free (msg);
-	}
+				    "cannot_exec_about_gnome",
+				    _("Cannot execute '%s'"),
+				    _("%s - command not found"),
+				    _("About GNOME"),
+				    program_path);
 }
 
 static void
@@ -358,34 +352,22 @@
 		panel_ditem_launch (
 			item, NULL, 0, menuitem_to_screen (menuitem), &error);
 		if (error) {
-			char *msg;
-			msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-				_("Can't launch entry"),
-				_("Details"), error->message);
-
-			panel_error_dialog (
-				menuitem_to_screen (menuitem),
-				"cant_launch_entry",
-				msg);
+			panel_error_dialog (menuitem_to_screen (menuitem),
+					    "cannot_launch_entry",
+					    _("Cannot launch entry"),
+					    error->message);
 
-			g_free (msg);
 			g_clear_error (&error);
 		}
 		gnome_desktop_item_unref (item);
 	} else {
-		char *msg;
 		g_assert (error != NULL);
 
-		msg = g_strdup_printf ("<b>%s</b>%s: %s",
-			_("Can't load entry"),
-			_("Details"), error->message);
-
-		panel_error_dialog (
-			menuitem_to_screen (menuitem),
-			"cant_load_entry",
-			msg);
+		panel_error_dialog (menuitem_to_screen (menuitem),
+				    "cannot_load_entry",
+				    _("Cannot load entry"),
+				    error->message);
 
-		g_free (msg);
 		g_clear_error (&error);
 	}
 }
@@ -1076,21 +1058,16 @@
 	result = gnome_vfs_unlink (sim->item_loc);
 
 	if (result != GNOME_VFS_OK) {
-		char *esc, *msg;
+		char *esc;
 
 		esc = g_markup_escape_text (sim->item_loc, -1);
-		msg = g_strdup_printf ("<b>%s %s</b>\n\n%s: %s\n",
-			_("Could not remove the menu item"),
-			esc,
-			_("Details"),
-			gnome_vfs_result_to_string (result));
-
-		panel_error_dialog (
-			menuitem_to_screen (sim->menuitem),
-			"cant_remove_menu_item",
-			msg);
 
-		g_free (msg);
+		panel_error_dialog (menuitem_to_screen (sim->menuitem),
+				    "cannot_remove_menu_item",
+				    _("Cannot remove menu item %s"),
+				    gnome_vfs_result_to_string (result),
+				    esc);
+
 		g_free (esc);
 		return;
 	}
@@ -1170,35 +1147,21 @@
 
 		if (exec != NULL)
 			panel_run_dialog_present_with_text (menuitem_to_screen (sim->menuitem), exec);
-		else {
-			char *msg;
-			msg = g_strdup_printf ("<b>%s</b>\n\n%s",
-				_("Can't add to run box"),
-				_("Details: No 'Exec' or 'URL' field in entry"));
-
-			panel_error_dialog (
-				menuitem_to_screen (sim->menuitem),
-				"no_exec_or_url_field",
-				msg);
-
-			g_free (msg);
-		}
+		else
+			panel_error_dialog (menuitem_to_screen (sim->menuitem),
+					    "no_exec_or_url_field",
+					    _("Cannot add to run box"),
+					    _("No 'Exec' or 'URL' field in entry"));
 
 		gnome_desktop_item_unref (item);
 	} else {
-		char *msg;
 		g_assert (error != NULL);
 
-		msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-			_("Can't load entry"),
-			_("Details"), error->message);
-
-		panel_error_dialog (
-			menuitem_to_screen (sim->menuitem),
-			"cant_load_entry",
-			msg);
+		panel_error_dialog (menuitem_to_screen (sim->menuitem),
+				    "cannot_load_entry",
+				    _("Cannot load entry"),
+				    error->message);
 
-		g_free (msg);
 		g_clear_error (&error);
 	}
 }
@@ -1220,35 +1183,23 @@
 		const char *docpath = gnome_desktop_item_get_string
 			(item, "X-GNOME-DocPath");
 		if ( ! panel_show_gnome_kde_help (screen, docpath, &error)) {
-			char *msg;
-			msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-				_("Cannot display help document"),
-				_("Details"), error->message);
-
-			panel_error_dialog (
-				screen,
-				"cannot_show_gnome_kde_help",
-				msg);
+			panel_error_dialog (screen,
+					    "cannot_show_gnome_kde_help",
+					    _("Cannot display help document"),
+					    error->message);
 
-			g_free (msg);
 			g_clear_error (&error);
 		}
 
 		gnome_desktop_item_unref (item);
 	} else {
-		char *msg;
 		g_assert (error != NULL);
 
-		msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-			_("Can't load entry"),
-			_("Details"), error->message);
-
-		panel_error_dialog (
-			screen,
-			"cant_load_entry",
-			msg);
+		panel_error_dialog (screen,
+				    "cannot_load_entry",
+				    _("Cannot load entry"),
+				    error->message);
 
-		g_free (msg);
 		g_clear_error (&error);
 	}
 }
@@ -2949,10 +2900,10 @@
 	toplevel     = panel_widget->toplevel;
 
 	if (panel_toplevel_is_last_unattached (toplevel)) {
-		panel_error_dialog (
-			menuitem_to_screen (menuitem),
-			"cannot_remove_last_panel",
-			_("You cannot remove your last panel."));
+		panel_error_dialog (menuitem_to_screen (menuitem),
+				    "cannot_remove_last_panel",
+				    _("You cannot remove your last panel."),
+				    NULL);
 		return;
 	}
 
Index: gnome-panel/panel-action-button.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-action-button.c,v
retrieving revision 1.13
diff -u -r1.13 panel-action-button.c
--- gnome-panel/panel-action-button.c	1 Jul 2003 18:29:16 -0000	1.13
+++ gnome-panel/panel-action-button.c	7 Jul 2003 19:03:47 -0000
@@ -154,7 +154,9 @@
 	if (egg_screen_execute_async (screen, g_get_home_dir (), 1, argv) < 0)
 		panel_error_dialog (screen,
 				    "cannot_exec_gnome-search-tool",
-				    _("Cannot execute gnome-search-tool"));
+				    _("Cannot execute '%s'"),
+				    NULL,
+				    "gnome-search-tool");
 }
 
 /* Take Screenshot
@@ -170,7 +172,9 @@
 	if (egg_screen_execute_async (screen, g_get_home_dir (), 1, argv) < 0)
 		panel_error_dialog (screen,
 				    "cannot_exec_gnome-panel-screenshot",
-				    _("Cannot execute gnome-panel-screenshot"));
+				    _("Cannot execute '%s'"),
+				    NULL,
+				    "gnome-panel-screenshot");
 }
 
 /* Force Quit
Index: gnome-panel/panel-recent.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-recent.c,v
retrieving revision 1.6
diff -u -r1.6 panel-recent.c
--- gnome-panel/panel-recent.c	7 Jul 2003 10:38:00 -0000	1.6
+++ gnome-panel/panel-recent.c	7 Jul 2003 19:03:47 -0000
@@ -138,14 +138,17 @@
 
 	if (show_uri (uri, mime_type, screen, &error) != TRUE) {
 		if (error != NULL) {
-			panel_error_dialog (screen, "cannot_open_recent_doc",
+			panel_error_dialog (screen,
+					    "cannot_open_recent_doc",
+					    _("Cannot open recently used document"),
 					    error->message);
 			g_error_free (error);
 		} else
 			panel_error_dialog (screen,
-					"cannot_open_recent_doc_unknown",
-					_("An unknown error occurred while trying"
-					  " to open %s"), uri_utf8);
+					    "cannot_open_recent_doc_unknown",
+					    _("Cannot open recently used document"),
+					    _("An unknown error occurred while trying to open %s"),
+					    uri_utf8);
 	}
 
 	g_free (uri);
Index: gnome-panel/panel-run-dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-run-dialog.c,v
retrieving revision 1.4
diff -u -r1.4 panel-run-dialog.c
--- gnome-panel/panel-run-dialog.c	30 Jun 2003 21:57:39 -0000	1.4
+++ gnome-panel/panel-run-dialog.c	7 Jul 2003 19:03:48 -0000
@@ -272,14 +272,11 @@
 				&error);
 			
 	if (!result) {
-		char *msg;
-		msg = g_strdup_printf ("<b>%s: '%s'</b>\n\n%s: %s",
-			_("Error launching command"), escaped,
-			_("Details"), error->message);
+		panel_error_dialog (screen, "cannot_spawn_command",
+				    _("Cannot launch command '%s'"),
+				    error->message,
+				    escaped);
 
-		panel_error_dialog (screen, "error_spawning_command", msg);
-
-		g_free (msg);
 		g_error_free (error);
 	}
 				
@@ -306,14 +303,11 @@
 	g_strfreev (envp);
 
 	if (error) {
-		char *msg;
-		msg = g_strdup_printf ("<b>%s: '%s'</b>\n\n%s: %s",
-			_("Error displaying location"), escaped,
-			_("Details"), error->message);
-
-		panel_error_dialog (screen, "error_showing_url", msg);
+		panel_error_dialog (screen, "cannot_show_url",
+				    _("Cannot display location '%s'"),
+				    error->message,
+				    escaped);
 
-		g_free (msg);
 		g_error_free (error);
 		return FALSE;
 	}
Index: gnome-panel/panel-util.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-util.c,v
retrieving revision 1.133
diff -u -r1.133 panel-util.c
--- gnome-panel/panel-util.c	2 Jul 2003 09:45:28 -0000	1.133
+++ gnome-panel/panel-util.c	7 Jul 2003 19:03:48 -0000
@@ -68,17 +68,12 @@
 	GError *error = NULL;
 
 	if (!egg_help_display_desktop_on_screen (NULL, "user-guide", doc_name, linkid, screen, &error)) {
-		char *msg;
-		msg = g_strdup_printf ("<b>%s</b>\n\n%s: %s",
-			_("Cannot display help document"),
-			_("Details"), error != NULL ? error->message : "");
-
 		panel_error_dialog (
 			screen,
 			"cannot_show_help",
-			msg);
+			_("Cannot display help document"),
+			error != NULL ? error->message : "");
 
-		g_free (msg);
 		g_clear_error (&error);
 	}
 }
@@ -470,20 +465,35 @@
 GtkWidget *
 panel_error_dialog (GdkScreen  *screen,
 		    const char *class,
-		    const char *format,
+		    const char *primary_format,
+		    const char *secondary_format,
 		    ...)
 {
 	GtkWidget *w;
-	char *s;
+	char *sec = NULL, *format, *s;
 	va_list ap;
 
-	if (format == NULL) {
-		g_warning ("NULL error dialog");
+	if (primary_format == NULL) {
+		g_warning ("NULL dialog");
 		s = g_strdup ("(null)");
 	} else {
-		va_start (ap, format);
+		if (secondary_format == NULL)
+			format = (char *)primary_format;
+		else {
+			sec = g_strdup_printf (_("Details: %s"), secondary_format);
+
+			format = g_strdup_printf ("<b>%s</b>\n\n%s",
+						  primary_format,
+						  sec);
+
+			g_free (sec);
+		}
+
+		va_start (ap, secondary_format);
 		s = g_strdup_vprintf (format, ap);
 		va_end (ap);
+
+		g_free (format);
 	}
 
 	w = panel_dialog (screen, GTK_MESSAGE_ERROR, class, s);
@@ -941,18 +951,13 @@
 	if (!screen)
 		screen = gdk_screen_get_default ();
 
-	if (egg_screen_execute_async (screen, g_get_home_dir (), 2, argv) < 0) {
-		char *msg;
-		msg = g_strdup_printf ("<b>%s</b>\n\n%s",
-			_("Cannot execute xscreensaver"),
-			_("Details: xscreensaver-command not found"));
-
+	if (egg_screen_execute_async (screen, g_get_home_dir (), 2, argv) < 0)
 		panel_error_dialog (screen,
 			"cannot_exec_xscreensaver",
-			msg);
-
-		g_free (msg);
-	}
+			 _("Cannot execute %s"),
+			 _("%s - command not found"),
+			 "xscreensaver",
+			 "xscreensaver");
 }
 
 
Index: gnome-panel/panel-util.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-util.h,v
retrieving revision 1.73
diff -u -r1.73 panel-util.h
--- gnome-panel/panel-util.h	26 May 2003 13:41:07 -0000	1.73
+++ gnome-panel/panel-util.h	7 Jul 2003 19:03:48 -0000
@@ -63,8 +63,9 @@
 
 GtkWidget      *panel_error_dialog      (GdkScreen  *screen,
 					 const char *class,
-					 const char *format,
-					 ...) G_GNUC_PRINTF (3, 4);
+					 const char *primary_format,
+					 const char *secondary_format,
+					 ...) G_GNUC_PRINTF (4, 5);
 
 int		panel_find_applet_index	(GtkWidget *widget);
 
