Commit Graph

199 Commits

Author SHA1 Message Date
f960fd2dff Reduce usage of g_type_class_peek_parent().
G_DEFINE_TYPE macros define a static "parent_class" variable.
2012-06-24 20:31:42 -04:00
6c05b09be1 Do not call g_object_notify() when property didn't change 2012-06-18 15:35:44 +02:00
2a39437ee9 Adapt to single-include E-D-S libraries. 2012-06-03 15:14:03 -04:00
3449e5fcc7 Adapt mail to the new ESource API. 2012-06-02 23:00:40 -04:00
d8d9c03229 EMFolderTreeModel: Remove COL_STRING_URI.
Further chipping away at internal URI usage...
2012-04-08 14:54:02 -04:00
6c04867188 EMFolderTreeModel: Remove the internal 'uri_index' table.
The hash table was redundant.  Eliminating it means less memory used and
less bookkeeping to do when folders are added or removed.
2012-04-08 14:54:02 -04:00
842f25dead Rewrite em_folder_tree_model_lookup_uri() to not use uri_index.
Instead we parse the 'folder_uri' string into CamelStore and folder name
components using e_mail_folder_uri_parse().

Then we query the internal 'store_index' table with our CamelStore for
an EMFolderTreeModelStoreInfo struct.  Then we query the info struct's
'full_hash' table with our folder name for the GtkTreeRowReference.

