ModestMainWindowStyle style;
ModestMainWindowContentsStyle contents_style;
+ gboolean wait_for_settings;
guint progress_bar_timeout;
guint restore_paned_timeout;
priv->progress_bar = NULL;
priv->current_toolbar_mode = TOOLBAR_MODE_NORMAL;
priv->style = MODEST_MAIN_WINDOW_STYLE_SPLIT;
+ priv->wait_for_settings = TRUE;
priv->contents_style = -1; /* invalid contents style. We need this to select it for the first time */
priv->merge_ids = NULL;
priv->optimized_view = FALSE;
modest_osso_load_state ();
/* Restore window & widget settings */
+ priv->wait_for_settings = TRUE;
restore_settings (MODEST_MAIN_WINDOW(self), TRUE);
+ priv->wait_for_settings = FALSE;
/* Check if accounts exist and show the account wizard if not */
gboolean accounts_exist =
priv->style = style;
switch (style) {
case MODEST_MAIN_WINDOW_STYLE_SIMPLE:
+
+ if (!priv->wait_for_settings)
+ modest_widget_memory_save (modest_runtime_get_conf (), G_OBJECT (priv->main_paned),
+ MODEST_CONF_MAIN_PANED_KEY);
/* Remove main paned */
g_object_ref (priv->main_paned);
gtk_container_remove (GTK_CONTAINER (priv->main_vbox), priv->main_paned);
gtk_paned_add2 (GTK_PANED (priv->main_paned), priv->contents_widget);
gtk_container_add (GTK_CONTAINER (priv->main_vbox), priv->main_paned);
+ g_timeout_add (500, (GSourceFunc) restore_paned_timeout_handler, self);
+
break;
default:
g_return_if_reached ();
/* Play a sound (if configured) and make the LED blink */
if (changed & TNY_FOLDER_CHANGE_CHANGED_ADDED_HEADERS) {
- modest_platform_on_new_headers_received (NULL, FALSE);
+ modest_platform_push_email_notification ();
}
}
/* Get toolbar mode from operation id*/
switch (modest_mail_operation_get_type_operation (mail_op)) {
+ case MODEST_MAIL_OPERATION_TYPE_SEND_AND_RECEIVE:
case MODEST_MAIL_OPERATION_TYPE_RECEIVE:
case MODEST_MAIL_OPERATION_TYPE_OPEN:
mode = TOOLBAR_MODE_TRANSFER;
{
ModestMainWindowPrivate *priv = NULL;
+ g_return_val_if_fail (MODEST_IS_MAIN_WINDOW(self), FALSE);
+
priv = MODEST_MAIN_WINDOW_GET_PRIVATE (self);
return (priv->display_state == OSSO_DISPLAY_ON) ? TRUE : FALSE;