From 38e985a2e4257006e6f0d1f0c1b2097a6394e888 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 24 Apr 2002 06:03:02 +0000 Subject: launch pilot settings capplet 2002-04-24 JP Rosevear * gui/e-day-view.c (e_day_view_on_pilot_settings): launch pilot settings capplet * gui/e-week-view.c (e_week_view_on_pilot_settings): ditto svn path=/trunk/; revision=16573 --- calendar/gui/e-day-view.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'calendar/gui/e-day-view.c') diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 01b9022e2f..3d63bfa83b 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -46,6 +46,8 @@ #include #include #include +#include +#include #include #include "cal-util/timeutil.h" @@ -357,6 +359,8 @@ static void e_day_view_on_publish (GtkWidget *widget, gpointer data); static void e_day_view_on_settings (GtkWidget *widget, gpointer data); +static void e_day_view_on_pilot_settings (GtkWidget *widget, + gpointer data); static void e_day_view_on_delete_occurrence (GtkWidget *widget, gpointer data); static void e_day_view_on_delete_appointment (GtkWidget *widget, @@ -3579,6 +3583,8 @@ static EPopupMenu main_items [] = { E_POPUP_ITEM (N_("_Configure..."), e_day_view_on_settings, 0), + E_POPUP_ITEM (N_("_Configure Pilot..."), + e_day_view_on_pilot_settings, 0), E_POPUP_TERMINATOR }; @@ -3945,6 +3951,29 @@ e_day_view_on_settings (GtkWidget *widget, gpointer data) control_util_show_settings (day_view->calendar); } +static void +e_day_view_on_pilot_settings (GtkWidget *widget, gpointer data) +{ + char *args[] = { + "gpilotd-control-applet", + NULL + }; + int pid; + + args[0] = gnome_is_program_in_path ("gpilotd-control-applet"); + if (!args[0]) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + _("The GNOME Pilot tools do not appear to be installed on this system.")); + return; + } + + pid = gnome_execute_async (NULL, 4, args); + if (pid == -1) + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Error executing %s."), args[0]); + + g_free (args[0]); +} + static void e_day_view_on_delete_occurrence (GtkWidget *widget, gpointer data) { -- cgit