key = _modest_widget_memory_get_keyname (name, MODEST_WIDGET_MEMORY_PARAM_POS);
percent = modest_conf_get_int (conf, key, NULL);
key = _modest_widget_memory_get_keyname (name, MODEST_WIDGET_MEMORY_PARAM_POS);
percent = modest_conf_get_int (conf, key, NULL);
- pos = GTK_WIDGET (paned)->allocation.width * percent /100;
- gtk_paned_set_position (paned, pos);
+ if (GTK_WIDGET_VISIBLE (GTK_WIDGET (paned)) && GTK_WIDGET_REALIZED (GTK_WIDGET (paned))) {
+ pos = GTK_WIDGET (paned)->allocation.width * percent /100;
+ gtk_paned_set_position (paned, pos);
+ }
if (modest_conf_key_exists (conf, sort_key, NULL)) {
gchar *value = modest_conf_get_string (conf, sort_key, NULL);
sscanf (value, "%d:%d:%d", &sort_colid, &sort_type, &sort_flag_id);
if (modest_conf_key_exists (conf, sort_key, NULL)) {
gchar *value = modest_conf_get_string (conf, sort_key, NULL);
sscanf (value, "%d:%d:%d", &sort_colid, &sort_type, &sort_flag_id);
- acc_data = modest_account_mgr_get_account_data (mgr, (const gchar*) default_acc);
- server_acc_id = (const gchar *) acc_data->store_account->account_name;
+ settings = modest_account_mgr_load_account_settings (mgr, (const gchar*) default_acc);
+ store_settings = modest_account_settings_get_store_settings (settings);
+ server_acc_id = modest_server_account_settings_get_account_name (store_settings);