Index: calendar/gui/dialogs/cal-prefs-dialog.c
===================================================================
--- calendar/gui/dialogs/cal-prefs-dialog.c	(revision 35977)
+++ calendar/gui/dialogs/cal-prefs-dialog.c	(working copy)
@@ -50,6 +50,7 @@ static const int hide_completed_units_ma
 	CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1
 };
 
+/* same is used for Birthdays & Anniversaries calendar */
 static const int default_reminder_units_map[] = {
 	CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1
 };
@@ -314,6 +315,34 @@ default_reminder_units_changed (GtkWidge
 }
 
 static void
+ba_reminder_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs)
+{
+	gboolean enabled = gtk_toggle_button_get_active (toggle);
+
+	calendar_config_set_ba_reminder (&enabled, NULL, NULL);
+}
+
+static void
+ba_reminder_interval_changed (GtkWidget *widget, CalendarPrefsDialog *prefs)
+{
+	const gchar *str;
+	int value;
+
+	str = gtk_entry_get_text (GTK_ENTRY (widget));
+	value = (int) g_ascii_strtod (str, NULL);
+
+	calendar_config_set_ba_reminder (NULL, &value, NULL);
+}
+
+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);
+
+	calendar_config_set_ba_reminder (NULL, NULL, &units);
+}
+
+static void
 alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs)
 {
 	ESourceList *source_list = prefs->alarms_list;
@@ -405,6 +434,11 @@ setup_changes (CalendarPrefsDialog *pref
 			  G_CALLBACK (default_reminder_interval_changed), prefs);
 	g_signal_connect (G_OBJECT (prefs->default_reminder_units), "changed", G_CALLBACK (default_reminder_units_changed), prefs);
 
+	g_signal_connect (G_OBJECT (prefs->ba_reminder), "toggled", G_CALLBACK (ba_reminder_toggled), prefs);
+	g_signal_connect (G_OBJECT (prefs->ba_reminder_interval), "changed",
+			  G_CALLBACK (ba_reminder_interval_changed), prefs);
+	g_signal_connect (G_OBJECT (prefs->ba_reminder_units), "changed", G_CALLBACK (ba_reminder_units_changed), prefs);
+
 	g_signal_connect (G_OBJECT (prefs->alarm_list_widget), "selection_changed", G_CALLBACK (alarms_selection_changed), prefs);
 
 
@@ -498,6 +532,8 @@ show_config (CalendarPrefsDialog *prefs)
 	gboolean sensitive, set = FALSE;
 	icalcomponent *icalcomp, *dl_comp;
 	char *location;
+	CalUnits units;
+	int interval;
 
 	/* Timezone. */
 	location = calendar_config_get_timezone ();
@@ -570,6 +606,13 @@ show_config (CalendarPrefsDialog *prefs)
 	e_dialog_toggle_set (prefs->default_reminder, calendar_config_get_use_default_reminder ());
 	e_dialog_spin_set (prefs->default_reminder_interval, calendar_config_get_default_reminder_interval ());
 	e_dialog_combo_box_set (prefs->default_reminder_units, calendar_config_get_default_reminder_units (), default_reminder_units_map);
+
+	/* Birthdays & Anniversaries reminder */
+	set = calendar_config_get_ba_reminder (&interval, &units);
+
+	e_dialog_toggle_set (prefs->ba_reminder, set);
+	e_dialog_spin_set (prefs->ba_reminder_interval, interval);
+	e_dialog_combo_box_set (prefs->ba_reminder_units, units, default_reminder_units_map);
 }
 
 /* plugin meta-data */
