Mercurial > pidgin.yaz
changeset 11562:9f521a61ef58
[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 <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 21 Sep 2005 22:57:10 +0000 |
parents | 71945305a87e |
children | 8d0ac3c37831 |
files | src/account.c src/connection.c src/gtkstatusbox.c |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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();
--- 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; }
--- 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);