diff options
author | JP Rosevear <jpr@ximian.com> | 2002-04-24 14:03:02 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-04-24 14:03:02 +0800 |
commit | 38e985a2e4257006e6f0d1f0c1b2097a6394e888 (patch) | |
tree | 14f52df242b29109350d275f8f8e7196e0722f28 /calendar | |
parent | 11be06c763d9a9f4d699a7d95a0aff66af6328a2 (diff) | |
download | gsoc2013-evolution-38e985a2e4257006e6f0d1f0c1b2097a6394e888.tar gsoc2013-evolution-38e985a2e4257006e6f0d1f0c1b2097a6394e888.tar.gz gsoc2013-evolution-38e985a2e4257006e6f0d1f0c1b2097a6394e888.tar.bz2 gsoc2013-evolution-38e985a2e4257006e6f0d1f0c1b2097a6394e888.tar.lz gsoc2013-evolution-38e985a2e4257006e6f0d1f0c1b2097a6394e888.tar.xz gsoc2013-evolution-38e985a2e4257006e6f0d1f0c1b2097a6394e888.tar.zst gsoc2013-evolution-38e985a2e4257006e6f0d1f0c1b2097a6394e888.zip |
launch pilot settings capplet
2002-04-24 JP Rosevear <jpr@ximian.com>
* 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
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 29 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 29 |
3 files changed, 65 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8096477015..5f6e77fe9a 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,12 @@ 2002-04-24 JP Rosevear <jpr@ximian.com> + * 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 + +2002-04-24 JP Rosevear <jpr@ximian.com> + * gui/e-week-view.c (free_view_popup): free the view popup (e_week_view_show_popup_menu): add the view popup to the "main_item" menu and listen for destruction 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 <gal/widgets/e-unicode.h> #include <libgnomeui/gnome-canvas-rect-ellipse.h> #include <libgnome/gnome-i18n.h> +#include <libgnome/gnome-exec.h> +#include <libgnome/gnome-util.h> #include <e-util/e-dialog-utils.h> #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 }; @@ -3946,6 +3952,29 @@ e_day_view_on_settings (GtkWidget *widget, gpointer data) } 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) { EDayView *day_view; diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 4fb09c5961..c01230cbf2 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -41,6 +41,9 @@ #include <gtk/gtkmain.h> #include <libgnome/gnome-defs.h> #include <libgnome/gnome-i18n.h> +#include <libgnome/gnome-i18n.h> +#include <libgnome/gnome-exec.h> +#include <libgnome/gnome-util.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gnome-canvas-pixbuf.h> #include <gal/e-text/e-text.h> @@ -200,6 +203,8 @@ static void e_week_view_on_publish (GtkWidget *widget, gpointer data); static void e_week_view_on_settings (GtkWidget *widget, gpointer data); +static void e_week_view_on_pilot_settings (GtkWidget *widget, + gpointer data); static void e_week_view_on_delete_occurrence (GtkWidget *widget, gpointer data); static void e_week_view_on_delete_appointment (GtkWidget *widget, @@ -3457,6 +3462,7 @@ static EPopupMenu main_items [] = { E_POPUP_SEPARATOR, E_POPUP_ITEM (N_("_Configure..."), e_week_view_on_settings, 0), + E_POPUP_ITEM (N_("_Configure Pilot..."), e_week_view_on_pilot_settings, 0), E_POPUP_TERMINATOR }; @@ -3817,6 +3823,29 @@ e_week_view_on_settings (GtkWidget *widget, gpointer data) } static void +e_week_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_week_view_on_delete_occurrence (GtkWidget *widget, gpointer data) { EWeekView *week_view; |