aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-11-02 04:32:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-11-05 02:18:34 +0800
commita2e309c2a1735bd68b315aa971388e20db3a8621 (patch)
treed9da4a5546d45406b693e2893363a911b7eddd4b /calendar/gui/dialogs
parent6fdbedf62c34a78d403d0376a4403b2196da0385 (diff)
downloadgsoc2013-evolution-a2e309c2a1735bd68b315aa971388e20db3a8621.tar
gsoc2013-evolution-a2e309c2a1735bd68b315aa971388e20db3a8621.tar.gz
gsoc2013-evolution-a2e309c2a1735bd68b315aa971388e20db3a8621.tar.bz2
gsoc2013-evolution-a2e309c2a1735bd68b315aa971388e20db3a8621.tar.lz
gsoc2013-evolution-a2e309c2a1735bd68b315aa971388e20db3a8621.tar.xz
gsoc2013-evolution-a2e309c2a1735bd68b315aa971388e20db3a8621.tar.zst
gsoc2013-evolution-a2e309c2a1735bd68b315aa971388e20db3a8621.zip
Rename CalUnits to EDurationType.
And move the definition to e-util-enums.h so we get a GType for it.
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c10
-rw-r--r--calendar/gui/dialogs/event-page.c32
2 files changed, 21 insertions, 21 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 6316211c8a..f404d08927 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -45,12 +45,12 @@ static const gint time_division_map[] = {
/* The following two are kept separate in case we need to re-order each menu individually */
static const gint hide_completed_units_map[] = {
- CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1
+ E_DURATION_MINUTES, E_DURATION_HOURS, E_DURATION_DAYS, -1
};
/* same is used for Birthdays & Anniversaries calendar */
static const gint default_reminder_units_map[] = {
- CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1
+ E_DURATION_MINUTES, E_DURATION_HOURS, E_DURATION_DAYS, -1
};
static GtkVBoxClass *parent_class = NULL;
@@ -331,7 +331,7 @@ ba_reminder_interval_changed (GtkWidget *widget, CalendarPrefsDialog *prefs)
static void
ba_reminder_units_changed (GtkWidget *widget, CalendarPrefsDialog *prefs)
{
- CalUnits units = e_dialog_combo_box_get (prefs->ba_reminder_units, default_reminder_units_map);
+ EDurationType units = e_dialog_combo_box_get (prefs->ba_reminder_units, default_reminder_units_map);
calendar_config_set_ba_reminder (NULL, NULL, &units);
}
@@ -451,7 +451,7 @@ setup_changes (CalendarPrefsDialog *prefs)
static void
show_task_list_config (CalendarPrefsDialog *prefs)
{
- CalUnits units;
+ EDurationType units;
gboolean hide_completed_tasks;
/* Hide Completed Tasks. */
@@ -517,7 +517,7 @@ show_config (CalendarPrefsDialog *prefs)
{
gint time_divisions;
gboolean set = FALSE;
- CalUnits units;
+ EDurationType units;
gint interval;
/* Day's second zone */
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 94b25a0510..0418c7f5df 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -180,7 +180,7 @@ struct _EventPagePrivate {
ESendOptionsDialog *sod;
gchar *old_summary;
- CalUnits alarm_units;
+ EDurationType alarm_units;
gint alarm_interval;
/* This is TRUE if both the start & end timezone are the same. If the
@@ -517,7 +517,7 @@ clear_widgets (EventPage *epage)
}
static gboolean
-is_custom_alarm (ECalComponentAlarm *ca, gchar *old_summary, CalUnits user_units, gint user_interval, gint *alarm_type)
+is_custom_alarm (ECalComponentAlarm *ca, gchar *old_summary, EDurationType user_units, gint user_interval, gint *alarm_type)
{
ECalComponentAlarmTrigger trigger;
ECalComponentAlarmRepeat repeat;
@@ -600,7 +600,7 @@ is_custom_alarm (ECalComponentAlarm *ca, gchar *old_summary, CalUnits user_units
if (user_interval != -1) {
switch (user_units) {
- case CAL_DAYS:
+ case E_DURATION_DAYS:
if (trigger.u.rel_duration.days == user_interval
&& trigger.u.rel_duration.hours == 0
&& trigger.u.rel_duration.minutes == 0) {
@@ -610,7 +610,7 @@ is_custom_alarm (ECalComponentAlarm *ca, gchar *old_summary, CalUnits user_units
}
break;
- case CAL_HOURS:
+ case E_DURATION_HOURS:
if (trigger.u.rel_duration.days == 0
&& trigger.u.rel_duration.hours == user_interval
&& trigger.u.rel_duration.minutes == 0) {
@@ -620,7 +620,7 @@ is_custom_alarm (ECalComponentAlarm *ca, gchar *old_summary, CalUnits user_units
}
break;
- case CAL_MINUTES:
+ case E_DURATION_MINUTES:
if (trigger.u.rel_duration.days == 0
&& trigger.u.rel_duration.hours == 0
&& trigger.u.rel_duration.minutes == user_interval) {
@@ -636,7 +636,7 @@ is_custom_alarm (ECalComponentAlarm *ca, gchar *old_summary, CalUnits user_units
}
static gboolean
-is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, gchar *old_summary, CalUnits user_units, gint user_interval, gint *alarm_type)
+is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, gchar *old_summary, EDurationType user_units, gint user_interval, gint *alarm_type)
{
ECalComponentAlarm *ca;
gboolean result;
@@ -652,7 +652,7 @@ is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, gchar *old_summary
}
static gboolean
-is_custom_alarm_store (EAlarmList *alarm_list_store, gchar *old_summary, CalUnits user_units, gint user_interval, gint *alarm_type)
+is_custom_alarm_store (EAlarmList *alarm_list_store, gchar *old_summary, EDurationType user_units, gint user_interval, gint *alarm_type)
{
const ECalComponentAlarm *alarm;
GtkTreeModel *model;
@@ -1492,15 +1492,15 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
case ALARM_USER_TIME:
switch (calendar_config_get_default_reminder_units ()) {
- case CAL_DAYS:
+ case E_DURATION_DAYS:
trigger.u.rel_duration.days = priv->alarm_interval;
break;
- case CAL_HOURS:
+ case E_DURATION_HOURS:
trigger.u.rel_duration.hours = priv->alarm_interval;
break;
- case CAL_MINUTES:
+ case E_DURATION_MINUTES:
trigger.u.rel_duration.minutes = priv->alarm_interval;
break;
}
@@ -2744,15 +2744,15 @@ alarm_changed_cb (GtkWidget *widget,
case ALARM_USER_TIME:
e_alarm_list_clear (priv->alarm_list_store);
switch (calendar_config_get_default_reminder_units ()) {
- case CAL_DAYS:
+ case E_DURATION_DAYS:
trigger.u.rel_duration.days = priv->alarm_interval;
break;
- case CAL_HOURS:
+ case E_DURATION_HOURS:
trigger.u.rel_duration.hours = priv->alarm_interval;
break;
- case CAL_MINUTES:
+ case E_DURATION_MINUTES:
trigger.u.rel_duration.minutes = priv->alarm_interval;
break;
}
@@ -2992,19 +2992,19 @@ init_widgets (EventPage *epage)
combo_label = NULL;
switch (priv->alarm_units) {
- case CAL_DAYS:
+ case E_DURATION_DAYS:
if (priv->alarm_interval != 1) {
combo_label = g_strdup_printf (ngettext("%d day before appointment", "%d days before appointment", priv->alarm_interval), priv->alarm_interval);
}
break;
- case CAL_HOURS:
+ case E_DURATION_HOURS:
if (priv->alarm_interval != 1) {
combo_label = g_strdup_printf (ngettext("%d hour before appointment", "%d hours before appointment", priv->alarm_interval), priv->alarm_interval);
}
break;
- case CAL_MINUTES:
+ case E_DURATION_MINUTES:
if (priv->alarm_interval != 15) {
combo_label = g_strdup_printf (ngettext("%d minute before appointment", "%d minutes before appointment", priv->alarm_interval), priv->alarm_interval);
}