It's a little more complicated, but it allows us to drop the internal
'uri_index' table so it's a net simplification for EMFolderTreeModel.
2012-04-08 14:54:01 -04:00
23f5773903 Coding style and whitespace cleanup. 2012-02-20 10:04:25 -05:00
61ae36351b Introduce libemail-engine and libemail-utils.
These libraries are bound for E-D-S so they live at the lowest layer of
Evolution for now -- even libeutil can link to them (but please don't).

This is the first step toward moving mail handing to a D-Bus service.
2012-01-18 23:48:47 -05:00
987fb91d5e Reduce diff noise with account-mgmt branch. 2011-12-19 22:27:39 -05:00
f3ec041c74 MailFolderCache: Don't respond to "service-added" signals.
Causes folder info queries on disabled accounts.  Instead respond to
"service-enabled" and "service-disabled" signals, one of which always
immediately follows "service-added".

Comment this in both MailFolderCache and EMFolderTreeModel.
2011-12-12 15:00:55 -05:00
7c0c40f833 Reorder accounts by drag-and-drop.
This implements https://bugzilla.gnome.org/show_bug.cgi?id=663527#c3.

Account reordering is now done by drag-and-drop instead of up/down
buttons.

Turned out to be a wee bit more complicated than I initially thought.

This scraps EAccountManager and EAccountTreeView and replaces them with
new classes centered around EMailAccountStore, which EMailSession owns.

EMailAccountStore is the model behind the account list in Preferences.
The folder tree model now uses it to sort its own top-level rows using
gtk_tree_path_compare().  It also broadcasts account operations through
signals so we don't have to rely so heavily on EAccountList signals,
since EAccountList is going away soon.

Also as part of this work, the e-mail-local.h and e-mail-store.h APIs
have been merged into EMailSession and MailFolderCache.
2011-12-10 21:34:19 -05:00
194ab4aebc EMFolderTreeModel: Check for vfolder store by its UID. 2011-12-07 10:57:35 -05:00
2b7bb054f0 e-mail-store.c: Take EMailSession instead of EMailBackend.
My apologies for flip-flopping the API again.

e-mail-store.c functions used to take an EMailSession, then I changed
it to take an EMailBackend in preparation for my account-mgmt branch.

Having rethought some API decisions on the branch, however, the first
flip-flop proved to be unnecessary.  And now Srini needs the API to use
EMailSession for his mail-factory branch, so I'm flip-flopping again.
2011-10-26 12:46:13 -04:00
56ebfe2f3f Adapt to CamelNetworkSettings changes. 2011-10-24 12:03:54 -04:00
e2b6ff7a6c Miscellaneous cleanups from the account-mgmt branch.
Reducing diff noise so I can see important changes easier when comparing
branches.  A few API changes, but nothing that affects functionality.
2011-09-27 09:31:13 -04:00
f615000f6c EMFolderTreeModel: Don't use parameters in "get_default" functions.
Drop EMFolderTreeModel's "session" property now that it has a "backend"
property and call em_folder_tree_model_set_backend() where we used to
call em_folder_tree_model_set_session().

The session can still be obtained through e_mail_backend_get_session().
2011-09-26 11:45:11 -04:00
e0548d2570 Bug #351025 - Make the order of the mail accounts configurable 2011-09-26 11:45:59 +02:00
fcbbdfbd18 Coding style and whitespace cleanup. 2011-09-04 07:34:32 -04:00
f67a5f3d42 Miscellaneous cleanups.
Reducing diff noise with the account-mgmt branch.

Trying to erode our dependency on EAccount as much as possible, or at
least isolate its usage, to make things easier for me on the branch.
2011-08-30 20:35:11 -04:00
31a0072134 Bug 656720 - Exclude NNTP stores from Create Folder dialog 2011-08-17 23:31:01 -04:00
dd57574c04 Use new CamelService:display-name property.
Simplify, simplify...
2011-08-17 22:27:46 -04:00
6e1e36c047 Using of uninitialized memory in em-folder-tree-model.c:store_info_free 2011-08-16 07:39:06 +02:00
f3648e1cb5 Adapt to new CamelSubscribable interface. 2011-08-15 19:07:13 -04:00
90e4a46478 EMFolderTreeModel: Avoid a potential refcount crash. 2011-08-10 08:50:37 -04:00
7428fc93d5 Miscellaneous mail cleanups. 2011-06-08 13:14:47 -04:00
0c3aa86625 Do not add 'Local delivery' accounts into folder tree
And make folder_tree_get_folder_info_cb() always finish properly,
because evolution doesn't want to quit otherwise.
2011-06-01 23:30:23 +02:00
5a39590c7a Add em_folder_tree_model_list_stores().
Lists all the CamelStores added to EMFolderTreeModel.  Note that
CamelStores with a corresponding EAccount are only added if the EAccount
is enabled, so it's safe to assume all returned CamelStores are enabled.
2011-05-28 18:15:21 -04:00
f3fff4c710 EMFolderTreeModel: Miscellaneous cleanups. 2011-05-28 18:08:56 -04:00
2988537fb0 Remove account from EMFolderTreeModelStoreInfo.
The struct already has a CamelStore, and the CamelStore UID is the same
as the EAccount UID, so it's easy to lookup the corresponding EAccount.
2011-05-28 09:51:25 -04:00
62066e2c17 EMFolderTreeModel: Remove internal account_index.
The store_index is sufficient.
2011-05-28 09:51:24 -04:00
765d58d528 Remove display_name from EMFolderTreeModelStoreInfo.
It was only being used to look up an EAccount UID, but we already had
the CamelStore, and the CamelStore UID is the same as the EAccount UID.
2011-05-28 09:51:24 -04:00
756c8abcb8 Bug #646109 - Fix use of include <config.h> to make sure translations work 2011-05-27 15:23:07 +02:00
4660d0fcad Adapt to CamelFolderInfo.name -> display_name. 2011-05-07 10:29:37 -04:00
575f27afec EMFolderTreeModel: Use the new folder URI format.
Disregard CamelFolderInfo.uri strings.
2011-05-05 16:09:48 -04:00
8f4e85e44c EMFolderTreeModel: Avoid e_get_account_by_source_url().
Use e_get_account_by_uid() instead.
2011-05-05 15:20:23 -04:00
8b23032f2f EMFolderTreeModel: Always populate the CamelStore column.
Even in 'Loading...' rows.  This way we know the CamelStore is present
in all rows, and don't have to test for NULL.
2011-05-05 15:20:23 -04:00
4978b0bf37 Simplify em_folder_tree_model_set_folder_info().
e_mail_folder_uri_equal() uses e_mail_folder_uri_parse() to parse both
URIs, so we can just hand it an 'email://' URI directly.
2011-05-05 15:20:23 -04:00
99680d557b Remove EMFolderTreeModel::folder-added signal.
No one was listening.
2011-05-03 16:30:09 -04:00
1957378edf Change em_folder_tree_model_user_marked_unread() params.
Take a CamelFolder instead of a folder URI string.
2011-05-03 11:30:11 -04:00
c3b983d6e1 Drop 'folder_uri' param from em_utils_folder_is_outbox(). 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
e7136c7289 Replace camel_store_folder_uri_equal() with e_mail_folder_uri_equal(). 2011-05-03 09:42:06 -04:00
397aeade05 Adapt to CamelService changes. 2011-04-21 07:45:45 -04:00
ea0fdf21ec Adapt to sealed up CamelService. 2011-04-17 13:13:55 -04:00
c6fd77460f Coding style and whitespace cleanup. 2011-03-05 12:34:28 -05:00
1301cf02ef Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly 2011-02-25 16:20:41 +01:00
f17bd11443 mail: Use G_DEFINE_TYPE for EmFolderTreeModel 2011-01-22 11:14:49 -05:00
1d8d943f67 Bug #632293 - Do not add POP accounts into folder tree 2010-11-10 11:40:43 +01:00
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