Add an action group for Search Folders to EMailReader. The action
group's visibility is bound to the "mail-enable-search-folders" setting,
so that menu items related to Search Folders are hidden when Search
Folders are disabled in GConf.
Affected menu items are:
Edit -> Search Folders
Message -> Create Rule -> Search Folder from Subject...
Message -> Create Rule -> Search Folder from Sender...
Message -> Create Rule -> Search Folder from Recipients...
Message -> Create Rule -> Search Folder from Mailing List...
Search -> Create Search Folder From Search...
Use an enum type to request different action groups. For now we just
have E_MAIL_READER_ACTION_GROUP_STANDARD. EMailReader implementations
should map the enum value to an appropriate GtkActionGroup.
This is related to bug #650587, but is not a proper fix. The proper fix
is in the next couple commits about EMailReader action groups.
This commit just trades a crash for a runtime warning, but can be
backported to the stable branch, whereas the changes required for the
proper fix are too extensive to backport.
Use g_io_scheduler_push_job() instead of g_thread_create(). When the
operation is finished, call gtk_main_quit() from the main thread using
g_io_scheduler_job_send_to_mainloop().
Also, check for cancellation with a GCancellable instead of a boolean.
Note: We really should be using GLib's process spawning API
instead of system(), but that's a job for another day.
This starts up the EMailShellBackend whenever a new composer window is
created. Normally this happens when switching to the Mail shell view,
but if trying to send a message from a different shell view before the
Mail shell view is ever activated, the mail accounts were not getting
loaded and sending or saving the message to a mail folder would fail.
Not only is get_font_options() no longer needed, it's actually doing the
wrong thing by reading settings through GConfClient instead of GSettings.
But it turns out, thanks to the tighter Cairo integration in GTK3, the
widgets that call get_font_options() can be made to work correctly by
simply removing this hack. Love it when that happens.
Let EMailReader fetch the CamelMimeMessage itself, handle errors, and
then pass it off to EMFormatHTMLPrint. This also eliminates the need
for em_format_html_print_raw_message().
Configuring and submitting an EActivity for every mail operation is
getting tedious. This function helps reduce boilerplate code by:
* Creating a new EActivity instance.
* Installing an EAlertSink using e_mail_reader_get_alert_sink().
* Installing a GCancellable (which is really a CamelOperation).
* Submitting the activity via e_shell_backend_add_activity().
I'm considering adding a similar function (or class method) for
EShellView. Not sure yet...