Commit Graph

6177 Commits

Author SHA1 Message Date
6e610403e4 Fix em_folder_selector_get_selected_uri().
Another case of custom logic to build old-style folder URIs.
The new format simplifies things considerably.
2011-06-29 18:42:20 +02:00
4482f93f33 EMFolderSelector: Fix some silly typos. 2011-06-29 18:42:20 +02:00
6e6da8a408 Use em_folder_tree_get_selected() in places to simplify code.
There were a few places where we were accessing the folder tree model
directly to get the selected store + folder name, or were asking for the
selected URI only to parse back into its store + folder name components.
2011-06-29 18:42:20 +02:00
851a872865 Remove em_folder_tree_get_selected_path().
em_folder_tree_get_selected() supercedes it.
2011-06-29 18:42:20 +02:00
cf138322ff Add em_folder_tree_get_selected().
Returns the CamelStore and folder name of the selected row.
2011-06-29 18:42:20 +02:00
fffba9a3be EMFolderTree: Rewrite async folder info loading.
When a folder is expanded and child folder info needs to be retrieved,
submit an EActivity and call camel_store_get_folder_info() instead of
using the legacy MailMsg API.
2011-06-29 18:42:20 +02:00
6a810a5114 Add em_folder_tree_new_activity().
Similar to e_mail_reader_new_activity().  Creates, configures and
submits a new EActivity instance, so asynchronous operations can easily
be dispatched without a lot of boilerplate code.
2011-06-29 18:42:20 +02:00
672132f8a0 EMFolderTree: Add an EAlertSink property.
Now EMFolderTree has access to both an EShellBackend and an EAlertSink;
everything it needs to build and submit EActivity instances.
2011-06-29 18:42:19 +02:00
8decdbc4cb Let EMFolderSelector create its own EMFolderTree.
Also, minimize the EMFolderSelector API by removing frivolous wrapper
functions and unused functions.
2011-06-29 18:42:19 +02:00
fcfe3ec2a1 EMFolderTree: Whitespace cleanups. 2011-06-29 18:42:19 +02:00
7050475f84 EMFolderTree: Store an EMailBackend instead of an EMailSession.
All this so EMFolderTree can submit EActivity instances for async ops.
You can obtain an EMailSession from an EMailBackend, but not vice versa.

