Commit Graph

52 Commits

Author SHA1 Message Date
Milan Crha c003c99a75 Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly 2011-06-29 18:41:39 +02:00
Matthew Barnes 3b6c8972a5 Coding style and whitespace cleanup. 2011-06-29 18:41:36 +02:00
Milan Crha 65bc58546c Bug #638333 - Critical warning when invoking File->New->Mail Folder 2011-06-29 18:41:35 +02:00
Matthew Barnes c5265294a3 Avoid idle callbacks in EMailBackend initialization.
If the migration phase has to show a dialog the idle callback for
intializing mail stores will run too soon.  Instead, hook it onto
the EShellBackend start() method.

Migration code can initialize mail stores early if it needs to.
2011-06-29 18:41:16 +02:00
Milan Crha 48d805df31 Bug #207580 - Allow new mail check on individual accounts 2011-06-29 18:41:04 +02:00
Matthew Barnes d305e8ff10 Reduce GConf usage in em-composer-utils.c.
To reduce GConf usage in em-composer-utils.c:

- Relevant functions in em-composer-utils.c now take arguments for
  reply and forward styles.

- Redundant forwarding functions were removed:

    em_utils_forward_attached()
    em_utils_forward_inline()
    em_utils_forward_quoted()

- EMailReader now has "forward-style" and "reply-style" properties,
  which get bound to the appropriate EShellSettings properties in
  modules/mail/e-mail-config-reader.c.  These same EShellSettings
  properties are bound to the combo boxes in Composer Preferences.
2010-10-19 13:41:14 -04:00
Matthew Barnes 35e55a8d6e Send errors to an EAlertSink instead of the task bar.
This marks the end of unintrusive error dialogs, which were too
unintrusive.  We now show errors directly in the main window using
the EAlert / EAlertSink framework.
2010-10-18 12:32:37 -04:00
Matthew Barnes 1e663aa132 Replace EBinding with GBinding.
GObject now does property bindings itself.

Requires GLib >= 2.26.
2010-10-14 07:12:52 -04:00
Matthew Barnes 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
Matthew Barnes a91eeb6471 Pass GCancellable to Camel. 2010-09-28 11:35:55 -04:00
Matthew Barnes 429234ff21 Convert composer autosave to an EExtension.
Given the way the autosave feature was awkwardly bolted on to the
composer, an EExtension seemed like a natural fit.  And it helped
clean up some object lifecycle hacks (and bugs).

What we have now is a new module consisting of two EExtensions:

   EComposerAutosave extends EMsgComposer and determines when to
   kick off an asynchronous autosave operation.

   EComposerRegistry extends EShell and offers to restore orphaned
   autosave files on startup (which is also asynchronous now).

e-autosave-utils.c holds the actual asynchronous functions and a few
other miscellaneous utility functions.

Source code for the new module lives in /modules/composer-autosave.
2010-09-02 13:37:31 -04:00
Matthew Barnes 4e9050bc1e Whitespace and coding style cleanup. 2010-08-13 21:32:32 -04:00
Matthew Barnes 8f7b23276d Fix a runtime warning. 2010-08-13 21:00:35 -04:00
Matthew Barnes 6cb0cbd0be Pass an EShell to EMsgComposer instances.
Reduce the composer's dependency on e_shell_get_default().
2010-08-13 20:56:33 -04:00
Michael Meeks 18813ccd8f Defer the load / creation of configuration UI with changes to
e_preferences_window to take factory callbacks and store a reference
to the shell. - This makes start-up substantially faster, particularly
on Atom (eg.).

