static ModestWindow *modest_window_mgr_show_initial_window_default (ModestWindowMgr *self);
static ModestWindow *modest_window_mgr_get_current_top_default (ModestWindowMgr *self);
static gboolean modest_window_mgr_screen_is_on_default (ModestWindowMgr *self);
+static void modest_window_mgr_create_caches_default (ModestWindowMgr *self);
static void modest_window_mgr_on_queue_changed (ModestMailOperationQueue *queue,
ModestMailOperation *mail_op,
ModestMailOperationQueueNotification type,
mgr_class->show_initial_window = modest_window_mgr_show_initial_window_default;
mgr_class->get_current_top = modest_window_mgr_get_current_top_default;
mgr_class->screen_is_on = modest_window_mgr_screen_is_on_default;
+ mgr_class->create_caches = modest_window_mgr_create_caches_default;
g_type_class_add_private (gobject_class, sizeof(ModestWindowMgrPrivate));
{
ModestWindowMgrPrivate *priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
if ((priv->cached_view == NULL) && (priv->idle_load_view_id == 0))
- priv->idle_load_view_id = g_idle_add ((GSourceFunc) idle_load_view, self);
+ priv->idle_load_view_id = g_timeout_add (2500, (GSourceFunc) idle_load_view, self);
}
static void
{
ModestWindowMgrPrivate *priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
if ((priv->cached_editor == NULL) && (priv->idle_load_editor_id == 0))
- priv->idle_load_editor_id = g_idle_add ((GSourceFunc) idle_load_editor, self);
+ priv->idle_load_editor_id = g_timeout_add (5000, (GSourceFunc) idle_load_editor, self);
}
static void
g_return_if_fail (TNY_IS_HEADER(header));
priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
- uid = modest_tny_folder_get_header_unique_id (header);
-
- if (uid == NULL)
+ if (alt_uid != NULL) {
uid = g_strdup (alt_uid);
-
+ } else {
+ uid = modest_tny_folder_get_header_unique_id (header);
+ }
+
if (!has_uid (priv->preregistered_uids, uid)) {
MODEST_DEBUG_BLOCK(g_debug ("registering new uid %s", uid););
priv->preregistered_uids = append_uid (priv->preregistered_uids, uid);
return FALSE;
} else {
priv->main_window = window;
- load_new_view (self);
- load_new_editor (self);
}
}
return TRUE;
}
+void
+modest_window_mgr_create_caches (ModestWindowMgr *mgr)
+{
+ MODEST_WINDOW_MGR_GET_CLASS (mgr)->create_caches (mgr);
+}
+
+static void
+modest_window_mgr_create_caches_default (ModestWindowMgr *self)
+{
+ load_new_editor (self);
+ load_new_view (self);
+}
+
static gboolean
tny_list_find (TnyList *list, GObject *item)
{
return account_ops;
}
+