Commit Graph

64 Commits

Author SHA1 Message Date
366dacefa0 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-05-12 18:24:41 -04:00
ba8f1f78f4 Add e_activity_handle_cancellation().
Convenience function for use in GAsyncReadyCallback functions.

This acknowledges the cancellation, so that the activity's description
changes from "(cancelling)" to "(cancelled)" and the description appears
crossed out in the UI for a moment before disappearing.
2011-05-11 12:59:29 -04:00
c7b455de89 Adapt to CamelFolder:name -> display-name. 2011-05-07 11:15:51 -04:00
a9c9f0be5f Remove e_mail_reader_get_folder_uri().
Instead call e_mail_reader_get_folder() and, if you really need to,
generate the folder URI with e_mail_folder_uri_from_folder().
2011-05-03 14:42:29 -04:00
b8a932ae1e Fix compiler warnings.
Mostly dead assignments.
2011-05-03 10:45:46 -04:00
c3b983d6e1 Drop 'folder_uri' param from em_utils_folder_is_outbox(). 2011-05-03 09:42:06 -04:00
b9f932b1b8 Drop 'folder_uri' param from em_utils_folder_is_sent(). 2011-05-03 09:42:06 -04:00
9e0f0f529f Drop 'folder_uri' param from em_utils_folder_is_drafts(). 2011-05-03 09:42:06 -04:00
ae28ea4621 EMailShellView: Open the selected folder ourselves.
This one's a little involved:

 - EMailShellView now obtains a CamelFolder itself in response to
   EMFolderTree::folder-selected signals.  Uses EActivity to do so.

 - Revise EMFolderTree::folder-selected signal arguments to be more
   useful: emit a CamelStore object instead of a folder URI.

 - Also revise EMFolderTree::folder-activiated signal arguments the
   same way while we're at it.

 - Remove the "folder_uri" argument from e_mail_reader_set_folder().
   If you have a CamelFolder object you can obtain the URI string by
   calling camel_folder_get_uri().
2011-05-02 21:01:48 -04:00
397aeade05 Adapt to CamelService changes. 2011-04-21 07:45:45 -04:00
1301cf02ef Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly 2011-02-25 16:20:41 +01:00
21ab8044da Coding style and whitespace cleanup. 2011-01-29 20:22:57 -05:00
d6ce64dc19 Bug #633788 - Mail plugin's update-actions handler is never called 2011-01-18 18:02:03 +01:00
ffa69c8bef Bug #637162 - May not add toolbar Send/Receive button multiple times 2010-12-14 15:13:55 +01:00
320c4ce807 Bug #631568 - Scheduling Meetings with CalDAV calendars 2010-12-08 14:31:58 +01:00
558599a201 Bug 636265 - Trash is untranslated in the window title 2010-12-03 15:57:34 -06:00
e39dd931bc Bug #207580 - Allow new mail check on individual accounts 2010-11-25 18:10:14 +01:00
1e663aa132 Replace EBinding with GBinding.
GObject now does property bindings itself.

Requires GLib >= 2.26.
2010-10-14 07:12:52 -04:00
a06e4484b8 Give MailSession a permanent home.
Global variables in shared libraries are a bad idea.  EMailBackend now
owns the MailSession instance, which is actually now EMailSession.

Move the blocking utility functions in mail-tools.c to e-mail-session.c
and add asynchronous variants.  Same approach as Camel.

Replace EMailReader.get_shell_backend() with EMailReader.get_backend(),
which returns an EMailBackend.  Easier access to the EMailSession.
2010-10-12 13:58:59 -04:00
afe6f502c3 Use new GDK keysym names if available.
In GTK+ 2.21.8, the keysym names were renamed from GDK_* to GDK_KEY_*.