Remove a number of idle handlers used to create these UIs in the
first instance, cleaning the code.
2010-08-10 21:17:40 +01:00
Jonathon Jongsma 524a26232b Bug 619098 - mail_shell_backend_sync_store_cb() has wrong signature 2010-06-18 10:34:19 -04:00
Matthew Barnes 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
Milan Crha ef7690c384 Bug #499320 - Preview before import from command line 2010-05-18 22:47:29 +02:00
Matthew Barnes fabb6b035c Only #include Camel's top-level header. 2010-04-02 16:59:20 -04:00
Matthew Barnes c516014a5a Express: Composer always defaults to HTML mode
Composer and signature editor always default to HTML in Express mode.
Hide the corresponding composer preference.  This will not affect the
user preference in normal mode.
2010-03-30 09:25:30 -04:00
Matthew Barnes 7094f32df1 Add an extension to configure EWebView.
Make EWebView extensible and register an extension to automatically
bind every EWebView instance to the appropriate EShellSettings.
2010-03-22 12:03:46 -04:00
Matthew Barnes cae22334fa Remove dead assignments found by clang. 2010-01-15 21:50:05 -05:00
Milan Crha ac07595af4 Bug #597816 - Read/save search folders with labels properly 2010-01-05 14:40:19 +01:00
Matthew Barnes f65f8935bc Kill MailSession's interactive flag.
After analyzing this again I'm confident we really don't need it.

The only state change is from FALSE to TRUE at startup, and that
one-time event happens while the mail shell backend is starting up
(see: e_shell_backend_start()).

If a need arises to query for this in the future I'll extend the
EShellBackend API with an e_shell_backend_started() function, but
for now there's no need.
2009-12-16 13:39:39 -05:00
Matthew Barnes 2a7f68fe45 Move MailFolderCache signal handlers to EMailBackend.
Move the MailFolderCache signal handlers from EMailShellBackend down to
EMailBackend (in libevolution-mail.so) to share with Anjal.
2009-12-16 13:29:17 -05:00
Matthew Barnes 0eb2649bde Introduce EMailBackend into libevolution-mail.
EMailBackend is an abstract subclass of EShellBackend that handles
online and offline modes and application shutdown.  Placing this in
the shared mail library allows Anjal to reuse it.  Evolution's mail
module further extends this class as EMailShellBackend.
2009-12-15 22:27:43 -05:00
Jonathon Jongsma 6818a05259 Add MailFolderCache::folder-changed signal
Yes, this signal is kind of an ugly monster.  I'm not sure how to improve this
significantly.  But this commit removes the last EMFolderTreeModel and EShell
dependencies from MailFolderCache, which is a big step towards splitting off
the backend.

https://bugzilla.gnome.org/show_bug.cgi?id=604627
2009-12-15 14:16:09 -06:00
Jonathon Jongsma 0eef4618ca Remove mail-config, vfolder, and filter deps from mail-folder-cache
Instead of pushing the updates to the right places, the folder cache simply
emits the appropriate signals and other objects are responsible for listening
and handling them appropriately.  This allows us to cut down the dependencies of
MailFolderCache significantly, which is a huge step towards allowing us to split
it off for the backend.

Another nice thing about this is that it allows us to trim a lot of 'public' api
from the filter, vfolder, and config classes that were only used by the cache.
Now that stuff can all be internal since they're pulling changes rather than
having the changes pushed.

The last remaining problematic dependency in MailFolderCache is
EmFolderTreeModel.  That is next on the chopping block.

https://bugzilla.gnome.org/show_bug.cgi?id=604627
2009-12-15 14:16:09 -06:00
Matthew Barnes 2aea353ce7 Move mail migration code to libevolution-mail.so.
So Anjal can reuse it.
2009-12-15 11:53:50 -05:00
Jonathon Jongsma 31204c9cc2 Port all error code to use GObject-ified EAlert / EAlertDialog
The changes are mainly including the e-alert-header.h header instead of just
e-alert.h.  This allows us to include e-alert.h in non-UI situations when
necessary.
2009-12-07 12:25:23 -06:00
Jonathon Jongsma c2ee0afbc8 Rename EError to EAlert to match general use better
The EError mechanism is used both for error dialogs as well as basic alerts or
user prompts, so we should give it a more general name which matches this use.

