diff options
author | Jesse Pavel <jpavel@src.gnome.org> | 2000-11-07 00:23:10 +0800 |
---|---|---|
committer | Jesse Pavel <jpavel@src.gnome.org> | 2000-11-07 00:23:10 +0800 |
commit | 0981458bf8d699550bf4a6950300ba7a79a05845 (patch) | |
tree | 70a3732b846cae4fd50176be9adf0e9c32bd74e8 | |
parent | 7bf26ac21b6f29ead92fd5b28b463fe3671a9173 (diff) | |
download | gsoc2013-evolution-0981458bf8d699550bf4a6950300ba7a79a05845.tar.gz gsoc2013-evolution-0981458bf8d699550bf4a6950300ba7a79a05845.tar.zst gsoc2013-evolution-0981458bf8d699550bf4a6950300ba7a79a05845.zip |
added some checks for the type of an incoming iCal component before
passing it off to the CalComponent routines
svn path=/trunk/; revision=6415
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/e-itip-control.c | 36 | ||||
-rw-r--r-- | calendar/gui/e-meeting-edit.c | 2 |
3 files changed, 38 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 802f8601ac..7e78c470e5 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -18,6 +18,12 @@ * gui/Makefile.am: Clean the idl-generated sources properly. * cal-client/Makefile.am: Likewise. +2000-11-03 Jesse Pavel <jpavel@helixcode.com> + + * gui/e-itip-control.c: added some checks for the type of an + incoming iCal component before passing it off to the CalComponent + routines. + 2000-11-02 Federico Mena Quintero <federico@helixcode.com> * gui/dialogs/task-editor.c (init_widgets): The date editor's diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 28071be091..193667b9b7 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -206,6 +206,7 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, EItipControlPrivate *priv = data; gchar *vcalendar; gint pos, length, length2; + icalcomponent_kind comp_kind; if (type && g_strcasecmp (type, "text/calendar") != 0 && g_strcasecmp (type, "text/x-calendar") != 0) { @@ -249,11 +250,36 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, return; } - priv->cal_comp = cal_component_new (); - if (cal_component_set_icalcomponent (priv->cal_comp, priv->comp) == FALSE) { - g_printerr ("e-itip-control.c: I couldn't create a CalComponent from the iTip data.\n"); - gtk_object_unref (GTK_OBJECT (priv->cal_comp)); - } + comp_kind = icalcomponent_isa (priv->comp); + + switch (comp_kind) { + case ICAL_VEVENT_COMPONENT: + case ICAL_VTODO_COMPONENT: + case ICAL_VJOURNAL_COMPONENT: + priv->cal_comp = cal_component_new (); + if (cal_component_set_icalcomponent (priv->cal_comp, priv->comp) == FALSE) { + g_printerr ("e-itip-control.c: I couldn't create a CalComponent from the iTip data.\n"); + gtk_object_unref (GTK_OBJECT (priv->cal_comp)); + } + break; + case ICAL_VFREEBUSY_COMPONENT: + /* Take care of busy time information. */ + break; + default: + /* We don't know what this is, so bail. */ + { + GtkWidget *dialog; + + dialog = gnome_warning_dialog("I don't recognize this type of calendar component."); + gnome_dialog_run (GNOME_DIALOG(dialog)); + + g_free (vcalendar); + + return; + } + break; + } /* End switch. */ + /* Okay, good then; now I will pick apart the component to get all the things I'll show in my control. */ diff --git a/calendar/gui/e-meeting-edit.c b/calendar/gui/e-meeting-edit.c index 76e5e90143..107dfc66a3 100644 --- a/calendar/gui/e-meeting-edit.c +++ b/calendar/gui/e-meeting-edit.c @@ -688,7 +688,7 @@ send_button_clicked_cb (GtkWidget *widget, gpointer data) CORBA_free (description); CORBA_free (attach_data); - bonobo_object_unref (BONOBO_OBJECT (bonobo_server)); + /* bonobo_object_unref (BONOBO_OBJECT (bonobo_server)); */ } |