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 /src/compose.c | |
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 'src/compose.c')
-rw-r--r-- | src/compose.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/compose.c b/src/compose.c index 79e2fd91..32858e15 100644 --- a/src/compose.c +++ b/src/compose.c @@ -3444,6 +3444,7 @@ static gint compose_send(Compose *compose) { gchar tmp[MAXPATHLEN + 1]; gint ok = 0; + gboolean ack = TRUE; if (compose->lock_count > 0) return 1; @@ -3490,6 +3491,14 @@ static gint compose_send(Compose *compose) g_warning(_("can't get recipient list.")); g_unlink(tmp); compose_unlock(compose); + return 1; + } + + syl_plugin_signal_emit("compose-send", compose, compose->mode, 0, + tmp, compose->to_list, &ack); + if (ack == FALSE) { + g_unlink(tmp); + compose_unlock(compose); return -1; } @@ -7204,6 +7213,7 @@ static void compose_send_later_cb(gpointer data, guint action, Compose *compose = (Compose *)data; FolderItem *queue; gchar tmp[MAXPATHLEN + 1]; + gboolean ack = TRUE; if (compose_check_entries(compose) == FALSE) return; @@ -7236,8 +7246,22 @@ static void compose_send_later_cb(gpointer data, guint action, } } + if (!compose->to_list && !compose->newsgroup_list) { + g_warning("can't get recipient list."); + g_unlink(tmp); + return; + } + + syl_plugin_signal_emit("compose-send", compose, compose->mode, 1, + tmp, compose->to_list, &ack); + if (ack == FALSE) { + g_unlink(tmp); + return; + } + if (compose_queue(compose, tmp) < 0) { alertpanel_error(_("Can't queue the message.")); + g_unlink(tmp); return; } |