Commit Graph

7320 Commits

Author SHA1 Message Date
27c92e7f3d Add EMailPrintConfigHeaders.
This splits the print dialog's "Headers" tab into a separate widget.

EMailPrintConfigHeaders takes an EMailPartHeaders and displays its print
model, which is a representation of all message headers (except subject)
with an on/off flag for each.  The headers can be toggled and reordered,
and the changes are written back to the print model.

During printing, EMailFormatterPrintHeaders uses the same print model
to determine which headers to show and in what order (except subject).

This approach is much saner than the old method, which was trying to
manipulate WebKitWebView DOM directly to toggle and reorder headers.
This approach also happens to work, whereas the old method did not.
2013-06-08 00:25:15 -04:00
900ea24740 Remove EMailReaderHeader struct.
No longer used.

Also remove related helper functions:

  e_mail_reader_header_from_xml()
  e_mail_reader_header_to_xml()
  e_mail_reader_header_free()
2013-06-05 13:03:46 -04:00
d54a3443d8 Bug 684302 - Prompt to close message window on reply should be inline
Pop-up dialog is far too intrusive.  Instead ask the question as an
inline alert in the message window, which does not interrupt the user.
2013-06-04 16:12:36 -04:00
5794c63f4f EMailBrowser: Add "close-on-reply-policy" property.
Mainly to avoid accessing GSettings directly from EMailBrowser.

Also add a "browser-close-on-reply-policy" GSettings key that replaces
"prompt-on-reply-close-browser", the difference being the new key uses
an enum definition compatible with EAutomaticActionPolicy instead of a
free-form string value.

And finally add an ESettingsMailBrowser class to glue things together.
2013-06-04 13:10:02 -04:00
0468161237 EMailDisplay cleanups. 2013-06-04 13:10:02 -04:00
f150d05119 EMailBrowser cleanups. 2013-06-04 13:10:02 -04:00
4792c683b0 EMailReader: Remove unused actions.
These are just Express Mode leftovers.

Also remove obsolete functions:

  e_mail_reader_get_enable_show_folder()
  e_mail_reader_enable_show_folder()
  e_mail_paned_view_set_enable_show_folder()
2013-06-02 17:10:30 -04:00
89d274e476 Remove unused EMailNotebookView.
This is just an Express Mode leftover.
2013-06-02 16:44:51 -04:00
a27c70e427 Add e_mail_reader_forward_messages().
Replaces em_utils_forward_messages().
2013-06-02 15:48:42 -04:00
13b2bd263c Add e_mail_reader_edit_messages().
Replaces em_utils_edit_messages().
2013-06-02 14:30:06 -04:00
43610e3431 Move "ask-reply-close-browser" prompt to EMailBrowser.
EMailReader is an interface and should not know about specific classes
that implement its interface.  Instead, EMailBrowser itself will prompt
in response to "composer-created" signals that include a source message.

This also removes the "destroy_when_done" parameter from
em_utils_forward_messages() since it's no longer needed.
2013-06-02 13:24:33 -04:00
f5e47561f9 EMailReader: Add a "composer-created" signal.
Emitted to indicate a composer window was created in response to a user
action on the EMailReader.  Examples of such actions include replying,
forwarding, and starting a new message.

If applicable, the source message (i.e. the message being replied to or
forwarded) is included in the signal emission.

New functions:

  e_mail_reader_composer_created()
2013-06-02 13:22:41 -04:00
1570f53d1e em_utils_edit_message: Change return type to EMsgComposer. 2013-06-02 11:58:08 -04:00
ca14cc115e em_utils_redirect_message: Return the EMsgComposer. 2013-06-02 11:58:08 -04:00
1b7fc9224b em_utils_compose_new_message(): Return the EMsgComposer. 2013-06-02 11:58:08 -04:00
540acdbfa9 Simplify em_utils_forward_message() arguments.
Replace the EShell and CamelSession arguments with a single EMailBackend
argument, from which both the EShell and CamelSession can be obtained.
2013-06-02 11:58:08 -04:00
603fb5ac71 em-composer-utils.c cleanups. 2013-06-02 11:58:05 -04:00
8564aef30c e-mail-reader.h: Remove unimplemented declarations.
These functions do not exist:

  e_mail_reader_get_formatter()
  e_mail_reader_set_formatter()
2013-06-02 08:24:43 -04:00
8d7a5a1b87 Add e_composer_header_table_ref_source().
Convenience function that works like e_source_registry_ref_source(),
but spares the caller from digging out the ESourceRegistry from the
header table.
2013-06-01 15:24:37 -04:00
0dc9aae35b EComposeHeaderTable: Replace "registry" property with "client-cache".
The ESourceRegistry can still be obtained from the EClientCache:

   client_cache = e_composer_header_table_ref_client_cache (table);
   registry = e_client_cache_ref_registry (client_cache);

   ...

   g_object_unref (client_cache);
   g_object_unref (registry);

Added functions:

  e_composer_header_table_ref_client_cache()

Removed functions:

  e_composer_header_table_get_registry()
2013-06-01 15:24:00 -04:00
9528240fe8 EMailReader cleanups. 2013-06-01 12:35:21 -04:00
13089f0d50 e_mail_session_send_to(): Don't silently ignore if we can't send.
If sending fails for any reason, return a suitable GError.  Don't just
return silently.  Also check for a wider range of errors indicating the
service is unavailable in composer_send_completed().  This will trigger
the "save-to-outbox" info alert.
2013-05-29 16:50:27 -04:00
2d251a9597 Distinguish "attachment-wrapper" elements from attachments.
The HTML for attachments always has the following form:

<div class="attachment-wrapper" id="something" style="display: block;">
  <actual attachment element>
</div>

The <div> element controls attachment visibility through its "display"
style attribute, which is either "block" or "none".

Problem is the <actual attachment element> was getting the same ID as
its parent <div> element.  So when either element was requested by ID,
in certain cases the wrong element was returned and caused misbehavior
and console warnings.

Solve this by adding a "wrapper" suffix to the <div> element ID.  So in
the example above, id="something" gets the <actual attachment element>,
whereas id="something.wrapper" gets the <div> element.
2013-05-29 07:09:20 -04:00
9bfe38c419 Rename libcomposer to libevolution-mail-composer.
To make Evolution's shared libraries more consistent.

Also add an evolution-mail-composer documentation module.
2013-05-28 09:56:30 -04:00
04aa0fba1f Rename libemformat to libevolution-mail-formatter.
To make Evolution's shared libraries more consistent.

Also add an evolution-mail-formatter documentation module.
2013-05-28 09:56:30 -04:00
70a9fcdf9c Rename libeshell to libevolution-shell.
To make Evolution's shared libraries more consistent.

Also rename the documentation module to evolution-shell.
2013-05-28 09:56:30 -04:00
6c9a3243c9 Rename libeutil to libevolution-util.
To make Evolution's shared libraries more consistent.

Also rename the documentation module to evolution-util.
2013-05-28 09:56:30 -04:00
3777e4887c configure.ac: Remove unused function and header checks.
This removes the following definitions from config.h:

   CTIME_R_THREE_ARGS
   GETHOSTBYADDR_R_SEVEN_ARGS
   GETHOSTBYNAME_R_FIVE_ARGS
   HAVE_ISBLANK
   HAVE_MKSTEMP
   HAVE_STATFS
   HAVE_STATVFS
   HAVE_SYS_MOUNT_H
   HAVE_SYS_PARAM_H
   HAVE_SYS_STATVFS_H

These were all either unused or unnecessarily used.
2013-05-28 09:42:12 -04:00
6777fe64ef e-mail-reader-utils.c cleanups. 2013-05-25 11:24:41 -04:00
f9ffe64723 Convert EMailPart to a GObject.
EMailPart is reference-counted, subclassed, and allows a custom
finalize function.  There's no excuse for it not to use GObject.
2013-05-19 13:07:22 -04:00
67227b428b Add e_mail_part_get_validity_flags(). 2013-05-19 13:07:21 -04:00
ca09edf8fa Add e_mail_part_get_is_attachment(). 2013-05-19 13:07:21 -04:00
0ee556d346 Add e_mail_part_get_mime_type(). 2013-05-19 13:07:21 -04:00
f19058ea7a Add e_mail_part_ref_mime_part(). 2013-05-19 13:07:20 -04:00
366b731a16 Add e_mail_part_id_has_prefix(). 2013-05-19 13:07:20 -04:00
c025ffbb29 Add e_mail_part_get_id(). 2013-05-19 13:07:20 -04:00
cd5a55f981 em-format cleanups. 2013-05-19 13:07:20 -04:00
f6f11a1da2 EMailPart: Store validity pairs in a GQueue. 2013-05-19 13:07:20 -04:00
07830ef445 Remove e_mail_display_set_charset().
Use e_mail_formatter_set_charset() instead.
Obtain the EMailFormatter with e_mail_display_get_formatter().
2013-05-14 15:20:14 -04:00
232a3cd15d EMailDisplay cleanups. 2013-05-14 15:20:14 -04:00
35f0a84993 EMailPrinter: Fix a couple typos. 2013-05-10 13:40:40 -04:00
72f465b173 Bug 7000028 - Drag-n-drop export of a file produces 0 sized PDF file
em_utils_print_messages_to_file() was doing so asynchronously, but
unfortunately drag-n-drop is a synchronous protocol.  So by the time
the asynchronous print operation completed, the URI list pointing to
the temporary PDF files had already been passed to the file manager.

The only reason the files were created at all was because we test the
generated file name with open(...O_CREAT...) before starting the print
operation, and I'm not convinced that test is even necessary.
2013-05-10 12:44:10 -04:00
16a95bfa16 Convert e_mail_printer_print() to a proper async function.
This adds a GAsyncReadyCallback and a closure to e_mail_printer_print(),
and trades the "done" signal for e_mail_printer_print_finish() so that
EMailPrinter is a little more reentrant.
2013-05-10 12:24:13 -04:00
3acb2d6728 EMailPrinter cleanups. 2013-05-09 19:26:17 -04:00
459cbbd9c7 em-utils.c cleanups. 2013-05-09 17:32:57 -04:00
289d96f5f0 Remove "drag-and-drop-save-name-format" setting.
Hidden setting, no clear use case, and poorly implemented.
2013-05-09 16:31:04 -04:00
448aa307c3 Right-align mail header names.
We used to do this before WebKit and it looked better.

Also fix up the header section for right-to-left locales:
put the collapse button on the right, and images on the left.
2013-05-08 23:06:23 -04:00
58ef547151 Coding style and whitespace cleanup. 2013-05-08 08:28:09 -04:00
b254ea37ef Bug #301323 - "Edit as new message" doesn't strip signature properly 2013-05-06 23:54:37 +02:00
7770e7c365 Merge [mark-all-read] plugin into core code
During fixes on bug #602428, rather than do everything twice,
I merged the plugin into the core code, thus it should be easier
to maintain as well.
2013-05-03 18:11:37 +02:00