diff options
author | Parthasarathi Susarla <ajaysusarla@gmail.com> | 2006-11-29 02:26:29 +0800 |
---|---|---|
committer | Parthasarathi Susarla <saps@src.gnome.org> | 2006-11-29 02:26:29 +0800 |
commit | b4300c6748056cf795acf70b57a33c19a7f5671f (patch) | |
tree | 2dfd6ae31a7b9f0bca5ba712fc4de9411c040be5 /plugins | |
parent | be47ead6e12de0a4c98e841a5231ee5960ea291e (diff) | |
download | gsoc2013-evolution-b4300c6748056cf795acf70b57a33c19a7f5671f.tar gsoc2013-evolution-b4300c6748056cf795acf70b57a33c19a7f5671f.tar.gz gsoc2013-evolution-b4300c6748056cf795acf70b57a33c19a7f5671f.tar.bz2 gsoc2013-evolution-b4300c6748056cf795acf70b57a33c19a7f5671f.tar.lz gsoc2013-evolution-b4300c6748056cf795acf70b57a33c19a7f5671f.tar.xz gsoc2013-evolution-b4300c6748056cf795acf70b57a33c19a7f5671f.tar.zst gsoc2013-evolution-b4300c6748056cf795acf70b57a33c19a7f5671f.zip |
** Fix bug #348679
2006-11-28 Parthasarathi Susarla <ajaysusarla@gmail.com>
** Fix bug #348679
* icsimporter.c: (org_gnome_evolution_import_ics_attachment):
Do not access structure elements directly. Use the methods of the
class in the CamelDataWrapper Class
svn path=/trunk/; revision=33030
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/import-ics-attachments/ChangeLog | 8 | ||||
-rw-r--r-- | plugins/import-ics-attachments/icsimporter.c | 25 |
2 files changed, 23 insertions, 10 deletions
diff --git a/plugins/import-ics-attachments/ChangeLog b/plugins/import-ics-attachments/ChangeLog index fa9b3b820b..a6f2ee81f0 100644 --- a/plugins/import-ics-attachments/ChangeLog +++ b/plugins/import-ics-attachments/ChangeLog @@ -1,3 +1,11 @@ +2006-11-28 Parthasarathi Susarla <ajaysusarla@gmail.com> + + ** Fix bug #348679 + + * icsimporter.c: (org_gnome_evolution_import_ics_attachment): + Do not access structure elements directly. Use the methods of the + class in the CamelDataWrapper Class + 2006-08-28 Kjartan Maraas <kmaraas@gnome.org> * org-gnome-evolution-mail-attachments-import-ics.eplug.xml: Mark diff --git a/plugins/import-ics-attachments/icsimporter.c b/plugins/import-ics-attachments/icsimporter.c index f9986d7294..1ffaa563de 100644 --- a/plugins/import-ics-attachments/icsimporter.c +++ b/plugins/import-ics-attachments/icsimporter.c @@ -95,23 +95,28 @@ void org_gnome_evolution_import_ics_attachments (EPlugin *ep, EMPopupTargetAttac icalcomponent_kind kind; int len = 0; int i = 0; + CamelContentType *type; len = g_slist_length(t->attachments); - if (len !=1 || !camel_content_type_is(((CamelDataWrapper *) ((EAttachment *) t->attachments->data)->body)->mime_type, "text", "calendar")) + if (len != 1) return; - + + type = camel_data_wrapper_get_mime_type_field (((CamelDataWrapper *) ((EAttachment *) t->attachments->data)->body)); + if (type && camel_content_type_is(type, "text", "calendar")) { + kind = get_menu_type (t); - if (kind == ICAL_VTODO_COMPONENT ) { - for (i = 0; i < sizeof (popup_tasks_items) / sizeof (popup_tasks_items[0]); i++) - menus = g_slist_prepend (menus, &popup_tasks_items[i]); - } else if ( kind == ICAL_VEVENT_COMPONENT) { - for (i = 0; i < sizeof (popup_calendar_items) / sizeof (popup_calendar_items[0]); i++) - menus = g_slist_prepend (menus, &popup_calendar_items[i]); - } + if (kind == ICAL_VTODO_COMPONENT ) { + for (i = 0; i < sizeof (popup_tasks_items) / sizeof (popup_tasks_items[0]); i++) + menus = g_slist_prepend (menus, &popup_tasks_items[i]); + } else if ( kind == ICAL_VEVENT_COMPONENT) { + for (i = 0; i < sizeof (popup_calendar_items) / sizeof (popup_calendar_items[0]); i++) + menus = g_slist_prepend (menus, &popup_calendar_items[i]); + } - e_popup_add_items (t->target.popup, menus, NULL, popup_free, t); + e_popup_add_items (t->target.popup, menus, NULL, popup_free, t); + } } void org_gnome_evolution_import_ics_part (EPlugin*ep, EMPopupTargetPart *t) |