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
return FALSE;
} else {
priv->main_window = window;
- load_new_view (self);
- load_new_editor (self);
}
}
const gchar *uid = modest_msg_view_window_get_message_uid
(MODEST_MSG_VIEW_WINDOW (window));
- if (!has_uid (priv->preregistered_uids, uid))
- g_debug ("weird: no uid for window (%s)", uid);
-
MODEST_DEBUG_BLOCK(g_debug ("registering window for %s", uid ? uid : "<none>"););
- priv->preregistered_uids =
- remove_uid (priv->preregistered_uids,
- modest_msg_view_window_get_message_uid
- (MODEST_MSG_VIEW_WINDOW (window)));
+ if (has_uid (priv->preregistered_uids, uid)) {
+ priv->preregistered_uids =
+ remove_uid (priv->preregistered_uids,
+ modest_msg_view_window_get_message_uid
+ (MODEST_MSG_VIEW_WINDOW (window)));
+ }
} else if (MODEST_IS_MSG_EDIT_WINDOW(window)) {
const gchar *uid = modest_msg_edit_window_get_message_uid
(MODEST_MSG_EDIT_WINDOW (window));
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;
}
+