aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-08-17 04:45:43 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-08-17 04:45:43 +0800
commit8399cad79100c86a408761148b00ce64964cbbaa (patch)
tree737eb17b1621ccdbb6ae5afc93ae767b4515941a /calendar
parentced6dc05f895375377fe0f063e6c572a884ed3a0 (diff)
downloadgsoc2013-evolution-8399cad79100c86a408761148b00ce64964cbbaa.tar.gz
gsoc2013-evolution-8399cad79100c86a408761148b00ce64964cbbaa.tar.zst
gsoc2013-evolution-8399cad79100c86a408761148b00ce64964cbbaa.zip
Set the default-to-add notification to be display a message 15 minutes
2001-08-16 Federico Mena Quintero <federico@ximian.com> * gui/dialogs/alarm-page.c (clear_widgets): Set the default-to-add notification to be display a message 15 minutes before the start of the appointment. Fixes bug #7175. svn path=/trunk/; revision=12123
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/dialogs/alarm-page.c89
2 files changed, 54 insertions, 41 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 0cf0fc48f7..c40f527b6b 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2001-08-16 Federico Mena Quintero <federico@ximian.com>
+ * gui/dialogs/alarm-page.c (clear_widgets): Set the default-to-add
+ notification to be display a message 15 minutes before the start
+ of the appointment. Fixes bug #7175.
+
+2001-08-16 Federico Mena Quintero <federico@ximian.com>
+
* gui/dialogs/comp-editor-util.c (comp_editor_strip_categories):
New function to strip surrounding whitespace from a string of
categories entered by the user.
diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c
index fce8093149..1d3012fc9b 100644
--- a/calendar/gui/dialogs/alarm-page.c
+++ b/calendar/gui/dialogs/alarm-page.c
@@ -70,6 +70,47 @@ struct _AlarmPagePrivate {
gboolean updating;
};
+/* "relative" types */
+enum {
+ BEFORE,
+ AFTER
+};
+
+/* Time units */
+enum {
+ MINUTES,
+ HOURS,
+ DAYS
+};
+
+/* Option menu maps */
+static const int action_map[] = {
+ CAL_ALARM_DISPLAY,
+ CAL_ALARM_AUDIO,
+ CAL_ALARM_EMAIL,
+ CAL_ALARM_PROCEDURE,
+ -1
+};
+
+static const int value_map[] = {
+ MINUTES,
+ HOURS,
+ DAYS,
+ -1
+};
+
+static const int relative_map[] = {
+ BEFORE,
+ AFTER,
+ -1
+};
+
+static const int time_map[] = {
+ CAL_ALARM_TRIGGER_RELATIVE_START,
+ CAL_ALARM_TRIGGER_RELATIVE_END,
+ -1
+};
+
static void alarm_page_class_init (AlarmPageClass *class);
@@ -270,6 +311,13 @@ clear_widgets (AlarmPage *apage)
/* Start date */
gtk_label_set_text (GTK_LABEL (priv->date_time), "");
+ /* Sane defaults */
+ e_dialog_option_menu_set (priv->action, CAL_ALARM_DISPLAY, action_map);
+ e_dialog_spin_set (priv->interval_value, 15);
+ e_dialog_option_menu_set (priv->value_units, MINUTES, value_map);
+ e_dialog_option_menu_set (priv->relative, BEFORE, relative_map);
+ e_dialog_option_menu_set (priv->time, CAL_ALARM_TRIGGER_RELATIVE_START, time_map);
+
/* List data */
free_alarms (apage);
}
@@ -539,47 +587,6 @@ alarm_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-/* "relative" types */
-enum {
- BEFORE,
- AFTER
-};
-
-/* Time units */
-enum {
- MINUTES,
- HOURS,
- DAYS
-};
-
-/* Option menu maps */
-static const int action_map[] = {
- CAL_ALARM_DISPLAY,
- CAL_ALARM_AUDIO,
- CAL_ALARM_EMAIL,
- CAL_ALARM_PROCEDURE,
- -1
-};
-
-static const int value_map[] = {
- MINUTES,
- HOURS,
- DAYS,
- -1
-};
-
-static const int relative_map[] = {
- BEFORE,
- AFTER,
- -1
-};
-
-static const int time_map[] = {
- CAL_ALARM_TRIGGER_RELATIVE_START,
- CAL_ALARM_TRIGGER_RELATIVE_END,
- -1
-};
-
/* Gets the widgets from the XML file and returns if they are all available. */
static gboolean
get_widgets (AlarmPage *apage)