Commit Graph

209 Commits

Author SHA1 Message Date
Matthew Barnes 80e3a3ad4b Fix more places where old-style folder URIs are used. 2011-06-29 18:42:22 +02:00
Matthew Barnes f043e3c748 Including <glib-object.h> directly is rarely needed. 2011-06-29 18:42:21 +02:00
Matthew Barnes 7132d0f0c2 Including <glib.h> directly is rarely needed. 2011-06-29 18:42:21 +02:00
Milan Crha c24038c4f6 Bug #646109 - Fix use of include <config.h> to make sure translations work 2011-06-29 18:42:20 +02:00
Matthew Barnes 53feeabf5d Remove mail_remove_folder().
Use e_mail_folder_remove() instead.
2011-06-29 18:42:17 +02:00
Milan Crha 32a9a11e70 Always initialized all structure members 2011-06-29 18:42:17 +02:00
Matthew Barnes e603166602 Remove mail_get_folderinfo().
Use camel_store_get_folder_info() instead.
2011-06-29 18:42:17 +02:00
Matthew Barnes 54da4fc09c Coding style cleanups. 2011-06-29 18:42:11 +02:00
Matthew Barnes 578214584c Whitespace and coding style cleanups. 2011-06-29 18:42:10 +02:00
Matthew Barnes 9327f255b9 MailFolderCache: Drop folder URI in "folder-changed" signal.
We already include a CamelStore and folder name string in the signal
arguments, so it's trivial to reconstruct the URI if it's needed.
2011-06-29 18:42:10 +02:00
Matthew Barnes 3b05e9099c MailFolderCache: Emit folder names instead of URIs in signals. 2011-06-29 18:42:10 +02:00
Matthew Barnes b59648863b Use e_mail_folder_uri_from_folder() instead of camel_folder_get_uri(). 2011-06-29 18:42:06 +02:00
Matthew Barnes fc1034551e Drop 'folder_uri' param from em_utils_folder_is_outbox(). 2011-06-29 18:42:06 +02:00
Matthew Barnes bbf5ce3869 Drop 'folder_uri' param from em_utils_folder_is_sent(). 2011-06-29 18:42:06 +02:00
Matthew Barnes 9cf4104e04 Drop 'folder_uri' param from em_utils_folder_is_drafts(). 2011-06-29 18:42:05 +02:00
Matthew Barnes a63bf8a183 MailFolderCache: Remove 'folders_uri' hash table
We've been adding and removing folder URIs to this hash table but never
actually using it for anything.  Not a single lookup.  So just remove it.
2011-06-29 18:42:04 +02:00
Matthew Barnes f31b492945 Adapt to sealed up CamelService. 2011-06-29 18:41:55 +02:00
Matthew Barnes 7aacf983b3 Coding style and whitespace cleanup. 2011-06-29 18:41:41 +02:00
Milan Crha c003c99a75 Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly 2011-06-29 18:41:39 +02:00
Matthew Barnes 6af0c53b69 Coding style and whitespace cleanup. 2011-06-29 18:41:29 +02:00
Matthew Barnes 2636da7dac Kill mail_store_set_offline().
Replace it with new async functions:

  e_mail_store_go_offline()
  e_mail_store_go_offline_finish()

  e_mail_store_go_online()
  e_mail_store_go_online_finish()
2010-10-22 17:26:08 -04:00
Matthew Barnes c881b5bc5e Simplify EActivity.
With unintrusive error dialogs gone, we can cut some unnecessary bits
out of EActivity.

I'm also adding a new enum property called "state", which is one of:

    E_ACTIVITY_RUNNING
    E_ACTIVITY_WAITING
    E_ACTIVITY_CANCELLED
    E_ACTIVITY_COMPLETED

The state of an activity must be explicitly changed.  In particular,
when the user cancels an activity the state should be set only after
confirming the operation has been cancelled and not when cancellation
is requested (e.g. after receiving a G_IO_ERROR_CANCELLED, not when
the GCancellable emits "cancelled").  EActivityBar and EActivityProxy
widgets have been updated to make this distinction clearer in the UI.

E_ACTIVITY_WAITING will be used when activities have to be queued and
dispatched in sequence, which I haven't written yet.
2010-10-22 14:21:22 -04:00
Matthew Barnes ae478d1e3c Collect mail enum types in e-mail-enums.h.
And generate GTypes for each of them in e-mail-enumtypes.[ch].

