diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-06-08 02:20:00 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-06-08 02:20:00 +0000 |
commit | 68b391b5c17420988118f2152d90832472bbfc0b (patch) | |
tree | 071ca7de27edf78e7d82522bd6b9c92265a45dda /plugin | |
parent | 17399356e839cf4a4d6ca12d52086fe01b857881 (diff) |
added a new plug-in API: 'compose-send'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2886 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/test/test.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugin/test/test.c b/plugin/test/test.c index 858f2f35..99fbecd4 100644 --- a/plugin/test/test.c +++ b/plugin/test/test.c @@ -51,6 +51,9 @@ static void menu_selected_cb(void); static void compose_created_cb(GObject *obj, gpointer compose); static void compose_destroy_cb(GObject *obj, gpointer compose); +static gboolean compose_send_cb(GObject *obj, gpointer compose, + gint compose_mode, gint send_mode, + const gchar *msg_file, GSList *to_list); static void create_window(void); static void create_folderview_sub_widget(void); @@ -100,6 +103,8 @@ void plugin_load(void) G_CALLBACK(compose_created_cb), NULL); syl_plugin_signal_connect("compose-destroy", G_CALLBACK(compose_destroy_cb), NULL); + syl_plugin_signal_connect("compose-send", + G_CALLBACK(compose_send_cb), NULL); syl_plugin_add_factory_item("<SummaryView>", "/---", NULL, NULL); syl_plugin_add_factory_item("<SummaryView>", "/Test Plug-in menu", @@ -219,6 +224,17 @@ static void compose_destroy_cb(GObject *obj, gpointer compose) g_print("test: %p: compose will be destroyed (%p)\n", obj, compose); } +static gboolean compose_send_cb(GObject *obj, gpointer compose, + gint compose_mode, gint send_mode, + const gchar *msg_file, GSList *to_list) +{ + g_print("test: %p: composed message will be sent (%p)\n", obj, compose); + g_print("test: compose_mode: %d, send_mode: %d, file: %s\n", + compose_mode, send_mode, msg_file); + + return TRUE; /* return FALSE to cancel sending */ +} + static void button_clicked(GtkWidget *widget, gpointer data) { g_print("button_clicked\n"); |