I've added backward-compatibility macors to gtk-compat.h, which can be
dumped as soon as we require GTK+ >= 2.22.0.
2010-09-17 18:39:59 -04:00
5310e4a0b1 Adapt to CamelOperation API changes. 2010-09-14 23:48:02 -04:00
935bc4be07 Bug 628141 - Duplicate signal connections in EMailReader
EMailShellContent implements the EMailReader interface but acts as a
proxy for EMailPanedView, from which it obtains MessageList and EWebView
widgets.  The problem was both classes call e_mail_reader_init_private()
which connects to signals emitted from the MessageList and EWebView
widgets.  But since EMailShellContent is a proxy for EMailPanedView,
the signals were being connected twice.

This commit does away with e_mail_reader_init_private(), instead adding
options to e_mail_reader_init() to control what parts of initialization
to run.  It's an ugly and temporary hack.

I'm beginning to realize EMailReader is too bloated and needs rethought.
EMailReader should just manage actions.  EMailView should own and manage
the widgets, and EMailReader should just have a get_mail_view() method
so it has access to those widgets.  That way the EMailView subclasses
won't have to implement EMailReader themselves and wind up allocating
a bunch of duplicate, unused actions.

It's too close to a stable release to rip these interfaces apart and
reorganize them.  I'll try to do that for 2.33 to help make the design
more intuitive.
2010-08-27 15:44:25 -04:00
87a3fac95c Mail module + EMailView cleanups. 2010-08-26 13:14:01 -04:00
acb73cd105 Fix more non-removal of signals on user_data object distruction by
using g_signal_connect_object in many places; fixes bgo#627525#
2010-08-20 20:04:37 +01:00
36b9debed0 More code cleanup. 2010-07-26 12:26:55 -04:00
9279429501 Drop the "quote-from-selection" property.
David's solution is simpler: check if the HTML widget is mapped.
Avoids having to propagate the property to Srini's new classes.
2010-07-26 07:40:48 -04:00
81e5428a59 Coding style and whitespace cleanup. 2010-07-26 01:16:42 -04:00
21f5bfa2ab Fix right click issues. 2010-07-25 21:30:01 -04:00
9097741700 Rewrite the content piece of evolution. 2010-07-25 21:29:59 -04:00
a972d9ab59 Bug 624285 - When replying, ignore text selection if preview is hidden 2010-07-13 19:30:20 -04:00
0439c01a9a Bug 616724 - Initialize message window with threaded state of main window 2010-06-19 11:39:49 -04:00
a15a295323 Bug 620602 - Next/prev shortcuts should focus message list 2010-06-05 13:52:25 -04:00
4f01d3d182 Keep chipping away at direct GtkHTML usage.
EMFormatHTML now holds a sealed EWebView instead of a public GtkHTML,
accessible through em_format_html_get_web_view().

Rename e_mail_reader_get_html_display() to e_mail_reader_get_formatter()
and have it return an EMFormatHTML instead of an EMFormatHTMLDisplay,
since that's usually the type you want (or else an EMFormat, but never
an EMFormatHTMLDisplay).
2010-05-31 12:01:49 -04:00
6640519e48 Use EWebView functions whenever possible. 2010-05-30 23:05:14 -04:00
aec33928b7 Adapt to Camel API changes. 2010-04-30 11:30:19 -04:00
bc90469e7f Camel is now GObject-based. 2010-04-24 11:05:27 -04:00
5974489593 Bug #615331 - Message list/Folder tree focus policy has changed 2010-04-19 12:36:19 +02:00
4e4fcdad46 Miscellaneous cleanup bits from WebKit branch. 2010-04-02 09:23:19 -04:00
c0533ef053 Some more directories relocated on windows 2010-03-11 00:22:35 +01:00
e9dc381d3a Bug 587014 - Magic space does not work as expected
Neither ETree::key-press nor ETableItem::key-press signal definitions
specify a GSignalAccumulator that terminates the signal emission when
a handler returns TRUE, and Evolution 2.29 connects multiple handlers
to ETree::key-press.

