aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2004-11-17 12:03:45 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-11-17 12:03:45 +0800
commit3fcd1c267b6855465f9c11d79b64c8a704e87148 (patch)
treea935691f52767092bc38625dc9f4879fafdf5e99 /plugins
parentd4db79eeccaea372e8d31c29a572cb143f60f37d (diff)
downloadgsoc2013-evolution-3fcd1c267b6855465f9c11d79b64c8a704e87148.tar.gz
gsoc2013-evolution-3fcd1c267b6855465f9c11d79b64c8a704e87148.tar.zst
gsoc2013-evolution-3fcd1c267b6855465f9c11d79b64c8a704e87148.zip
no changelog provided
svn path=/trunk/; revision=27934
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mailing-list-actions/mailing-list-actions.c26
-rw-r--r--plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml6
-rw-r--r--plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml.h4
-rw-r--r--plugins/mailing-list-actions/org-gnome-mailing-list-actions.eplug.in46
-rw-r--r--plugins/mailing-list-actions/org-gnome-mailing-list-actions.xml32
5 files changed, 49 insertions, 65 deletions
diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c
index c8b0e15ea8..7d32c2ce87 100644
--- a/plugins/mailing-list-actions/mailing-list-actions.c
+++ b/plugins/mailing-list-actions/mailing-list-actions.c
@@ -4,9 +4,6 @@
* This file is licensed under the GNU GPL v2 or later
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
#include <glib/gi18n-lib.h>
#include <stdio.h>
#include <string.h>
@@ -95,13 +92,13 @@ void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage
{
emla_action_data *action_data = (emla_action_data *) data;
EmlaAction action = action_data->action;
- const char* header = NULL, *headerpos, *fromurl = NULL;
+ const char* header = NULL, *headerpos;
char *end, *url = NULL;
int t;
GError *err;
EMsgComposer *composer;
int send_message_response;
- EAccount *account = NULL;
+ EAccount *account;
for (t = 0; t < emla_n_action_headers; t++) {
if (emla_action_headers[t].action == action &&
@@ -140,29 +137,20 @@ void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage
url[end-headerpos] = '\0';
if (strncmp (url, "mailto:", 6) == 0) {
- if (emla_action_headers[t].interactive) {
+ if (emla_action_headers[t].interactive)
send_message_response = GTK_RESPONSE_NO;
- } else {
- fromurl = camel_mime_message_get_source (msg);
- account = mail_config_get_account_by_source_url (fromurl);
- if (!account) {
- fromurl = action_data->uri;
- account = mail_config_get_account_by_source_url (fromurl);
- }
- send_message_response = e_error_run (NULL, "org.gnome.mailing-list-actions:ask-send-message",
- (account && account->id && account->id->address) ? account->id->address : "(default e-mail)",
- url, NULL);
- }
+ else
+ send_message_response = e_error_run (NULL, "org.gnome.mailing-list-actions:ask-send-message", url, NULL);
if (send_message_response == GTK_RESPONSE_YES) {
/* directly send message */
composer = e_msg_composer_new_from_url (url);
- if (account)
+ if ((account = mail_config_get_account_by_source_url (action_data->uri)))
e_msg_composer_hdrs_set_from_account ((EMsgComposerHdrs *) composer->hdrs, account->name);
em_utils_composer_send_cb (composer, NULL);
} else if (send_message_response == GTK_RESPONSE_NO) {
/* show composer */
- em_utils_compose_new_message_with_mailto (url, fromurl);
+ em_utils_compose_new_message_with_mailto (url, action_data->uri);
}
goto exit;
diff --git a/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml b/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml
index 2a7192638f..69b20fa834 100644
--- a/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml
+++ b/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml
@@ -13,12 +13,12 @@
<error id="ask-send-message" type="question" default="GTK_RESPONSE_YES">
<primary>Send e-mail message to mailing list?</primary>
- <secondary>An e-mail message will be sent to the URL "{1}", using the e-mail address "{0}". You can either send the message automatically, or see and change it first.
+ <secondary>An e-mail message will be sent to the URL "{0}". You can either send the message automatically, or see and change it first.
You should receive an answer from the mailing list shortly after the message has been sent.</secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button label="_Edit message" response="GTK_RESPONSE_NO"/>
<button label="_Send message" response="GTK_RESPONSE_YES"/>
+ <button label="_Edit message" response="GTK_RESPONSE_NO"/>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
</error>
<error id="malformed-header" type="error">
diff --git a/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml.h b/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml.h
index 9518fc4318..a5bbbbcc20 100644
--- a/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml.h
+++ b/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml.h
@@ -9,11 +9,11 @@ char *s = N_("Posting to this mailing list is not allowed. Possibly, this is a r
/* org.gnome.mailing-list-actions:ask-send-message primary */
char *s = N_("Send e-mail message to mailing list?");
/* org.gnome.mailing-list-actions:ask-send-message secondary */
-char *s = N_("An e-mail message will be sent to the URL \"{1}\", using the e-mail address \"{0}\". You can either send the message automatically, or see and change it first.\n"
+char *s = N_("An e-mail message will be sent to the URL \"{0}\". You can either send the message automatically, or see and change it first.\n"
"\n"
"You should receive an answer from the mailing list shortly after the message has been sent.");
-char *s = N_("_Edit message");
char *s = N_("_Send message");
+char *s = N_("_Edit message");
/* org.gnome.mailing-list-actions:malformed-header primary */
char *s = N_("Malformed header");
/* org.gnome.mailing-list-actions:malformed-header secondary */
diff --git a/plugins/mailing-list-actions/org-gnome-mailing-list-actions.eplug.in b/plugins/mailing-list-actions/org-gnome-mailing-list-actions.eplug.in
index d8418bff75..749bc9fdc3 100644
--- a/plugins/mailing-list-actions/org-gnome-mailing-list-actions.eplug.in
+++ b/plugins/mailing-list-actions/org-gnome-mailing-list-actions.eplug.in
@@ -5,38 +5,38 @@
id="org.gnome.plugin.mailing-list.actions"
domain="eplug-mailing-list-actions"
location="@PLUGINDIR@/liborg-gnome-mailing-list-actions.so"
- name="Mailing List Actions">
- <author name="Meilof Veeningen" email="meilof@wanadoo.nl"/>
- <description>Provide actions for common mailing list commands such as subscribing, unsubscribing and posting to the mailing list</description>
+ name="Mailing List Actions plugin"
+ description="Provide actions for common mailing list commands (subscribe, unsubscribe, ...)">
<hook class="org.gnome.evolution.mail.bonobomenu:1.0">
<menu id="org.gnome.evolution.mail.browser" target="select">
<ui file="@PLUGINDIR@/org-gnome-mailing-list-actions.xml"/>
- <item type="item" verb="ListHelp" path="/commands/ListHelp" enable="mailing_list" activate="emla_list_help"/>
- <item type="item" verb="ListSubscribe" path="/commands/ListSubscribe" enable="mailing_list" activate="emla_list_subscribe"/>
- <item type="item" verb="ListUnsubscribe" path="/commands/ListUnsubscribe" enable="mailing_list" activate="emla_list_unsubscribe"/>
- <item type="item" verb="ListPost" path="/commands/ListPost" enable="mailing_list" activate="emla_list_post"/>
- <item type="item" verb="ListOwner" path="/commands/ListOwner" enable="mailing_list" activate="emla_list_owner"/>
- <item type="item" verb="ListArchive" path="/commands/ListArchive" enable="mailing_list" activate="emla_list_archive"/>
+ <item type="item" verb="ListHelp" path="/commands/ListHelp" visible="mailing_list" activate="emla_list_help"/>
+ <item type="item" verb="ListSubscribe" path="/commands/ListSubscribe" visible="mailing_list" activate="emla_list_subscribe"/>
+ <item type="item" verb="ListUnsubscribe" path="/commands/ListUnsubscribe" visible="mailing_list" activate="emla_list_unsubscribe"/>
+ <item type="item" verb="ListPost" path="/commands/ListPost" visible="mailing_list" activate="emla_list_post"/>
+ <item type="item" verb="ListOwner" path="/commands/ListOwner" visible="mailing_list" activate="emla_list_owner"/>
+ <item type="item" verb="ListArchive" path="/commands/ListArchive" visible="mailing_list" activate="emla_list_archive"/>
</menu>
<menu id="org.gnome.evolution.mail.messagebrowser" target="select">
<ui file="@PLUGINDIR@/org-gnome-mailing-list-actions.xml"/>
- <item type="item" verb="ListHelp" path="/commands/ListHelp" enable="mailing_list" activate="emla_list_help"/>
- <item type="item" verb="ListSubscribe" path="/commands/ListSubscribe" enable="mailing_list" activate="emla_list_subscribe"/>
- <item type="item" verb="ListUnsubscribe" path="/commands/ListUnsubscribe" enable="mailing_list" activate="emla_list_unsubscribe"/>
- <item type="item" verb="ListPost" path="/commands/ListPost" enable="mailing_list" activate="emla_list_post"/>
- <item type="item" verb="ListOwner" path="/commands/ListOwner" enable="mailing_list" activate="emla_list_owner"/>
- <item type="item" verb="ListArchive" path="/commands/ListArchive" enable="mailing_list" activate="emla_list_archive"/>
+ <item type="item" verb="ListHelp" path="/commands/ListHelp" visible="mailing_list" activate="emla_list_help"/>
+ <item type="item" verb="ListSubscribe" path="/commands/ListSubscribe" visible="mailing_list" activate="emla_list_subscribe"/>
+ <item type="item" verb="ListUnsubscribe" path="/commands/ListUnsubscribe" visible="mailing_list" activate="emla_list_unsubscribe"/>
+ <item type="item" verb="ListPost" path="/commands/ListPost" visible="mailing_list" activate="emla_list_post"/>
+ <item type="item" verb="ListOwner" path="/commands/ListOwner" visible="mailing_list" activate="emla_list_owner"/>
+ <item type="item" verb="ListArchive" path="/commands/ListArchive" visible="mailing_list" activate="emla_list_archive"/>
</menu>
</hook>
<hook class="org.gnome.evolution.mail.popup:1.0">
- <menu id="org.gnome.evolution.mail.folderview.popup" target="select">
- <item type="submenu" path="20.emfv.50" visible="mailing_list" activate="" label="Mailing _List"/>
- <item type="item" verb="ListHelp" path="20.emfv.50/00.help" label="Get list _usage information" visible="mailing_list" activate="emla_list_help"/>
- <item type="item" verb="ListSubscribe" path="20.emfv.50/10.subscribe" label="_Subscribe to list" visible="mailing_list" activate="emla_list_subscribe"/>
- <item type="item" verb="ListUnsubscribe" path="20.emfv.50/20.unsubscribe" label="_Un-subscribe to list" visible="mailing_list" activate="emla_list_unsubscribe"/>
- <item type="item" verb="ListPost" path="20.emfv.50/30.post" label="_Post message to list" visible="mailing_list" activate="emla_list_post"/>
- <item type="item" verb="ListOwner" path="20.emfv.50/40.owner" label="Contact list _owner" visible="mailing_list" activate="emla_list_owner"/>
- <item type="item" verb="ListArchive" path="20.emfv.50/50.archive" label="Get list _archive" visible="mailing_list" activate="emla_list_archive"/>
+ <menu id="org.gnome.mail.folderview.popup.select" target="select">
+ <item type="bar" path="96.list" visible="mailing_list" activate=""/>
+ <item type="submenu" path="96.list.00" visible="mailing_list" activate="" label="Mailing _List"/>
+ <item type="item" verb="ListHelp" path="96.list.00/00.help" label="Get list _usage information" visible="mailing_list" activate="emla_list_help"/>
+ <item type="item" verb="ListSubscribe" path="96.list.00/10.subscribe" label="_Subscribe to list" visible="mailing_list" activate="emla_list_subscribe"/>
+ <item type="item" verb="ListUnsubscribe" path="96.list.00/20.unsubscribe" label="_Un-subscribe to list" visible="mailing_list" activate="emla_list_unsubscribe"/>
+ <item type="item" verb="ListPost" path="96.list.00/30.post" label="_Post message to list" visible="mailing_list" activate="emla_list_post"/>
+ <item type="item" verb="ListOwner" path="96.list.00/40.owner" label="Contact list _owner" visible="mailing_list" activate="emla_list_owner"/>
+ <item type="item" verb="ListArchive" path="96.list.00/50.archive" label="Get list _archive" visible="mailing_list" activate="emla_list_archive"/>
</menu>
</hook>
</e-plugin>
diff --git a/plugins/mailing-list-actions/org-gnome-mailing-list-actions.xml b/plugins/mailing-list-actions/org-gnome-mailing-list-actions.xml
index a5b5d73acc..726a9dbaa8 100644
--- a/plugins/mailing-list-actions/org-gnome-mailing-list-actions.xml
+++ b/plugins/mailing-list-actions/org-gnome-mailing-list-actions.xml
@@ -1,27 +1,23 @@
<Root>
<commands>
- <cmd name="ListHelp" _label="Get list _usage information" _tip="Get information about the usage of the list this message belongs to"/>
- <cmd name="ListSubscribe" _label="_Subscribe to list" _tip="Subscribe to the mailing list this message belongs to"/>
- <cmd name="ListUnsubscribe" _label="_Un-subscribe to list" _tip="Unsubscribe to the mailing list this message belongs to"/>
- <cmd name="ListPost" _label="_Post message to list" _tip="Post a message to the mailing list this message belongs to"/>
- <cmd name="ListOwner" _label="Contact list _owner" _tip="Contact the owner of the mailing list this message belongs to"/>
- <cmd name="ListArchive" _label="Get list _archive" _tip="Get an archive of the list this message belongs to"/>
+ <cmd name="ListHelp" _tip="Get information about the usage of the list this message belongs to"/>
+ <cmd name="ListSubscribe" _tip="Subscribe to the mailing list this message belongs to"/>
+ <cmd name="ListUnsubscribe" _tip="Unsubscribe to the mailing list this message belongs to"/>
+ <cmd name="ListPost" _tip="Post a message to the mailing list this message belongs to"/>
+ <cmd name="ListOwner" _tip="Contact the owner of the mailing list this message belongs to"/>
+ <cmd name="ListArchive" _tip="Get an archive of the list this message belongs to"/>
</commands>
<menu>
<submenu name="Actions">
- <placeholder name="ComponentActionsPlaceholder">
- <placeholder name="MailMessageActions">
- <submenu name="List" _label="Mailing _List">
- <menuitem name="ListHelp" verb=""/>
- <menuitem name="ListSubscribe" verb=""/>
- <menuitem name="ListUnsubscribe" verb=""/>
- <menuitem name="ListPost" verb=""/>
- <menuitem name="ListOwner" verb=""/>
- <menuitem name="ListArchive" verb=""/>
- </submenu>
- </placeholder>
- </placeholder>
+ <submenu name="List" _label="Mailing _List">
+ <menuitem verb="ListHelp" _label="Get list _usage information"/>
+ <menuitem verb="ListSubscribe" _label="_Subscribe to list"/>
+ <menuitem verb="ListUnsubscribe" _label="_Un-subscribe to list"/>
+ <menuitem verb="ListPost" _label="_Post message to list"/>
+ <menuitem verb="ListOwner" _label="Contact list _owner"/>
+ <menuitem verb="ListArchive" _label="Get list _archive"/>
+ </submenu>
</submenu>
</menu>
</Root>