# HG changeset patch # User Sean Egan # Date 1127343430 0 # Node ID 9f521a61ef58d92e6f76f95077ca396da31d3a89 # Parent 71945305a87e3838986b38bd671fffd7b6b73d48 [gaim-migrate @ 13828] More tiny changes. Forward port my saving password through failed connections change, and attach to the Message Send signal of the statusbox imhtml, so that hitting Enter sets the message immediately. I like the timeout; but this will probably make more sense to most people. committer: Tailor Script diff -r 71945305a87e -r 9f521a61ef58 src/account.c --- a/src/account.c Wed Sep 21 02:05:08 2005 +0000 +++ b/src/account.c Wed Sep 21 22:57:10 2005 +0000 @@ -915,10 +915,9 @@ } if(remember) - gaim_account_set_remember_password(account, TRUE); + gaim_account_set_remember_password(account, TRUE); - if (gaim_account_get_remember_password(account)) - gaim_account_set_password(account, entry); + gaim_account_set_password(account, entry); gaim_connection_new(account, FALSE, entry); } @@ -1010,6 +1009,8 @@ gc = gaim_account_get_connection(account); gaim_connection_destroy(gc); + if (!gaim_account_get_remember_password(account)) + gaim_account_set_password(account, NULL); gaim_account_set_connection(account, NULL); account->disconnecting = FALSE; @@ -1168,10 +1169,6 @@ g_free(account->password); account->password = NULL; - - if (!gaim_account_get_remember_password(account)) - return; - account->password = (password == NULL ? NULL : g_strdup(password)); schedule_accounts_save(); diff -r 71945305a87e -r 9f521a61ef58 src/connection.c --- a/src/connection.c Wed Sep 21 02:05:08 2005 +0000 +++ b/src/connection.c Wed Sep 21 22:57:10 2005 +0000 @@ -433,9 +433,10 @@ gaim_connection_disconnect_cb(gpointer data) { GaimAccount *account = data; - + char *password = g_strdup(gaim_account_get_password(account)); gaim_account_disconnect(account); - + gaim_account_set_password(account, password); + g_free(password); return FALSE; } diff -r 71945305a87e -r 9f521a61ef58 src/gtkstatusbox.c --- a/src/gtkstatusbox.c Wed Sep 21 02:05:08 2005 +0000 +++ b/src/gtkstatusbox.c Wed Sep 21 22:57:10 2005 +0000 @@ -31,6 +31,7 @@ #include "gtkstatusbox.h" static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data); +static void remove_typing_cb(GtkGaimStatusBox *box); static void gtk_gaim_status_box_changed(GtkComboBox *box); static void gtk_gaim_status_box_size_request (GtkWidget *widget, GtkRequisition *requisition); @@ -281,6 +282,7 @@ status_box->imhtml = gtk_imhtml_new(NULL, NULL); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml)); g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(imhtml_changed_cb), status_box); + g_signal_connect_swapped(G_OBJECT(status_box->imhtml), "message_send", G_CALLBACK(remove_typing_cb), status_box); gtk_imhtml_set_editable(GTK_IMHTML(status_box->imhtml), TRUE); gtk_widget_set_parent(status_box->vbox, GTK_WIDGET(status_box)); status_box->sw = gtk_scrolled_window_new(NULL, NULL);