aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-06-08 04:46:06 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-06-08 04:46:06 +0000
commit1795b4e93920d0ab38ecc8011c8c0756e18df8dd (patch)
treeba56908426869e44d89b63e326a8a745b1f9cadd /src
parent68b391b5c17420988118f2152d90832472bbfc0b (diff)
added a new plug-in API: 'messagev-ew-show'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2887 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/messageview.c6
-rw-r--r--src/plugin-marshal.list1
-rw-r--r--src/plugin.c13
-rw-r--r--src/plugin.h5
4 files changed, 24 insertions, 1 deletions
diff --git a/src/messageview.c b/src/messageview.c
index fb312338..6e02d7c8 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2008 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2011 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -63,6 +63,7 @@
#include "gtkutils.h"
#include "utils.h"
#include "rfc2015.h"
+#include "plugin.h"
static GList *messageview_list = NULL;
@@ -533,6 +534,9 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
if (messageview->new_window)
messageview_set_menu_state(messageview);
+ syl_plugin_signal_emit("messageview-show", messageview, msginfo,
+ all_headers);
+
g_free(file);
return 0;
diff --git a/src/plugin-marshal.list b/src/plugin-marshal.list
index 2f6032ae..07b7f3de 100644
--- a/src/plugin-marshal.list
+++ b/src/plugin-marshal.list
@@ -1,3 +1,4 @@
VOID:POINTER
VOID:POINTER,POINTER,STRING,STRING,POINTER
BOOLEAN:POINTER,INT,INT,STRING,POINTER
+VOID:POINTER,POINTER,BOOLEAN
diff --git a/src/plugin.c b/src/plugin.c
index 9e152cd1..666a4fb2 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -37,6 +37,7 @@ enum {
COMPOSE_DESTROY,
TEXTVIEW_MENU_POPUP,
COMPOSE_SEND,
+ MESSAGEVIEW_SHOW,
LAST_SIGNAL
};
@@ -187,6 +188,18 @@ static void syl_plugin_class_init(SylPluginClass *klass)
G_TYPE_INT,
G_TYPE_STRING,
G_TYPE_POINTER);
+ plugin_signals[MESSAGEVIEW_SHOW] =
+ g_signal_new("messageview-show",
+ G_TYPE_FROM_CLASS(gobject_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET(SylPluginClass, messageview_show),
+ NULL, NULL,
+ syl_plugin_marshal_VOID__POINTER_POINTER_BOOLEAN,
+ G_TYPE_NONE,
+ 3,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER,
+ G_TYPE_BOOLEAN);
}
void syl_plugin_signal_connect(const gchar *name, GCallback callback,
diff --git a/src/plugin.h b/src/plugin.h
index 65497882..f966fd69 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -78,6 +78,11 @@ struct _SylPluginClass
gint send_mode,
const gchar *msg_file,
GSList *to_list);
+
+ void (* messageview_show) (GObject *obj,
+ gpointer msgview,
+ MsgInfo *msginfo,
+ gboolean all_headers);
};
struct _SylPluginInfo