From: Jose Dapena Paz Date: Thu, 24 Apr 2008 15:47:03 +0000 (+0000) Subject: Work to fix NB#84828. X-Git-Tag: git_migration_finished~1430 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=275ed4fbb00e67d4cbcf76723ca903c3e53f407d Work to fix NB#84828. * src/modest-ui-actions.c: * Dim the username in get password dialog _always_. We don't want to allow to change the username from here, as we can cause hangs because tny_account_set_user here is inside a lock. * src/modest-tny-account-store.c: * Remove the call to set user as we never change the password from the get_password dialog. * src/maemo/modest-account-settings-dialog.c: * Allow to change the smtp username in account settings dialog. * src/modest-window-mgr.c: * A minor issue with modality. If the window we're destroying is on top, we remove the current_top reference, to prevent one warning. pmo-trunk-r4460 --- diff --git a/src/maemo/modest-account-settings-dialog.c b/src/maemo/modest-account-settings-dialog.c index b7a5bb3..7746939 100644 --- a/src/maemo/modest-account-settings-dialog.c +++ b/src/maemo/modest-account-settings-dialog.c @@ -1643,8 +1643,8 @@ modest_account_settings_dialog_check_allow_changes (ModestAccountSettingsDialog /* Enable or disable widgets */ gtk_widget_set_sensitive (self->entry_user_username, !username_known); gtk_widget_set_sensitive (self->entry_incomingserver, !username_known); - gtk_widget_set_sensitive (self->entry_outgoingserver, !username_known); - gtk_widget_set_sensitive (self->entry_outgoing_username, !username_known); + /* gtk_widget_set_sensitive (self->entry_outgoingserver, !username_known); */ + /* gtk_widget_set_sensitive (self->entry_outgoing_username, !username_known); */ gtk_widget_set_sensitive (self->entry_incoming_port, !username_known); /* gtk_widget_set_sensitive (self->entry_outgoing_port, !username_known); */ gtk_widget_set_sensitive (self->combo_incoming_security, !username_known); diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 45a0a31..4d29902 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -700,7 +700,13 @@ get_password (TnyAccount *account, const gchar * prompt_not_used, gboolean *canc if (!*cancel) { /* The password will be returned as the result, * but we need to tell tinymail about the username too: */ - tny_account_set_user (account, username); + + /* WARNING: I disabled setting username as this can cause locks. Anyway, + * as now we have the password dialog username entry always dimmed + * this shouldn't be a problem */ + + /* if (username) */ + /* tny_account_set_user (account, username); */ /* Do not save the password in gconf, because * the UI spec says "The password will never diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index ecae79a..1c86dc9 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -526,7 +526,7 @@ modest_ui_actions_on_delete_message (GtkAction *action, ModestWindow *win) if (prev_row_reference != NULL) gtk_tree_row_reference_free (prev_row_reference); if (prev_path != NULL) - gtk_tree_path_free (prev_path); + gtk_tree_path_free (prev_path); } /* Update toolbar dimming state */ @@ -3464,10 +3464,15 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store, gtk_entry_set_text (GTK_ENTRY (entry_username), initial_username); /* Dim this if a connection has ever succeeded with this username, * as per the UI spec: */ - const gboolean username_known = - modest_account_mgr_get_server_account_username_has_succeeded( - modest_runtime_get_account_mgr(), server_account_name); - gtk_widget_set_sensitive (entry_username, !username_known); + /* const gboolean username_known = */ + /* modest_account_mgr_get_server_account_username_has_succeeded( */ + /* modest_runtime_get_account_mgr(), server_account_name); */ + /* gtk_widget_set_sensitive (entry_username, !username_known); */ + + /* We drop the username sensitive code and disallow changing it here + * as tinymail does not support really changing the username in the callback + */ + gtk_widget_set_sensitive (entry_username, FALSE); #ifdef MODEST_PLATFORM_MAEMO /* Auto-capitalization is the default, so let's turn it off: */ diff --git a/src/widgets/modest-window-mgr.c b/src/widgets/modest-window-mgr.c index b4cda24..6e93da1 100644 --- a/src/widgets/modest-window-mgr.c +++ b/src/widgets/modest-window-mgr.c @@ -915,6 +915,13 @@ modest_window_mgr_unregister_window (ModestWindowMgr *self, /* cancel open and receive operations */ cancel_window_operations (window); + /* Check if it's the topmost window, and remove the window from the stack. + * This is needed for the cases there's no other topmost window that will + * replace it in topmost handler. + */ + if (window == priv->current_top) + priv->current_top = NULL; + /* Disconnect the "window-state-event" handler, we won't need it anymore */ if (priv->window_state_uids) { #ifdef MODEST_PLATFORM_MAEMO