From 50aa4d1e2806a9ccadcfa56d5cc2fc279bcb7d5e Mon Sep 17 00:00:00 2001 From: Matthew Loper Date: Tue, 9 May 2000 18:38:03 +0000 Subject: New function; allows users to submit a bug. + (command_run_bugbuddy): * e-shell-view-menu.c (command_run_bugbuddy): New function; allows users to submit a bug. + (command_run_bugbuddy): Implemented with jacob's patch. svn path=/trunk/; revision=2960 --- shell/ChangeLog | 1 + shell/e-shell-view-menu.c | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index ffe06a1e29..b4925467c7 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -2,6 +2,7 @@ * e-shell-view-menu.c (command_run_bugbuddy): New function; allows users to submit a bug. + (command_run_bugbuddy): Implemented with jacob's patch. 2000-05-09 Ettore Perazzoli diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index f0d4bdc9c0..44657737d4 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -44,10 +44,29 @@ command_quit (GtkWidget *widget, } static void -command_run_bugbuddy (GtkWidget *widget, gpointer data) +command_run_bugbuddy (GtkWidget *menuitem, gpointer data) { - - + int pid; + char *args[] = { + "bug-buddy", + "--sm-disable", + "--package=evolution", + "--package-ver="VERSION, + NULL + }; + args[0] = gnome_is_program_in_path ("bug-buddy"); + if (!args[0]) { + /* you might have to call gnome_dialog_run() on the + * dialog returned here, I don't remember... + */ + gnome_error_dialog (_("Bug buddy was not found in your $PATH.")); + } + pid = gnome_execute_async (NULL, 4, args); + g_free (args[0]); + if (pid == -1) { + /* same as above */ + gnome_error_dialog (_("Bug buddy could not be run.")); + } } @@ -205,6 +224,7 @@ GnomeUIInfo e_shell_view_menu [] = { { GNOME_APP_UI_SUBTREE, N_("_Tools"), NULL, menu_tools }, { GNOME_APP_UI_SUBTREE, N_("_Actions"), NULL, menu_actions }, + GNOMEUIINFO_MENU_HELP_TREE (menu_help), #warning Should provide a help menu here; Bonobo needs it -- cgit v1.2.3