Also, the glib-gen.mak script forced me to add a <mail/e-mail.h>
top-level header, which really isn't a bad idea anyway.

TODO: We should do this for calendar and addressbook too.
2010-10-18 14:31:16 -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 ed45d23b84 Remove mail_tools_folder_to_url().
Use camel_folder_get_uri() instead.
2010-10-12 13:59:00 -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
Milan Crha 8cd5fd9653 MailFolderCache notifies in reverse order
Causing unread count on Drafts disappear sometimes. (Drafts, like
Outbox, uses total message count, instead of real unread count).
2010-10-07 12:43:58 +02:00
Matthew Barnes 3eb7903828 MailFolderCache: Use an idle callback instead of MailAsyncEvent. 2010-09-30 14:25:13 -04:00
Matthew Barnes fc2c71593a Remove "type" parameter from mail_async_event_emit().
All remaining cases use MAIL_ASYNC_GUI, so remove mail_async_event_t
altogether.
2010-09-30 13:55:39 -04:00
Matthew Barnes 31b57ed038 Adapt to Camel API changes. 2010-09-28 11:35:55 -04:00
Matthew Barnes a91eeb6471 Pass GCancellable to Camel. 2010-09-28 11:35:55 -04:00
Matthew Barnes cd53ba9900 Coding style cleanups. 2010-09-13 08:28:58 -04:00
Matthew Barnes eb29179da6 Coding style and whitespace cleanup. 2010-07-11 22:25:06 -04:00
Matthew Barnes 137b0743dd Migrate from CamelException to GError. 2010-07-08 14:37:52 -04:00
Milan Crha d729ecb765 Fix typo in mail-folder-cache.c:rename_folders 2010-06-15 21:00:39 +02:00
Milan Crha ead63f16b2 Bug #534369 - [new-mail-notify] Intermittent notifications 2010-06-14 20:15:55 +02:00
Milan Crha a5d79e9f91 Bug #546551 - Dialog for mark-all-read always mentions subfolders 2010-05-21 16:30:40 +02:00
Matthew Barnes 8ad0c51edf Adapt to Camel API changes.
This also removes the boxed CamelObject GType, since CamelObject is an
honest-to-goodness GObject now.
2010-05-07 18:32:16 -04:00
Matthew Barnes aec33928b7 Adapt to Camel API changes. 2010-04-30 11:30:19 -04:00
Milan Crha ad1b3754f7 Bug #545505 - Properly free unused message infos periodically 2010-04-29 16:31:31 +02:00
Matthew Barnes bc90469e7f Camel is now GObject-based. 2010-04-24 11:05:27 -04:00
Matthew Barnes fabb6b035c Only #include Camel's top-level header. 2010-04-02 16:59:20 -04:00
Matthew Barnes f9dd2dd10b Move "section" documentation out of header files. 2010-03-21 17:24:42 -04:00
Matthew Barnes 83a264cd7e Coding style and whitespace cleanup. 2009-12-19 18:36:46 -05:00
Jonathon Jongsma 968ea42023 Kill em_utils_get_data/config_dir(), push down to MailSession
This pushes the get_data_dir() API down to the right level.  At present, it is
still implemented by querying the shell backend for the data dir / config dir.
But this should eventually be reversed (when mail is split off to EDS) so that
the mail daemon is the one responsible for the storage locations and the shell
backend queries the daemon for these values.
2009-12-16 11:10:02 -06:00
Jonathon Jongsma cef8bd60e1 Use the boxed CamelObject type for signal params in MailFolderCache
Previously I was just using G_TYPE_POINTER.  Use the boxed camel object type
from e-util.h instead.  When camel-gobject lands, we'll use G_TYPE_OBJECT
instead.
2009-12-15 14:16:09 -06: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 9c644867fe MailFolderCache: add signal for updated unread counts
Emit a signal when we have an updated unread count for a folder rather than
pushing the update directly to a particular treemodel.  This doesn't yet remove
the dependency on EMFolderTreeModel, but it's a first step.

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
Jonathon Jongsma 6e73a7a8f3 Add signals to MailFolderCache for common events
This will allow us to decouple ourselves from some of the current dependencies,
such as the folder treemodel, the shell, etc.  This just defines the signals,
the next step is to refactor things and actually make other classes use them.

We need one additional signal yet related to indicating the new unread emails,
but that one will require a little more thought I think.

https://bugzilla.gnome.org/show_bug.cgi?id=604627
2009-12-15 14:16:08 -06:00