projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added new fixes to changelog, week 31 post release - 3rd Aug.
[modest]
/
src
/
modest-runtime.c
diff --git
a/src/modest-runtime.c
b/src/modest-runtime.c
index
66a206d
..
f39b5c2
100644
(file)
--- a/
src/modest-runtime.c
+++ b/
src/modest-runtime.c
@@
-93,10
+93,18
@@
modest_runtime_get_account_mgr (void)
return modest_singletons_get_account_mgr (_singletons);
}
return modest_singletons_get_account_mgr (_singletons);
}
+ModestEmailClipboard*
+modest_runtime_get_email_clipboard (void)
+{
+ g_return_val_if_fail (_singletons, NULL);
+ return modest_singletons_get_email_clipboard (_singletons);
+}
+
ModestTnyAccountStore*
modest_runtime_get_account_store (void)
{
ModestTnyAccountStore*
modest_runtime_get_account_store (void)
{
- g_return_val_if_fail (_singletons, NULL);
+ if (!_singletons)
+ return NULL;
return modest_singletons_get_account_store (_singletons);
}
return modest_singletons_get_account_store (_singletons);
}
@@
-155,14
+163,29
@@
modest_runtime_get_send_queue (TnyTransportAccount *account)
send_queue_cache = modest_cache_mgr_get_cache (cache_mgr,
MODEST_CACHE_MGR_CACHE_TYPE_SEND_QUEUE);
send_queue_cache = modest_cache_mgr_get_cache (cache_mgr,
MODEST_CACHE_MGR_CACHE_TYPE_SEND_QUEUE);
+ /* Each modest account has its own send queue.
+ * Note that each modest account will have its own outbox folder,
+ * returned by TnySendQueue::get_outbox_func().
+ */
if (!g_hash_table_lookup_extended (send_queue_cache, account, &orig_key, &send_queue)) {
if (!g_hash_table_lookup_extended (send_queue_cache, account, &orig_key, &send_queue)) {
+ /* Note that this send queue will start sending messages from its outbox
+ * as soon as it is instantiated: */
send_queue = (gpointer)modest_tny_send_queue_new (TNY_CAMEL_TRANSPORT_ACCOUNT(account));
send_queue = (gpointer)modest_tny_send_queue_new (TNY_CAMEL_TRANSPORT_ACCOUNT(account));
+
g_hash_table_insert (send_queue_cache, account, send_queue);
g_hash_table_insert (send_queue_cache, account, send_queue);
+ g_object_ref (send_queue);
}
return MODEST_TNY_SEND_QUEUE(send_queue);
}
}
return MODEST_TNY_SEND_QUEUE(send_queue);
}
+void modest_runtime_remove_all_send_queues ()
+{
+ ModestCacheMgr *cache_mgr = modest_singletons_get_cache_mgr (_singletons);
+
+ modest_cache_mgr_flush (cache_mgr, MODEST_CACHE_MGR_CACHE_TYPE_SEND_QUEUE);
+}
+
ModestWindowMgr *
modest_runtime_get_window_mgr (void)
{
ModestWindowMgr *
modest_runtime_get_window_mgr (void)
{