aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-08-02 20:26:25 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-08-02 20:26:25 +0800
commitce4d96263c44a56d3ab00c4ca2ca70a680841a73 (patch)
tree98c45c865b42a2c7c47b17d12c3c8a4eca2f7c03
parent38251cc59311a338d7ed85611148acbb559abab9 (diff)
downloadgsoc2013-evolution-ce4d96263c44a56d3ab00c4ca2ca70a680841a73.tar
gsoc2013-evolution-ce4d96263c44a56d3ab00c4ca2ca70a680841a73.tar.gz
gsoc2013-evolution-ce4d96263c44a56d3ab00c4ca2ca70a680841a73.tar.bz2
gsoc2013-evolution-ce4d96263c44a56d3ab00c4ca2ca70a680841a73.tar.lz
gsoc2013-evolution-ce4d96263c44a56d3ab00c4ca2ca70a680841a73.tar.xz
gsoc2013-evolution-ce4d96263c44a56d3ab00c4ca2ca70a680841a73.tar.zst
gsoc2013-evolution-ce4d96263c44a56d3ab00c4ca2ca70a680841a73.zip
new util function to add information to an itip message that might not
2002-08-02 JP Rosevear <jpr@ximian.com> * gui/e-itip-control.c (adjust_item): new util function to add information to an itip message that might not already be there for display purposes (summary, location, etc) (show_current_event): use above (show_current_todo): ditto svn path=/trunk/; revision=17688
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/gui/e-itip-control.c77
2 files changed, 49 insertions, 36 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 397a414e7f..30a17649ed 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,13 @@
2002-08-02 JP Rosevear <jpr@ximian.com>
+ * gui/e-itip-control.c (adjust_item): new util function to add
+ information to an itip message that might not already be there for
+ display purposes (summary, location, etc)
+ (show_current_event): use above
+ (show_current_todo): ditto
+
+2002-08-02 JP Rosevear <jpr@ximian.com>
+
* gui/e-meeting-model.c (init): initialize value to corba nil
2002-08-01 Ettore Perazzoli <ettore@ximian.com>
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 4079204400..87f4124f19 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -1108,10 +1108,36 @@ get_real_item (EItipControl *itip)
}
static void
+adjust_item (EItipControl *itip, CalComponent *comp)
+{
+ CalComponent *real_comp;
+
+ real_comp = get_real_item (itip);
+ if (real_comp != NULL) {
+ CalComponentText text;
+ const char *string;
+ GSList *l;
+
+ cal_component_get_summary (real_comp, &text);
+ cal_component_set_summary (comp, &text);
+ cal_component_get_location (real_comp, &string);
+ cal_component_set_location (comp, string);
+ cal_component_get_description_list (real_comp, &l);
+ cal_component_set_description_list (comp, l);
+ cal_component_free_text_list (l);
+
+ gtk_object_unref (GTK_OBJECT (real_comp));
+ } else {
+ CalComponentText text = {_("Unknown"), NULL};
+
+ cal_component_set_summary (comp, &text);
+ }
+}
+
+static void
show_current_event (EItipControl *itip)
{
EItipControlPrivate *priv;
- CalComponent *comp;
const gchar *itip_title, *itip_desc;
char *options;
@@ -1141,33 +1167,23 @@ show_current_event (EItipControl *itip)
options = get_refresh_options ();
/* Provide extra info, since its not in the component */
- comp = get_real_item (itip);
- if (comp != NULL) {
- CalComponentText text;
- GSList *l;
-
- cal_component_get_summary (comp, &text);
- cal_component_set_summary (priv->comp, &text);
- cal_component_get_description_list (comp, &l);
- cal_component_set_description_list (priv->comp, l);
- cal_component_free_text_list (l);
-
- gtk_object_unref (GTK_OBJECT (comp));
- } else {
- CalComponentText text = {_("Unknown"), NULL};
-
- cal_component_set_summary (priv->comp, &text);
- }
+ adjust_item (itip, priv->comp);
break;
case ICAL_METHOD_REPLY:
itip_desc = U_("<b>%s</b> has replied to a meeting request.");
itip_title = U_("Meeting Reply");
options = get_reply_options ();
+
+ /* Provide extra info, since might not be in the component */
+ adjust_item (itip, priv->comp);
break;
case ICAL_METHOD_CANCEL:
itip_desc = U_("<b>%s</b> has cancelled a meeting.");
itip_title = U_("Meeting Cancellation");
options = get_cancel_options ();
+
+ /* Provide extra info, since might not be in the component */
+ adjust_item (itip, priv->comp);
break;
default:
itip_desc = U_("<b>%s</b> has sent an unintelligible message.");
@@ -1212,35 +1228,24 @@ show_current_todo (EItipControl *itip)
itip_title = U_("Task Update Request");
options = get_refresh_options ();
-
/* Provide extra info, since its not in the component */
- comp = get_real_item (itip);
- if (comp != NULL) {
- CalComponentText text;
- GSList *l;
-
- cal_component_get_summary (comp, &text);
- cal_component_set_summary (priv->comp, &text);
- cal_component_get_description_list (comp, &l);
- cal_component_set_description_list (priv->comp, l);
- cal_component_free_text_list (l);
-
- gtk_object_unref (GTK_OBJECT (comp));
- } else {
- CalComponentText text = {_("Unknown"), NULL};
-
- cal_component_set_summary (priv->comp, &text);
- }
+ adjust_item (itip, priv->comp);
break;
case ICAL_METHOD_REPLY:
itip_desc = U_("<b>%s</b> has replied to a task assignment.");
itip_title = U_("Task Reply");
options = get_reply_options ();
+
+ /* Provide extra info, since might not be in the component */
+ adjust_item (itip, priv->comp);
break;
case ICAL_METHOD_CANCEL:
itip_desc = U_("<b>%s</b> has cancelled a task.");
itip_title = U_("Task Cancellation");
options = get_cancel_options ();
+
+ /* Provide extra info, since might not be in the component */
+ adjust_item (itip, priv->comp);
break;
default:
itip_desc = U_("<b>%s</b> has sent an unintelligible message.");