diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-01-06 08:42:40 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-01-06 08:42:40 +0000 |
commit | 07d534bd00afb989cfd472eb22f463d31be71b03 (patch) | |
tree | 76ec992f3c508b790d9f5ae4b7471ed18aaee7c0 /plugin/test | |
parent | a66da11c866424de50962209f38708a15b61b2d3 (diff) |
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
Diffstat (limited to 'plugin/test')
-rw-r--r-- | plugin/test/test.c | 21 |
1 files changed, 20 insertions, 1 deletions
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("<SummaryView>", "/---", NULL, NULL); syl_plugin_add_factory_item("<SummaryView>", "/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"); |