Creates lots of pretty ripples in the mail code, but ultimately reduces
complexity.  So it's a code cleanup of sorts.
2011-06-29 18:42:19 +02:00
a98cb0a982 Remove emfu_create_folder_real().
Use e_mail_store_create_folder() instead.
2011-06-29 18:42:19 +02:00
43e043c2c4 Fix crash when opening message window.
Would help if I actually did what the comment said...
2011-06-29 18:42:18 +02:00
5146ff4c53 Coding style and whitespace cleanup. 2011-06-29 18:42:17 +02:00
4956c5a9d2 EMailReader: Remove the forward/reply style hack.
Now that we're configuring EMailReader instances from an idle callback,
we can safely store the forward and reply styles in the private struct.
2011-06-29 18:42:17 +02:00
b1e34279d9 Bug 650587 - Hide Search Folder actions when Search Folders are disabled
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...
2011-06-29 18:42:17 +02:00
6fb8b27d3d EMailReader: Support multiple action groups.
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.
2011-06-29 18:42:17 +02:00
f0a2397cff mail-autofilter.c: Add argument guards in public functions.
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.
2011-06-29 18:42:17 +02:00
53feeabf5d Remove mail_remove_folder().
Use e_mail_folder_remove() instead.
2011-06-29 18:42:17 +02:00
32a9a11e70 Always initialized all structure members 2011-06-29 18:42:17 +02:00
12428e3a01 Bug 650522 - em-format-html: Fix uninitialized variable 2011-06-29 18:42:17 +02:00
e603166602 Remove mail_get_folderinfo().
Use camel_store_get_folder_info() instead.
2011-06-29 18:42:17 +02:00
63c69e938a Remove mail_save_messages().
Use e_mail_folder_save_messages() instead.
2011-06-29 18:42:17 +02:00
dba093c804 Remove mail_store_prepare_offline().
Use e_mail_store_prepare_for_offline() instead.
2011-06-29 18:42:16 +02:00
d1777cbb0f Remove mail_check_service().
Use camel_service_query_auth_types() instead.
2011-06-29 18:42:16 +02:00
b5cadb77f1 Remove mail_remove_attachments().
Use e_mail_folder_remove_attachments() instead.
2011-06-29 18:42:16 +02:00
fb38e4a4ba Bug #601541 - Add 'Copy Image' Option On Inline Email Images 2011-06-29 18:42:16 +02:00
4131148aa2 Remove mail_get_folder_quota().
Use camel_folder_get_quota_info() instead.
2011-06-29 18:42:15 +02:00
8c11fc5aac EMFolderProperties: Fetch quota information asynchronously. 2011-06-29 18:42:15 +02:00
426a7bdda4 Remove mail_get_message().
Use camel_folder_get_message() instead.
2011-06-29 18:42:15 +02:00
49df008d73 Reimplement the "mail-reply-sender" action.
Now uses camel_folder_get_message().
2011-06-29 18:42:15 +02:00
a4ef75f41c Reimplement the "mail-reply-all" action.
Now uses camel_folder_get_message().
2011-06-29 18:42:15 +02:00
757c1ded56 Bug #646033 - Update progress in Send/Receive dialog 2011-06-29 18:42:15 +02:00
cacd0e92de Keep forgetting to add prefixes to EAlert tags. 2011-06-29 18:42:15 +02:00
1a75a7d808 Miscellaneous cleanups. 2011-06-29 18:42:15 +02:00
0477a65401 em_format_html_print_message(): Require a CamelMimeMessage.
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().
2011-06-29 18:42:15 +02:00
f21da77177 em_utils_reply_to_message(): Require a CamelMimeMessage.
No more fetching a message itself.  Oh, and stop unreffing the message.
Those kinds of insane semantics are what lead to crashes.
2011-06-29 18:42:14 +02:00
61f2760572 Remove em_utils_redirect_message_by_uid().
Use em_utils_redirect_message() instead.
2011-06-29 18:42:14 +02:00
4c84d4edaa Reimplement the "mail-redirect" action.
Now fetches the message itself using camel_folder_get_message(),
then calls em_utils_redirect_message().
2011-06-29 18:42:14 +02:00
3395074cc1 Add e_mail_reader_new_activity().
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...
2011-06-29 18:42:14 +02:00
464bffb621 Reimplement e_mail_reader_create_vfolder_from_selected().
Now uses camel_folder_get_message().
2011-06-29 18:42:13 +02:00
e755564879 Reimplement e_mail_reader_create_vfolder_from_selected().
Now uses camel_folder_get_message().
2011-06-29 18:42:13 +02:00
33abe3198a Reimplement e_mail_reader_create_filter_from_selected().
Now uses camel_folder_get_message().
2011-06-29 18:42:13 +02:00
d85a92dba1 EMConfigTargetFolder: Remove URI member.
Use e_mail_folder_uri_from_folder() if you really need a folder URI for
the target's CamelFolder.
2011-06-29 18:42:13 +02:00
0c2cfce79f Bug #645476 - Avoid scroll to cursor on folder change in message list 2011-06-29 18:42:12 +02:00
6215f79905 Cannot send message with just enabled account
Everything in UI seemed as working fine, but the message is just lost,
even there was printed a runtime warning on the console.
This is fixing couple things along this issue:
- differentiate between NULL and invalid pointers/objects
  in new e_mail_folder_uri_...() functions
- report error to UI if mail_session_send_to_thread() fails to find
  corresponding transport service
- call e_mail_store_add_by_account() in mail_store_load_accounts()
  (a side-effect of this change is no code duplication and unified
  processing of the same action)
2011-06-29 18:42:12 +02:00
045bbf1c62 e_mail_session_uri_to_folder_sync(): Remove redundant status message.
camel_store_get_folder() pushes an "Opening folder" message itself.
2011-06-29 18:42:12 +02:00
9c2e0cfad6 Remove mail_get_folder().
Use camel_store_get_folder() instead.
2011-06-29 18:42:12 +02:00
13e414debe Reimplement em_folder_properties_show().
Now uses camel_store_get_folder() and camel_folder_get_quota_info(),
although I need to rewrite the quota function to be asynchronous.
2011-06-29 18:42:12 +02:00
e58844a362 Get vfolder_edit_rule() working again.
It was handling folder URIs the old way.

Also, use gtk_dialog_run() to simplify the logic.
2011-06-29 18:42:12 +02:00