When the space key is pressed, the first handler implements the magic
space bar behavior and returns TRUE, which should terminate signal
emission but doesn't because there's no accumulator function on the
signal.  So the second handler runs and checks for other keys besides
space.  It returns FALSE since it didn't handle the key press.

End result: emission site gets back FALSE (from the second handler) as
the return value, so it thinks the key press was not handled at all and
invokes the fallback handler -- e_selection_model_toggle_single_row() --
which -unselects- the newly selected row, making it appear the next
unread message was never selected.

Several other ETable-related signals that return "handled" flags also
lack GSignalAccumulator functions.  I've made a note to myself to fix
those as well.
2010-02-17 19:45:28 -05:00
9b608beea9 Bug 604542 - Skip non-system rules when building quick search menu 2010-02-10 13:40:08 -05:00
31e449ebed Implement account-wide search scope in mail.
Also, let EShellSearchbar handle search state persistence.
2010-02-06 13:46:40 -05:00
6dcf4ec127 Bug #606666 - Cannot move cursor with arrows in preview with caret mode 2010-01-25 16:20:19 +01:00
abc0e4c694 Introduce ESelectable and EFocusTracker.
EFocusTracker tracks the input focus within a window and helps keep
the sensitivity of "selectable" actions in the main menu up-to-date.
Selectable actions include Cut, Copy, Paste, Select All and Delete.

EFocusTracker has built-in support for widgets that implement the
GtkEditable interface such as GtkEntry and GtkTextView.  It also
supports custom widgets that implement the ESelectable interface,
which is a subset of GtkEditable and can apply to anything that
displays selectable content (esp. tree views and ETables).

This commit integrates EFocusTracker with EShellWindow, CompEditor,
EMsgComposer, and ESignatureManager.

It also bumps the GtkHTML requirement to 2.29.5 to utilize the new
GtkhtmlEditor:html constructor property.
2009-12-25 15:42:17 -05:00
60e6ecbb42 Remove some obsolete GConf keys.
/apps/evolution/mail/display/show_preview
/apps/evolution/mail/display/thread_list

These keys are no longer needed since we're storing the settings by
folder now in ~/.evolution/mail/config/state.  To simplify things we use
hard-coded defaults: TRUE for PreviewVisible, FALSE for GroupByThreads.
2009-12-19 00:46:19 -05:00
4cbbdedf52 Refactor the EShell search API.
Move the search interface to a new widget: EShellSearchbar

The current search rule is now stored in EShellView, and the search
context in EShellViewClass similar to GalViewCollection (since it's
class-specific, not instance-specific).

Also add a couple new signals to EShellView: "clear-search" and
"custom-search" ("custom" refers to an advanced search or a saved
search -- something more complex than a quick search).

Still working out a few kinks.  The search entry is clearly trying to
be too many things.  We need a different way of indicating that you're
looking at search results.  Perhaps a search results banner similar to
Nautilus.
2009-12-18 22:38:00 -05:00
1059076803 Bug #596967 - Per-folder setting for threading and preview panel 2009-12-18 17:56:11 +01:00
eb60a4e448 Kill ETreeScrolled.
Kill ETreeScrolled and convert MessageList to an ETree subclass.

ETreeScrolled is nothing but a GtkScrolledWindow containing an ETree.
It adds nothing of value and actually makes customizing ETree harder.
2009-12-08 01:55:28 -05:00
5e938b590f Expand the EMailReader interface so it's easier to use.
Adds the following methods:

  CamelFolder *   (*get_folder)          (EMailReader *reader);
  const gchar *   (*get_folder_uri)      (EMailReader *reader);
  GPtrArray *     (*get_selected_uids)   (EMailReader *reader);
2009-12-01 15:01:14 -05:00
76fbb9d232 Kill message_list_free_uids().
Use em_utils_uids_free() instead.
2009-12-01 15:01:14 -05:00