--- evolution-2.7.3/shell/e-shell-window-commands.c.submit-bug-report	2006-07-07 09:09:56.000000000 -0400
+++ evolution-2.7.3/shell/e-shell-window-commands.c	2006-07-07 10:47:19.000000000 -0400
@@ -114,26 +114,35 @@
 		    EShellWindow *window,
 		    const char *path)
 {
-        int pid;
-        char *args[] = {
-                "bug-buddy",
-                "--sm-disable",
-                "--package=evolution",
-                "--package-ver="VERSION,
-                NULL
-        };
-
-        args[0] = g_find_program_in_path ("bug-buddy");
-        if (!args[0]) {
-                e_notice (NULL, GTK_MESSAGE_ERROR, _("Bug buddy is not installed."));
-		return;
-        }
+	gchar *command_line;
+	GError *error = NULL;
 
-        pid = gnome_execute_async (NULL, 4, args);
-        g_free (args[0]);
+        /* For the --appname option, Bug Buddy does not recognize the true
+         * filename of the application (evolution-2.x, as g_get_prgname()
+         * would return), so we have to use the package name (evolution).
+         * XXX Might be nice to also supply the --name and --email options. */
+	command_line = g_strdup_printf (
+		"bug-buddy"
+		" --sm-disable"
+		" --package=" PACKAGE
+		" --package-ver=" VERSION
+		" --appname=" PACKAGE_NAME
+		" --pid=%ld",
+		getpid ());
+
+	g_debug ("Spawning: %s", command_line);
+
+	if (!g_spawn_command_line_async (command_line, &error)) {
+		if (error->code == G_SPAWN_ERROR_NOENT)
+			e_notice (NULL, GTK_MESSAGE_ERROR,
+				_("Bug buddy is not installed."));
+		else
+			e_notice (NULL, GTK_MESSAGE_ERROR,
+				_("Bug buddy could not be run."));
+		g_error_free (error);
+	}
 
-        if (pid == -1)
-                e_notice (NULL, GTK_MESSAGE_ERROR, _("Bug buddy could not be run."));
+	g_free (command_line);
 }
 
 /* must be in utf8, the weird breaking of escaped strings