This patch also cleans up a few includes of e-alert.h (formerly e-error.h) that
were not actually being used.

https://bugzilla.gnome.org/show_bug.cgi?id=602963
2009-11-30 13:33:04 -06:00
Jonathon Jongsma 495e9bf800 port modules/ to new EError API.
This should be everything now.

https://bugzilla.gnome.org/show_bug.cgi?id=602963
2009-11-30 13:32:22 -06:00
Matthew Barnes 2b16aef841 Cleanup and rename filter classes. 2009-10-27 09:25:01 -04:00
Milan Crha 12cb5975ab Bug #397265 - Image loading for new contact requires restarting Evolution 2009-10-26 15:05:27 +05:30
Milan Crha e06b88c4fd Bug #594471 - Shouldn't call e_error_new/run with NULL 'parent' 2009-10-13 16:24:10 +02:00
Matthew Barnes d06a82a911 Bug 595092 - Remove option to skip offline syncrhonization dialog 2009-10-07 19:42:32 -05:00
Milan Crha 0ed3ee1fa3 Bug #596753 - Autocompletion addressbooks not remembered
And select page in Edit->Preferences based on the active view.
2009-09-29 20:10:35 +02:00
Matt McCutchen c9dfbd7769 Bug #594573 - Label dropdown box in the rule editor does not work 2009-09-09 18:28:50 +02:00
Ritesh Khadgaray 8ee8a24478 Bug #586854 - Crash on File->Quit with empty_junk enabled 2009-09-08 11:05:18 +02:00
Matthew Barnes 8962868ff9 Relax the EBinding API to reduce GObject casting.
Also make it more fault-tolerant by warning about non-existent
property names instead of just crashing.
2009-09-01 21:12:44 -04:00
Matthew Barnes f5991437c3 Get EConfig and EEvent hooks working again.
There were a number of problems:

  - Walk the GType tree to find EPluginHook subclasses, instead of
    just registering the immediate children.

  - Some EConfig and EEvent subclasses were not being configured
    properly (particularly the mail and calendar subclasses).

  - Add preference window pages after the main loop starts to make
    sure all plugins and plugin hooks are installed first.
2009-08-31 12:53:52 -04:00
Matthew Barnes 32f545cdf0 Simplify EPlugin loading at startup.
- Require all EPlugin and EPluginHook subtypes be registered before
  loading plugins.  This drastically simplifies the EPlugin/EPluginHook
  negotiation.

- Turn most EPluginHook subtypes into GTypeModules and register their
  types from an e_module_load() function (does not include shell hooks).

- Convert EPluginLib and the Mono and Python bindings to GTypeModules
  and register their types from an e_module_load() function, and kill
  EPluginTypeHook.
2009-08-29 17:23:20 -04:00
Matthew Barnes 2b8c7c62aa Exit if no command-line URIs are handled. 2009-08-24 23:08:13 -04:00
Matthew Barnes cee7273ff2 Bug 592032 - Marks message as read when preview is off 2009-08-17 14:14:03 -04:00
Matthew Barnes 672adf12a0 Fix compiler warnings and deprecated GTK+ API usage. 2009-08-16 11:42:26 -04:00
Matthew Barnes da665f8f99 Kill a debug message. 2009-07-17 12:51:28 -04:00
Matthew Barnes d98dc0105e Implement the mail backend's quit strategy. 2009-07-17 11:44:21 -04:00
Matthew Barnes 0f35ef8d0e Prompt when exiting with unsent messages. 2009-07-16 16:37:44 -04:00
Matthew Barnes c9f4659cd7 Kill the global EMailShellBackend variable. Yay! 2009-07-14 10:06:15 -04:00
Matthew Barnes 10eab23500 Implement the shutdown protocol and stub in session management.
The shutdown protocol is modelled after online/offline preparation.
Session management code is copied from libegg.  Not yet used.
2009-07-10 18:47:29 -04:00