From 07d534bd00afb989cfd472eb22f463d31be71b03 Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 6 Jan 2012 08:42:40 +0000 Subject: added new plug-in signals to notify start and end of receiving. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3005 ee746299-78ed-0310-b773-934348b2243d --- plugin/test/test.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'plugin/test') diff --git a/plugin/test/test.c b/plugin/test/test.c index 7a2b4631..a7e63ebe 100644 --- a/plugin/test/test.c +++ b/plugin/test/test.c @@ -28,7 +28,7 @@ static SylPluginInfo info = { "Test Plugin", - "3.1.0", + "3.2.0", "Hiroyuki Yamamoto", "Test plug-in for Sylpheed plug-in system" }; @@ -56,6 +56,8 @@ static gboolean compose_send_cb(GObject *obj, gpointer compose, const gchar *msg_file, GSList *to_list); static void messageview_show_cb(GObject *obj, gpointer msgview, MsgInfo *msginfo, gboolean all_headers); +static void inc_start_cb(GObject *obj, PrefsAccount *ac); +static void inc_finished_cb(GObject *obj, gint new_messages); static void create_window(void); static void create_folderview_sub_widget(void); @@ -109,6 +111,10 @@ void plugin_load(void) G_CALLBACK(compose_send_cb), NULL); syl_plugin_signal_connect("messageview-show", G_CALLBACK(messageview_show_cb), NULL); + syl_plugin_signal_connect("inc-mail-start", + G_CALLBACK(inc_start_cb), NULL); + syl_plugin_signal_connect("inc-mail-finished", + G_CALLBACK(inc_finished_cb), NULL); syl_plugin_add_factory_item("", "/---", NULL, NULL); syl_plugin_add_factory_item("", "/Test Plug-in menu", @@ -247,6 +253,19 @@ static void messageview_show_cb(GObject *obj, gpointer msgview, msginfo && msginfo->subject ? msginfo->subject : ""); } +static void inc_start_cb(GObject *obj, PrefsAccount *ac) +{ + if (ac) + g_print("test: receive start: account: %s\n", ac->account_name); + else + g_print("test: receive start: all accounts\n"); +} + +static void inc_finished_cb(GObject *obj, gint new_messages) +{ + g_print("test: received %d new messages\n", new_messages); +} + static void button_clicked(GtkWidget *widget, gpointer data) { g_print("button_clicked\n"); -- cgit v1.2.3