@@ -650,6 +693,9 @@ calendar_prefs_dialog_construct (Calenda
 	prefs->default_reminder = glade_xml_get_widget (gui, "default_reminder");
 	prefs->default_reminder_interval = glade_xml_get_widget (gui, "default_reminder_interval");
 	prefs->default_reminder_units = glade_xml_get_widget (gui, "default_reminder_units");
+	prefs->ba_reminder = glade_xml_get_widget (gui, "ba_reminder");
+	prefs->ba_reminder_interval = glade_xml_get_widget (gui, "ba_reminder_interval");
+	prefs->ba_reminder_units = glade_xml_get_widget (gui, "ba_reminder_units");
 
 	/* Display tab */
 	prefs->time_divisions = glade_xml_get_widget (gui, "time_divisions");
Index: calendar/gui/dialogs/cal-prefs-dialog.h
===================================================================
--- calendar/gui/dialogs/cal-prefs-dialog.h	(revision 35977)
+++ calendar/gui/dialogs/cal-prefs-dialog.h	(working copy)
@@ -56,6 +56,9 @@ struct _CalendarPrefsDialog {
 	GtkWidget *default_reminder;
 	GtkWidget *default_reminder_interval;
 	GtkWidget *default_reminder_units;
+	GtkWidget *ba_reminder;
+	GtkWidget *ba_reminder_interval;
+	GtkWidget *ba_reminder_units;
 
 	/* Display tab */
 	GtkWidget *time_divisions;
Index: calendar/gui/dialogs/cal-prefs-dialog.glade
===================================================================
--- calendar/gui/dialogs/cal-prefs-dialog.glade	(revision 35977)
+++ calendar/gui/dialogs/cal-prefs-dialog.glade	(working copy)
@@ -864,6 +864,98 @@ Days</property>
 		      <property name="fill">True</property>
 		    </packing>
 		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox25">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">4</property>
+
+		      <child>
+			<widget class="GtkCheckButton" id="ba_reminder">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Show a _reminder</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="ba_reminder_interval">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">False</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">0 0 9999 1 10 10</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkComboBox" id="ba_reminder_units">
+			  <property name="visible">True</property>
+			  <property name="items" translatable="yes">Minutes
+Hours
+Days</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="ba_reminder_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">before every anniversary/birthday</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
Index: calendar/gui/calendar-config-keys.h
===================================================================
--- calendar/gui/calendar-config-keys.h	(revision 35977)
+++ calendar/gui/calendar-config-keys.h	(working copy)
@@ -92,6 +92,11 @@ G_BEGIN_DECLS
 #define CALENDAR_CONFIG_TEMPLATE CALENDAR_CONFIG_PREFIX"/publish/template"
 
 #define CALENDAR_CONFIG_SAVE_DIR CALENDAR_CONFIG_PREFIX"/audio_dir"
+
+/* Birthday & Anniversary reminder */
+#define CALENDAR_CONFIG_BA_REMINDER CALENDAR_CONFIG_PREFIX "/other/use_ba_reminder"
+#define CALENDAR_CONFIG_BA_REMINDER_INTERVAL CALENDAR_CONFIG_PREFIX "/other/ba_reminder_interval"
+#define CALENDAR_CONFIG_BA_REMINDER_UNITS CALENDAR_CONFIG_PREFIX "/other/ba_reminder_units"
 G_END_DECLS
 
 #endif
Index: calendar/gui/calendar-config.c
===================================================================
--- calendar/gui/calendar-config.c	(revision 35977)
+++ calendar/gui/calendar-config.c	(working copy)
@@ -114,6 +114,22 @@ units_to_string (CalUnits units)
 	}
 }
 
+/* opposite function to 'units_to_string' */
+static CalUnits
+string_to_units (const char *units)
+{
+	CalUnits res;
+
+	if (units && !strcmp (units, "days"))
+		res = CAL_DAYS;
+	else if (units && !strcmp (units, "hours"))
+		res = CAL_HOURS;
+	else
+		res = CAL_MINUTES;
+
+	return res;
+}
+
 /*
  * Calendar Settings.
  */
@@ -1485,13 +1501,7 @@ calendar_config_get_default_reminder_uni
 	calendar_config_init ();
 
 	units = gconf_client_get_string (config, CALENDAR_CONFIG_DEFAULT_REMINDER_UNITS, NULL);
-
-	if (units && !strcmp (units, "days"))
-		cu = CAL_DAYS;
-	else if (units && !strcmp (units, "hours"))
-		cu = CAL_HOURS;
-	else
-		cu = CAL_MINUTES;
+	cu = string_to_units (units);
 	g_free (units);
 
 	return cu;
