Re: [evolution-patches] Revised mailing list actions plugin



Not Zed wrote:

Ok, how about this idea, at least show what account it will be sent from (it may not be the default, e.g. for imap/maildir, there's some code to guess it in e-composer-utils i think), and then let the user decide if they want to show the composer.

Good idea. The guess_account function from em-composer-utils that guesses accounts is not public, but guessing from the message, then the folder, like the plugin does now, seems to work well enough, so I currently do that.

Not Zed wrote:

Trouble is, there is no placeholder to place it in the reply block. Basically there are two placeholders, MailMessagections and MailListActions. The former is just above the reply block, and since the "Save attachments" plugin also resides there, I put it there in this patch; the latter seems appropriately named but oddly only contains the "Expunge" men item.
Well we can add placeholders to the main xml files if we need to. Sounds like we do, as part of the 'plugin instrumentation' process.

The place it currently is in seems okay to me, but a new placeholder like "MailReplyActions" would be nice.

BTW, I noted the "visible" property doesn't seem to work currently: the mailing list actions menu items currently always show up...
It isn't implemented at all for bonobo menu's currently. I'm not sure how easy it is to hook up, so use 'enable' for now. (none of the other bonobo menu's in evolution-mail at least ever get hidden, they only ever get disabled, popup menu's are different).

Okay.

And in the message view (i.e. when double-clicking a message), the "Action" menu still shows up first before the "File", etc. menus. I found adding the following to the menu XML:

    <submenu name="File"/>
    <placeholder name="EditPlaceholder">
      <submenu name="Edit" _label="_Edit">
      </submenu>
    </placeholder>
    <submenu name="View"/>

solves this, but that seems like a very bad idea. Don't know what else can be done about this.
Thats very strange. Can you use a *different* bonobo xml file for that menu instead?

Although they should really be fixed up to work the same.

I don't really know what's wrong with my XML file. The placeholders are the same in both menu definitions, its just that the Action menu happens to show up first.

Seeing the previous patch hasn't been applied yet, this patch also contains the previous changes.


Meilof
-- meilof wanadoo nl
? Makefile
? Makefile.in
? eplug-mailing-list-actions-patch1
? eplug-mailing-list-actions-patch2
? mailing-list-actions-hdrs.c
? mailing-list-actions-orig.c
? org-gnome-mailing-list-actions.eplug
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/mailing-list-actions/ChangeLog,v
retrieving revision 1.1
diff -r1.1 ChangeLog
0a1,16
> 2004-11-04  Meilof Veeningen  <meilof wanadoo nl>
> 
> 	* org-gnome-mailing-list-actions.eplug.in: Added author tag, fixed
> 	description, removed "plugin" from name, changed position of item
> 	in popup menu, using "enable" rather than "visible" for bonobo menus
> 
> 	* org-gnome-mailing-list-actions.xml: Now place menus in
> 	MailMessageActions placeholder; moved label to <commands> section
> 
> 	* org-gnome-mailing-list-actions-errors.xml: fixed button order:
> 	"Cancel" now leftmost button; added e-mail address to send confirm
> 	dialog
> 
> 	* mailing-list-actions.c: account guessing now first based on message;
> 	added e-mail address to send confirm dialog
> 
Index: mailing-list-actions.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/mailing-list-actions/mailing-list-actions.c,v
retrieving revision 1.1
diff -r1.1 mailing-list-actions.c
95c95
< 	const char* header = NULL, *headerpos;
---
> 	const char* header = NULL, *headerpos, *fromurl = NULL;
101c101
< 	EAccount *account;
---
> 	EAccount *account = NULL;
140c140
< 			if (emla_action_headers[t].interactive)
---
> 			if (emla_action_headers[t].interactive) {
142,143c142,152
< 			else
< 				send_message_response = e_error_run (NULL, "org.gnome.mailing-list-actions:ask-send-message", url, NULL);
---
> 			} 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);
> 			}
148c157
< 				if ((account = mail_config_get_account_by_source_url (action_data->uri)))
---
> 				if (account)
153c162
< 				em_utils_compose_new_message_with_mailto (url, action_data->uri);
---
> 				em_utils_compose_new_message_with_mailto (url, fromurl);
Index: org-gnome-mailing-list-actions-errors.xml
===================================================================
RCS file: /cvs/gnome/evolution/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml,v
retrieving revision 1.1
diff -r1.1 org-gnome-mailing-list-actions-errors.xml
16c16
<   <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.
---
>   <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.
19,20d18
<   <button label="_Send message" response="GTK_RESPONSE_YES"/>
<   <button label="_Edit message" response="GTK_RESPONSE_NO"/>
21a20,21
>   <button label="_Edit message" response="GTK_RESPONSE_NO"/>
>   <button label="_Send message" response="GTK_RESPONSE_YES"/>
Index: org-gnome-mailing-list-actions-errors.xml.h
===================================================================
RCS file: /cvs/gnome/evolution/plugins/mailing-list-actions/org-gnome-mailing-list-actions-errors.xml.h,v
retrieving revision 1.1
diff -r1.1 org-gnome-mailing-list-actions-errors.xml.h
12c12
< 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"
---
> 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"
15d14
< char *s = N_("_Send message");
16a16
> char *s = N_("_Send message");
Index: org-gnome-mailing-list-actions.eplug.in
===================================================================
RCS file: /cvs/gnome/evolution/plugins/mailing-list-actions/org-gnome-mailing-list-actions.eplug.in,v
retrieving revision 1.1
diff -r1.1 org-gnome-mailing-list-actions.eplug.in
8,9c8,10
< 		name="Mailing List Actions plugin"
< 		description="Provide actions for common mailing list commands (subscribe, unsubscribe, ...)">
---
> 		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>
13,18c14,19
< 				<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"/>
---
> 				<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"/>
22,27c23,28
< 				<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"/>
---
> 				<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"/>
31,39c32,39
< 			<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 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"/>
Index: org-gnome-mailing-list-actions.xml
===================================================================
RCS file: /cvs/gnome/evolution/plugins/mailing-list-actions/org-gnome-mailing-list-actions.xml,v
retrieving revision 1.1
diff -r1.1 org-gnome-mailing-list-actions.xml
3,8c3,8
<     <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"/>
---
>     <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"/>
13,20c13,24
<       <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>
---
>       <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>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]