/* 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);
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
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 */
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: */
/* 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