@@ -1512,6 +1522,59 @@ calendar_config_set_default_reminder_uni
 }
 
 /**
+ * calendar_config_get_ba_reminder:
+ * Retrieves setup of the Birthdays & Anniversaries reminder.
+ *
+ * @interval: Retrieves the interval setup for the reminder; can be NULL.
+ * @units: Retrieves units for the interval; can be NULL.
+ *
+ * Returns whether the reminder is on or off. The values for interval and/or units
+ * are retrieved even when returns FALSE.
+ **/
+gboolean
+calendar_config_get_ba_reminder (int *interval, CalUnits *units)
+{
+	calendar_config_init ();
+
+	if (interval) {
+		*interval = gconf_client_get_int (config, CALENDAR_CONFIG_BA_REMINDER_INTERVAL, NULL);
+	}
+
+	if (units) {
+		char *str;
+
+		str = gconf_client_get_string (config, CALENDAR_CONFIG_BA_REMINDER_UNITS, NULL);
+		*units = string_to_units (str);
+		g_free (str);
+	}
+
+	return gconf_client_get_bool (config, CALENDAR_CONFIG_BA_REMINDER, NULL);
+}
+
+/**
+ * calendar_config_set_ba_reminder:
+ * Stores new values for Birthdays & Anniversaries reminder to GConf. Only those, which are not NULL.
+ *
+ * @enabled: The enabled state; can be NULL.
+ * @interval: The reminder interval; can be NULL.
+ * @units: The units of the reminder; can be NULL.
+ **/
+void
+calendar_config_set_ba_reminder (gboolean *enabled, int *interval, CalUnits *units)
+{
+	calendar_config_init ();
+
+	if (enabled)
+		gconf_client_set_bool (config, CALENDAR_CONFIG_BA_REMINDER, *enabled, NULL);
+
+	if (interval)
+		gconf_client_set_int (config, CALENDAR_CONFIG_BA_REMINDER_INTERVAL, *interval, NULL);
+
+	if (units)
+		gconf_client_set_string (config, CALENDAR_CONFIG_BA_REMINDER_UNITS, units_to_string (*units), NULL);
+}
+
+/**
  * calendar_config_get_hide_completed_tasks_sexp:
  *
  * @get_completed: Whether to form subexpression that
Index: calendar/gui/calendar-config.h
===================================================================
--- calendar/gui/calendar-config.h	(revision 35977)
+++ calendar/gui/calendar-config.h	(working copy)
@@ -263,4 +263,8 @@ gboolean calendar_config_get_daylight_sa
 void calendar_config_set_daylight_saving (gboolean daylight_saving);
 guint calendar_config_add_notification_daylight_saving (GConfClientNotifyFunc func, gpointer data);
 
+/* Birthdays & Anniversaries reminder settings */
+gboolean calendar_config_get_ba_reminder (int *interval, CalUnits *units);
+void calendar_config_set_ba_reminder (gboolean *enabled, int *interval, CalUnits *units);
+
 #endif /* _CALENDAR_CONFIG_H_ */
Index: calendar/ChangeLog
===================================================================
--- calendar/ChangeLog	(revision 35977)
+++ calendar/ChangeLog	(working copy)
@@ -1,4 +1,22 @@
-2008-08-15  Chenthill Palanisamy  <pchenthill@novell.com>
+2008-08-14  Milan Crha  <mcrha@redhat.com>
+
+	** Part of fix for bug #260853
+
+	* gui/calendar-config-keys.h:
+	* gui/calendar-config.h:
+	(calendar_config_get_ba_reminder), (calendar_config_set_ba_reminder):
+	* gui/calendar-config.c:
+	(calendar_config_get_ba_reminder), (calendar_config_set_ba_reminder),
+	(string_to_units), (calendar_config_get_default_reminder_units):
+	* gui/dialogs/cal-prefs-dialog.glade:
+	* gui/dialogs/cal-prefs-dialog.h: (struct _CalendarPrefsDialog):
+	* gui/dialogs/cal-prefs-dialog.c: (ba_reminder_toggled),
+	(ba_reminder_interval_changed), (ba_reminder_units_changed),
+	(setup_changes), (show_config), (calendar_prefs_dialog_construct):
+	User interface and related function to allow use change setup of
+	the alarm for Birthdays and Anniversaries calendar.
+
+2008-08-13  Chenthill Palanisamy  <pchenthill@novell.com>
 
 	Fixes #347287
 	* gui/e-cal-list-view-config.c: (e_cal_list_view_config_set_view):
