aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/attachment-reminder
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-09 04:06:54 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-09 04:06:54 +0800
commit301528d84bf582d956c0e9b768e4f60259f0cf88 (patch)
tree805da1fd93810067b918d8467f4b753cf9c68180 /plugins/attachment-reminder
parent3615c9dbb4749849de6ea7d913b5c9bc73ba70ce (diff)
downloadgsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.tar
gsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.tar.gz
gsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.tar.bz2
gsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.tar.lz
gsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.tar.xz
gsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.tar.zst
gsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.zip
Commit for tnef attachment and attachment reminder
svn path=/trunk/; revision=33769
Diffstat (limited to 'plugins/attachment-reminder')
-rw-r--r--plugins/attachment-reminder/ChangeLog9
-rw-r--r--plugins/attachment-reminder/Makefile.am46
-rw-r--r--plugins/attachment-reminder/apps-evolution-attachment-reminder.schemas.in.in41
-rw-r--r--plugins/attachment-reminder/attachment-reminder.c418
-rw-r--r--plugins/attachment-reminder/attachment-reminder.glade180
-rw-r--r--plugins/attachment-reminder/org-gnome-attachment-reminder.errors.xml10
-rw-r--r--plugins/attachment-reminder/org-gnome-evolution-attachment-reminder.eplug.xml28
7 files changed, 732 insertions, 0 deletions
diff --git a/plugins/attachment-reminder/ChangeLog b/plugins/attachment-reminder/ChangeLog
new file mode 100644
index 0000000000..c1b47e9e58
--- /dev/null
+++ b/plugins/attachment-reminder/ChangeLog
@@ -0,0 +1,9 @@
+2007-07-09 Johnny Jacob <jjohnny@novell.com>
+
+ ** Added attachment Reminder plugins
+ * apps-evolution-attachment-reminder.schemas.in.in:
+ * org-gnome-evolution-attachment-reminder.eplug.xml:
+ * attachment-reminder.c:
+ * Makefile.am:
+ * attachment-reminder.glade:
+ * org-gnome-attachment-reminder.errors.xml:
diff --git a/plugins/attachment-reminder/Makefile.am b/plugins/attachment-reminder/Makefile.am
new file mode 100644
index 0000000000..46eb95ad9f
--- /dev/null
+++ b/plugins/attachment-reminder/Makefile.am
@@ -0,0 +1,46 @@
+INCLUDES = \
+ -I$(top_builddir)/composer \
+ -I$(top_srcdir) \
+ $(EVOLUTION_MAIL_CFLAGS) \
+ -DEVOLUTION_PLUGINDIR="\"$(plugindir)\""
+
+error_DATA = \
+ org-gnome-attachment-reminder.errors.xml
+
+
+errordir = $(privdatadir)/errors
+
+
+@EVO_PLUGIN_RULE@
+
+plugin_DATA = \
+ org-gnome-evolution-attachment-reminder.eplug \
+ attachment-reminder.glade
+
+plugin_LTLIBRARIES = liborg-gnome-evolution-attachment-reminder.la
+
+liborg_gnome_evolution_attachment_reminder_la_SOURCES = attachment-reminder.c
+liborg_gnome_evolution_attachment_reminder_la_LDFLAGS = -module -avoid-version
+
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_in_files = apps-evolution-attachment-reminder.schemas.in.in
+schema_DATA = $(schema_in_files:.schemas.in.in=-$(BASE_VERSION).schemas)
+
+%-$(BASE_VERSION).schemas.in: %.schemas.in.in
+ cp $< $@
+
+@INTLTOOL_SCHEMAS_RULE@
+
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
+ done \
+ fi
+
+EXTRA_DIST = org-gnome-evolution-attachment-reminder.eplug.xml \
+ $(error_DATA)
+
+CLEANFILES = org-gnome-evolution-attachment-reminder.eplug
+
+DISTCLEANFILES = $(schema_DATA)
diff --git a/plugins/attachment-reminder/apps-evolution-attachment-reminder.schemas.in.in b/plugins/attachment-reminder/apps-evolution-attachment-reminder.schemas.in.in
new file mode 100644
index 0000000000..e8b62241e4
--- /dev/null
+++ b/plugins/attachment-reminder/apps-evolution-attachment-reminder.schemas.in.in
@@ -0,0 +1,41 @@
+<gconfschemafile>
+ <schemalist>
+ <schema>
+ <key>/schemas/apps/evolution/mail/prompts/attachment_presend_check</key>
+ <applyto>/apps/evolution/mail/prompts/attachment_presend_check</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Enable attachment reminder plugin</short>
+ <long>Enable attachment reminder plugin</long>
+ </locale>
+ </schema>
+
+
+ <!-- Labels and Colours -->
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/attachment_reminder_clues</key>
+ <applyto>/apps/evolution/mail/attachment_reminder_clues</applyto>
+ <owner>evolution-mail</owner>
+ <type>list</type>
+ <list_type>string</list_type>
+
+ <!-- The following are the keywords used by the plugin to understand
+ whether the user wanted to send a attachment. The list can have any
+ number of strings.-->
+
+ <default>[attachment,attaching,attached,enclosed]</default>
+ <locale name="C">
+ <short>List of clues for the attachment reminder plugin to look for
+ in a message body</short>
+ <long>
+ List of clues for the attachment reminder plugin to look for
+ in a message body
+ </long>
+ </locale>
+ </schema>
+ </schemalist>
+</gconfschemafile>
+
diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c
new file mode 100644
index 0000000000..562aa08f71
--- /dev/null
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -0,0 +1,418 @@
+ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Author: Johnny Jacob <jjohnny@novell.com>
+ *
+ * Copyright 2007 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include <string.h>
+
+#include <gconf/gconf-client.h>
+
+#include <e-util/e-config.h>
+#include <mail/em-config.h>
+#include <mail/em-event.h>
+#include <camel/camel-mime-message.h>
+#include <camel/camel-medium.h>
+#include <camel/camel-mime-message.h>
+#include <camel/camel-multipart.h>
+#include <camel/camel-stream.h>
+#include <camel/camel-stream-mem.h>
+#include <camel/camel-mime-message.h>
+#include <camel/camel-multipart.h>
+
+#include <e-util/e-error.h>
+#include <mail/em-utils.h>
+
+#include "composer/e-msg-composer.h"
+#include "composer/e-msg-composer-attachment-bar.h"
+#include "widgets/misc/e-attachment-bar.h"
+
+#define GCONF_KEY_ATTACHMENT_REMINDER "/apps/evolution/mail/prompts/attachment_presend_check"
+#define GCONF_KEY_ATTACH_REMINDER_CLUES "/apps/evolution/mail/attachment_reminder_clues"
+
+typedef struct {
+ GConfClient *gconf;
+ GtkWidget *treeview;
+ GtkWidget *clue_add;
+ GtkWidget *clue_edit;
+ GtkWidget *clue_remove;
+ GtkWidget *clue_container;
+} UIData;
+
+
+enum {
+ CLUE_KEYWORD_COLUMN,
+ CLUE_N_COLUMNS,
+};
+
+int e_plugin_lib_enable (EPluginLib *ep, int enable);
+void org_gnome_evolution_attachment_reminder (EPlugin *ep, EMEventTargetComposer *t);
+static gboolean ask_for_missing_attachment (GtkWindow *widget);
+static gboolean check_for_attachment_clues (gchar *msg);
+static gboolean check_for_attachment (EMsgComposer *composer);
+static gchar* strip_text_msg (gchar *msg);
+static void toggle_cb (GtkWidget *widget, UIData *ui);
+static void commit_changes (UIData *ui);
+
+static void cell_edited_callback (GtkCellRendererText *cell, gchar *path_string,
+ gchar *new_text,UIData *ui);
+
+static GtkListStore *store = NULL;
+
+int
+e_plugin_lib_enable (EPluginLib *ep, int enable)
+{
+ return 0;
+}
+
+void org_gnome_evolution_attachment_reminder (EPlugin *ep, EMEventTargetComposer *t)
+{
+ GConfClient *gconf;
+ char *rawstr = NULL, *filtered_str = NULL;
+ gint parts = 2;
+
+ gconf = gconf_client_get_default ();
+ if (!gconf_client_get_bool (gconf, GCONF_KEY_ATTACHMENT_REMINDER, NULL))
+ {
+ g_object_unref (gconf);
+ return;
+ }
+ else
+ g_object_unref (gconf);
+
+ rawstr = g_strdup (e_msg_composer_get_raw_message_text (t->composer));
+
+ filtered_str = strip_text_msg (rawstr);
+
+ g_free (rawstr);
+
+ /* Set presend_check_status for the composer*/
+ if (check_for_attachment_clues (filtered_str) && !check_for_attachment (t->composer))
+ if (!ask_for_missing_attachment ((GtkWindow *)t->composer))
+ g_object_set_data ((GObject *) t->composer, "presend_check_status", GINT_TO_POINTER(1));
+
+ g_free (filtered_str);
+
+ return ;
+}
+
+static gboolean ask_for_missing_attachment (GtkWindow *window)
+{
+ return em_utils_prompt_user(window, GCONF_KEY_ATTACHMENT_REMINDER ,"org.gnome.evolution.plugins.attachment_reminder:attachment-reminder", NULL);
+}
+
+/* check for the clues */
+static gboolean check_for_attachment_clues (gchar *msg)
+{
+ //TODO : Add more strings. RegEx ???
+
+ GConfClient *gconf;
+ GSList *clue_list = NULL;
+
+ gconf = gconf_client_get_default ();
+
+ //Get the list from gconf
+ clue_list = gconf_client_get_list ( gconf, GCONF_KEY_ATTACH_REMINDER_CLUES, GCONF_VALUE_STRING, NULL );
+
+ guint msg_length = strlen (msg);
+
+ for (;clue_list;clue_list=g_slist_next(clue_list)) {
+ if (g_strstr_len (msg, msg_length, g_utf8_strdown (clue_list->data, g_utf8_strlen (clue_list->data, -1) ) ))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* check for the any attachment */
+static gboolean check_for_attachment (EMsgComposer *composer)
+{
+ EAttachmentBar* bar = e_msg_composer_get_attachment_bar (composer);
+
+ if (e_attachment_bar_get_num_attachments (bar))
+ return TRUE;
+
+ return FALSE;
+}
+
+static gchar* strip_text_msg (gchar *msg)
+{
+ gchar **lines = g_strsplit ( msg, "\n", -1);
+ gchar *stripped_msg = g_strdup (" ");
+
+ guint i=0;
+
+ while (lines [i])
+ {
+ if (lines [i] != NULL && !g_str_has_prefix (g_strstrip(lines[i]), ">"))
+ {
+ gchar *temp = stripped_msg;
+ stripped_msg = g_strconcat (" ", stripped_msg, lines[i], NULL);
+
+ g_free (temp);
+ }
+ i++;
+ }
+
+ g_strfreev (lines);
+
+ return g_utf8_strdown (stripped_msg, g_utf8_strlen (stripped_msg, -1));
+}
+
+static void
+commit_changes (UIData *ui)
+{
+ GtkTreeModel *model = NULL;
+ GSList *clue_list = NULL;
+ GtkTreeIter iter;
+ gboolean valid;
+ GConfClient *client;
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview));
+ valid = gtk_tree_model_get_iter_first (model, &iter);
+
+ while (valid) {
+ char *keyword;
+
+ gtk_tree_model_get (model, &iter, CLUE_KEYWORD_COLUMN, &keyword, -1);
+ clue_list = g_slist_append (clue_list, keyword);
+ valid = gtk_tree_model_iter_next (model, &iter);
+ }
+
+ client = gconf_client_get_default ();
+ gconf_client_set_list (client, GCONF_KEY_ATTACH_REMINDER_CLUES, GCONF_VALUE_STRING, clue_list, NULL);
+
+ g_slist_foreach (clue_list, (GFunc) g_free, NULL);
+ g_slist_free (clue_list);
+}
+
+static void cell_edited_callback (GtkCellRendererText *cell,
+ gchar *path_string,
+ gchar *new_text,
+ UIData *ui)
+{
+ GtkTreePath *path;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview));
+
+ gtk_tree_model_get_iter_from_string (model, &iter, path_string);
+
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ CLUE_KEYWORD_COLUMN, new_text, -1);
+
+ commit_changes (ui);
+}
+
+static void
+clue_add_clicked (GtkButton *button, UIData *ui)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ gchar *new_clue = NULL;
+ GtkTreeViewColumn *focus_col;
+ GtkTreePath *path;
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview));
+
+ //TODO : Trim and check for blank strings
+ new_clue = g_strdup ("");
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ CLUE_KEYWORD_COLUMN, new_clue, -1);
+
+ focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (ui->treeview), CLUE_KEYWORD_COLUMN);
+ path = gtk_tree_model_get_path (model, &iter);
+
+ if (path) {
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (ui->treeview), path, focus_col, TRUE);
+
+ }
+
+}
+
+static void
+clue_remove_clicked (GtkButton *button, UIData *ui)
+{
+ GtkTreeSelection *selection;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ gint len;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview));
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+ return;
+
+ gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+
+ len = gtk_tree_model_iter_n_children (model, NULL);
+ if (len > 0) {
+ gtk_tree_selection_select_iter (selection, &iter);
+ } else {
+ gtk_widget_set_sensitive (ui->clue_edit, FALSE);
+ gtk_widget_set_sensitive (ui->clue_remove, FALSE);
+ }
+
+ commit_changes (ui);
+}
+
+static void
+clue_edit_clicked (GtkButton *button, UIData *ui)
+{
+ GtkTreeSelection *selection;
+ GtkTreeModel *model;
+ GtkTreePath *path;
+ GtkTreeIter iter;
+ GtkTreeViewColumn *focus_col;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview));
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+ return;
+
+ focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (ui->treeview), CLUE_KEYWORD_COLUMN);
+ path = gtk_tree_model_get_path (model, &iter);
+
+ if (path) {
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (ui->treeview), path, focus_col, TRUE);
+
+ gtk_tree_path_free (path);
+ }
+}
+
+
+static void
+toggle_cb (GtkWidget *widget, UIData *ui)
+{
+
+ gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ GConfClient *gconf = gconf_client_get_default();
+
+ gconf_client_set_bool (gconf, GCONF_KEY_ATTACHMENT_REMINDER, active, NULL);
+ gtk_widget_set_sensitive (ui->clue_container, active);
+}
+
+static void
+selection_changed (GtkTreeSelection *selection, UIData *ui)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+ gtk_widget_set_sensitive (ui->clue_edit, TRUE);
+ gtk_widget_set_sensitive (ui->clue_remove, TRUE);
+ } else {
+ gtk_widget_set_sensitive (ui->clue_edit, FALSE);
+ gtk_widget_set_sensitive (ui->clue_remove, FALSE);
+ }
+}
+
+/* Configuration in Mail Prefs Page goes here */
+
+GtkWidget *
+org_gnome_attachment_reminder_config_option (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
+{
+ GtkWidget *check;
+ GtkVBox *parent_container = (GtkVBox *) (data->parent);
+ GladeXML *xml;
+ GtkCellRenderer *renderer;
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ GConfClient *gconf = gconf_client_get_default();
+ GtkWidget *hbox, *vbox, *button;
+ GSList *clue_list = NULL;
+ gboolean enable_ui;
+
+ UIData *ui = g_new0 (UIData, 1);
+
+ char *gladefile;
+
+ gladefile = g_build_filename (EVOLUTION_PLUGINDIR,
+ "attachment-reminder.glade",
+ NULL);
+ xml = glade_xml_new (gladefile, "reminder_configuration_box", NULL);
+ g_free (gladefile);
+
+ if (data->old)
+ return data->old;
+
+
+ ui->gconf = gconf_client_get_default ();
+ enable_ui = gconf_client_get_bool (ui->gconf, GCONF_KEY_ATTACHMENT_REMINDER, NULL);
+
+ ui->treeview = glade_xml_get_widget (xml, "clue_treeview");
+
+ if (store == NULL)
+ store = gtk_list_store_new (CLUE_N_COLUMNS, G_TYPE_STRING);
+ else
+ gtk_list_store_clear (store);
+
+ gtk_tree_view_set_model (GTK_TREE_VIEW (ui->treeview), GTK_TREE_MODEL (store));
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (ui->treeview), -1, _("Keywords"),
+ renderer, "text", CLUE_KEYWORD_COLUMN, NULL);
+ g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
+ g_signal_connect(renderer, "edited", (GCallback) cell_edited_callback, ui);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview));
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+ g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK (selection_changed), ui);
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (ui->treeview), TRUE);
+
+ ui->clue_add = glade_xml_get_widget (xml, "clue_add");
+ g_signal_connect (G_OBJECT (ui->clue_add), "clicked", G_CALLBACK (clue_add_clicked), ui);
+
+ ui->clue_remove = glade_xml_get_widget (xml, "clue_remove");
+ g_signal_connect (G_OBJECT (ui->clue_remove), "clicked", G_CALLBACK (clue_remove_clicked), ui);
+ gtk_widget_set_sensitive (ui->clue_remove, FALSE);
+
+ ui->clue_edit = glade_xml_get_widget (xml, "clue_edit");
+ g_signal_connect (G_OBJECT (ui->clue_edit), "clicked", G_CALLBACK (clue_edit_clicked), ui);
+ gtk_widget_set_sensitive (ui->clue_edit, FALSE);
+
+ /* Populate tree view with values from gconf */
+ clue_list = gconf_client_get_list ( gconf, GCONF_KEY_ATTACH_REMINDER_CLUES, GCONF_VALUE_STRING, NULL );
+
+ while (clue_list){
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ CLUE_KEYWORD_COLUMN, clue_list->data, -1);
+
+ clue_list = g_slist_next (clue_list);
+ }
+
+ /* Enable / Disable */
+ gconf = gconf_client_get_default ();
+ button = glade_xml_get_widget (xml, "reminder_enable_check");
+ gtk_toggle_button_set_active (button , enable_ui);
+ g_signal_connect (G_OBJECT (button), "toggled", toggle_cb, ui);
+
+ /* Add the list here */
+ ui->clue_container = glade_xml_get_widget (xml, "clue_container");
+ gtk_widget_set_sensitive (ui->clue_container, enable_ui);
+
+ hbox = glade_xml_get_widget (xml, "reminder_configuration_box");
+ gtk_box_pack_start (parent_container, hbox, FALSE, FALSE, 0);
+ gtk_widget_show_all (hbox);
+
+ return (GtkWidget *)check;
+}
+
diff --git a/plugins/attachment-reminder/attachment-reminder.glade b/plugins/attachment-reminder/attachment-reminder.glade
new file mode 100644
index 0000000000..82d905685d
--- /dev/null
+++ b/plugins/attachment-reminder/attachment-reminder.glade
@@ -0,0 +1,180 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="window1">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">window1</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="reminder_configuration_box">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="reminder_enable_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Remind missing attachments</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="clue_container">
+ <property name="visible">True</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">3</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">7</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="clue_treeview">
+ <property name="border_width">1</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkButton" id="clue_add">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="clue_edit">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-edit</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="clue_remove">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_padding">12</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/plugins/attachment-reminder/org-gnome-attachment-reminder.errors.xml b/plugins/attachment-reminder/org-gnome-attachment-reminder.errors.xml
new file mode 100644
index 0000000000..f27f71b12e
--- /dev/null
+++ b/plugins/attachment-reminder/org-gnome-attachment-reminder.errors.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<error-list domain="org.gnome.evolution.plugins.attachment_reminder">
+ <error id="attachment-reminder" type="info">
+ <primary>Attachment Reminder</primary>
+ <secondary>Looks like you have missed the attachments</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button response="GTK_RESPONSE_YES" label="_Send"></button>
+ </error>
+</error-list>
diff --git a/plugins/attachment-reminder/org-gnome-evolution-attachment-reminder.eplug.xml b/plugins/attachment-reminder/org-gnome-evolution-attachment-reminder.eplug.xml
new file mode 100644
index 0000000000..6d6a3e4d82
--- /dev/null
+++ b/plugins/attachment-reminder/org-gnome-evolution-attachment-reminder.eplug.xml
@@ -0,0 +1,28 @@
+<e-plugin-list>
+ <e-plugin
+ type="shlib"
+ id="org.gnome.evolution.attachment-reminder"
+ _name="Attachment Reminder"
+ location="@PLUGINDIR@/liborg-gnome-evolution-attachment-reminder@SOEXT@">
+
+ <_description>Looks for clues in a message for mention of
+ attachments and warns if the attachment is missing</_description>
+
+ <author name="Johnny Jacob" email="jjohnny@novell.com"/>
+
+ <hook class="org.gnome.evolution.mail.events:1.0">
+ <event
+ id="composer.presendchecks"
+ handle="org_gnome_evolution_attachment_reminder"
+ target="message"
+ />
+ </hook>
+
+ <hook class="org.gnome.evolution.mail.config:1.0">
+ <group target="prefs" id="org.gnome.evolution.mail.composerPrefs">
+ <item type="section" path="00.general/10.alerts/" factory="org_gnome_attachment_reminder_config_option"/>
+ </group>
+ </hook>
+
+ </e-plugin>
+</e-plugin-list>