aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mail-to-meeting
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mail-to-meeting')
-rw-r--r--plugins/mail-to-meeting/ChangeLog77
-rw-r--r--plugins/mail-to-meeting/Makefile.am20
-rw-r--r--plugins/mail-to-meeting/mail-to-meeting.c185
-rw-r--r--plugins/mail-to-meeting/org-gnome-mail-to-meeting.eplug.xml25
4 files changed, 0 insertions, 307 deletions
diff --git a/plugins/mail-to-meeting/ChangeLog b/plugins/mail-to-meeting/ChangeLog
deleted file mode 100644
index b30a1eac71..0000000000
--- a/plugins/mail-to-meeting/ChangeLog
+++ /dev/null
@@ -1,77 +0,0 @@
-2009-03-26 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #576696
-
- * mail-to-meeting.c: (add_attendee_cb): Set mandatory properties.
-
-2009-01-21 Milan Crha <mcrha@redhat.com>
-
- * Makefile.am: Use also EVOLUTION_CALENDAR_CFLAGS.
-
-2008-08-27 Sankar P <psankar@novell.com>
-
-License Changes
-
- * mail-to-meeting.c:
-
-2008-08-12 Bharath Acharya <abharath@novell.com>
-
- * Makefile.am: Use NO_UNDEFINED. Link with more libraries. To generate
- dlls on Windows.
-
-2007-11-05 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #353779
-
- * org-gnome-mail-to-meeting.eplug.xml:
- Allow convert more than one mail to meeting with one click.
-
-2007-06-07 Gilles Dartiguelongue <dartigug@esiee.fr>
-
- * mail-to-meeting.c: (add_attendee_cb): more compilation
- warnings cleanup, completes bug #437584 fixes
-
-2007-04-02 Sankar P <psankar@novell.com>
-
- * Committed on behalf of Gilles Dartiguelongue <dartigug@esiee.fr>
-
- * org-gnome-mail-to-meeting.eplug.xml:
- Cleanup.
- Fixes part of #301149
-
-2005-05-11 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am: added built_sources/cleanfiles
-
-2005-05-06 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am:
-
- * org-gnome-mail-to-meeting.eplug.xml: s/.in/.xml/ & i18n.
-
-2005-02-24 Björn Torkelsson <torkel@acc.umu.se>
-
- * org-gnome-mail-to-meeting.eplug.in: Shortened the name and added
- a . to the end of the description.
-
-2004-11-04 Rodrigo Moya <rodrigo@novell.com>
-
- * org-gnome-mail-to-meeting.eplug.in: fixed description and added
- author's info, to display correctly on the plugin manager.
-
-2004-11-03 Not Zed <NotZed@Ximian.com>
-
- * org-gnome-mail-to-meeting.eplug.in: fix the popup id.
-
-2004-11-01 JP Rosevear <jpr@novell.com>
-
- * Makefile.am: dist .eplug.in file
-
-2004-10-29 Rodrigo Moya <rodrigo@novell.com>
-
- * org-gnome-mail-to-meeting.eplug.in: fix folder view popup id and
- use stock icon for meetings.
-
-2004-10-29 Rodrigo Moya <rodrigo@novell.com>
-
- * added mail-to-meeting plugin, to convert mails to meetings.
diff --git a/plugins/mail-to-meeting/Makefile.am b/plugins/mail-to-meeting/Makefile.am
deleted file mode 100644
index f3b8f44985..0000000000
--- a/plugins/mail-to-meeting/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- $(EVOLUTION_CALENDAR_CFLAGS) \
- $(EVOLUTION_MAIL_CFLAGS)
-
-@EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-mail-to-meeting.eplug
-plugin_LTLIBRARIES = liborg-gnome-mail-to-meeting.la
-
-liborg_gnome_mail_to_meeting_la_SOURCES = mail-to-meeting.c
-liborg_gnome_mail_to_meeting_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-liborg_gnome_mail_to_meeting_la_LIBADD = \
- $(EVOLUTION_CALENDAR_LIBS) \
- $(EVOLUTION_MAIL_LIBS)
-
-EXTRA_DIST = org-gnome-mail-to-meeting.eplug.xml
-
-BUILT_SOURCES = $(plugin_DATA)
-CLEANFILES = $(BUILT_SOURCES)
diff --git a/plugins/mail-to-meeting/mail-to-meeting.c b/plugins/mail-to-meeting/mail-to-meeting.c
deleted file mode 100644
index a23d4d7d4a..0000000000
--- a/plugins/mail-to-meeting/mail-to-meeting.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Rodrigo Moya <rodrigo@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <glib/gi18n-lib.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <gconf/gconf-client.h>
-#include <libecal/e-cal.h>
-#include <libedataserverui/e-source-selector-dialog.h>
-#include "camel/camel-folder.h"
-#include "camel/camel-mime-message.h"
-#include "mail/em-popup.h"
-
-static void
-add_attendee_cb (gpointer key, gpointer value, gpointer user_data)
-{
- ECalComponentAttendee *ca;
- const char *str, *name;
- GSList **attendees = user_data;
-
- if (!camel_internet_address_get (value, 0, &name, &str))
- return;
-
- ca = g_new0 (ECalComponentAttendee, 1);
- ca->value = str;
- ca->cn = name;
- ca->cutype = ICAL_CUTYPE_INDIVIDUAL;
- ca->status = ICAL_PARTSTAT_NEEDSACTION;
- ca->role = ICAL_ROLE_REQPARTICIPANT;
-
- /* FIXME: user prepend and reverse list order (GList) */
- *attendees = g_slist_append (*attendees, ca);
-}
-
-static void
-set_attendees (ECalComponent *comp, CamelMimeMessage *message)
-{
- GSList *attendees = NULL, *l;
-
- g_hash_table_foreach (message->recipients, (GHFunc) add_attendee_cb, &attendees);
- e_cal_component_set_attendee_list (comp, attendees);
-
- for (l = attendees; l != NULL; l = l->next)
- g_free (l->data);
- g_slist_free (attendees);
-}
-
-static void
-set_organizer (ECalComponent *comp, CamelMimeMessage *message)
-{
- const CamelInternetAddress *address;
- const char *str, *name;
- ECalComponentOrganizer organizer = {NULL, NULL, NULL, NULL};
-
- if (message->reply_to)
- address = message->reply_to;
- else if (message->from)
- address = message->from;
- else
- return;
-
- if (!camel_internet_address_get (address, 0, &name, &str))
- return;
-
- organizer.value = str;
- organizer.cn = name;
- e_cal_component_set_organizer (comp, &organizer);
-}
-
-static void
-do_mail_to_meeting (EMPopupTargetSelect *t, ESource *meeting_source)
-{
- ECal *client;
-
- /* open the meeting client */
- client = e_cal_new (meeting_source, E_CAL_SOURCE_TYPE_EVENT);
- if (e_cal_open (client, FALSE, NULL)) {
- int i;
-
- for (i = 0; i < (t->uids ? t->uids->len : 0); i++) {
- CamelMimeMessage *message;
- ECalComponent *comp;
- ECalComponentText text;
- GSList sl;
- char *str;
-
- /* retrieve the message from the CamelFolder */
- message = camel_folder_get_message (t->folder, g_ptr_array_index (t->uids, i), NULL);
- if (!message)
- continue;
-
- comp = e_cal_component_new ();
- e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
- e_cal_component_set_uid (comp, camel_mime_message_get_message_id (message));
-
- /* set the meeting's summary */
- text.value = camel_mime_message_get_subject (message);
- text.altrep = NULL;
- e_cal_component_set_summary (comp, &text);
-
- /* FIXME: a better way to get the full body */
- str = camel_mime_message_build_mbox_from (message);
- text.value = str;
- sl.next = NULL;
- sl.data = &text;
- e_cal_component_set_description_list (comp, &sl);
-
- g_free (str);
-
- /* set the organizer, and the attendees */
- set_organizer (comp, message);
- set_attendees (comp, message);
-
- /* save the meeting to the selected source */
- e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL);
-
- g_object_unref (comp);
- }
- }
-
- /* free memory */
- g_object_unref (client);
-}
-
-void org_gnome_mail_to_meeting (void *ep, EMPopupTargetSelect *t);
-
-void
-org_gnome_mail_to_meeting (void *ep, EMPopupTargetSelect *t)
-{
- GtkWidget *dialog;
- GConfClient *conf_client;
- ESourceList *source_list;
-
- /* ask the user which meeting list to save to */
- conf_client = gconf_client_get_default ();
- source_list = e_source_list_new_for_gconf (conf_client, "/apps/evolution/calendar/sources");
-
- dialog = e_source_selector_dialog_new (NULL, source_list);
-
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
- ESource *source;
-
- /* if a source has been selected, perform the mail2meeting operation */
- source = e_source_selector_dialog_peek_primary_selection (E_SOURCE_SELECTOR_DIALOG (dialog));
- if (source)
- do_mail_to_meeting (t, source);
- }
-
- g_object_unref (conf_client);
- g_object_unref (source_list);
- gtk_widget_destroy (dialog);
-}
-
-int e_plugin_lib_enable(EPluginLib *ep, int enable);
-
-int
-e_plugin_lib_enable(EPluginLib *ep, int enable)
-{
- return 0;
-}
diff --git a/plugins/mail-to-meeting/org-gnome-mail-to-meeting.eplug.xml b/plugins/mail-to-meeting/org-gnome-mail-to-meeting.eplug.xml
deleted file mode 100644
index febad83f17..0000000000
--- a/plugins/mail-to-meeting/org-gnome-mail-to-meeting.eplug.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<e-plugin-list>
- <e-plugin
- type="shlib"
- id="org.gnome.evolution.plugin.mailToMeeting"
- location="@PLUGINDIR@/liborg-gnome-mail-to-meeting@SOEXT@"
- _name="Mail to meeting">
- <_description>A plugin which allows the creation of meetings from the contents of a mail message.</_description>
- <author name="Rodrigo Moya" email="rodrigo@novell.com"/>
-
- <!-- hook into the uri popup menu -->
- <hook class="org.gnome.evolution.mail.popup:1.0">
- <menu id="org.gnome.evolution.mail.folderview.popup" target="select">
- <item
- type="item"
- path="72.mail_to_meeting"
- icon="stock_new-meeting"
- _label="Con_vert to Meeting"
- enable="many"
- visible="many"
- activate="org_gnome_mail_to_meeting"/>
- </menu>
- </hook>
- </e-plugin>
-</e-plugin-list>