[evolution-patches] patch for #44723
- From: Rodrigo Moya <rodrigo ximian com>
- To: Evolution Patches <evolution-patches ximian com>
- Subject: [evolution-patches] patch for #44723
- Date: 25 Jun 2003 19:46:39 +0200
? gui/alarm-notify/alarm-notify.gladep
? gui/dialogs/alarm-options.gladep
? gui/dialogs/alarm-page.gladep
? gui/dialogs/cal-prefs-dialog.gladep
? gui/dialogs/e-delegate-dialog.gladep
? gui/dialogs/event-page.gladep
? gui/dialogs/meeting-page.gladep
? gui/dialogs/recurrence-page.gladep
? gui/dialogs/schedule-page.gladep
? gui/dialogs/task-details-page.gladep
? gui/dialogs/task-page.gladep
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1802
diff -u -p -r1.1802 ChangeLog
--- ChangeLog 25 Jun 2003 16:08:55 -0000 1.1802
+++ ChangeLog 25 Jun 2003 17:44:16 -0000
@@ -1,3 +1,14 @@
+2003-06-25 Rodrigo Moya <rodrigo ximian com>
+
+ Fixes #44723
+
+ * gui/dialogs/alarm-page.c: added a new field to the private structure
+ to keep track of the old summary.
+ (alarm_page_init): initialize new field.
+ (alarm_page_finalize): free new field.
+ (alarm_page_set_summary): iterate over the list of alarms to change
+ their description if it was the same as the event's summary.
+
2003-06-25 Bolian Yin <bolian yin sun com>
Fixes #45275
Index: gui/dialogs/alarm-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/alarm-page.c,v
retrieving revision 1.33
diff -u -p -r1.33 alarm-page.c
--- gui/dialogs/alarm-page.c 11 Apr 2003 10:41:37 -0000 1.33
+++ gui/dialogs/alarm-page.c 25 Jun 2003 17:44:17 -0000
@@ -80,6 +80,9 @@ struct _AlarmPagePrivate {
EAlarmList *list_store;
gboolean updating;
+
+ /* Old summary, to detect changes */
+ gchar *old_summary;
};
/* "relative" types */
@@ -218,6 +221,7 @@ alarm_page_init (AlarmPage *apage)
icalcomponent_add_property (icalcomp, icalprop);
priv->updating = FALSE;
+ priv->old_summary = NULL;
}
/* Destroy handler for the alarm page */
@@ -251,6 +255,11 @@ alarm_page_finalize (GObject *object)
priv->list_store = NULL;
}
+ if (priv->old_summary) {
+ g_free (priv->old_summary);
+ priv->old_summary = NULL;
+ }
+
g_free (priv);
apage->priv = NULL;
@@ -499,6 +508,39 @@ alarm_page_set_summary (CompEditorPage *
priv = apage->priv;
gtk_label_set_text (GTK_LABEL (priv->summary), summary);
+
+ /* iterate over all alarms */
+ if (priv->old_summary) {
+ GtkTreeView *view;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ gboolean valid_iter;
+
+ view = GTK_TREE_VIEW (priv->list);
+ model = GTK_TREE_MODEL (priv->list_store);
+
+ for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
+ valid_iter = gtk_tree_model_iter_next (model, &iter)) {
+ CalComponentAlarm *alarm;
+ CalComponentText desc;
+
+ alarm = (CalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
+ g_assert (alarm != NULL);
+
+ cal_component_alarm_get_description (alarm, &desc);
+ if (desc.value && *desc.value) {
+ if (!strcmp (desc.value, priv->old_summary)) {
+ desc.value = summary;
+ cal_component_alarm_set_description (alarm, &desc);
+ }
+ }
+ }
+
+ g_free (priv->old_summary);
+ }
+
+ /* update old summary */
+ priv->old_summary = g_strdup (summary);
}
/* set_dates handler for the alarm page */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]