diff -r 34e5e09a6291 -r fa72f1e5cd77 pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Tue Mar 26 17:08:15 2013 +0100 +++ b/pidgin/gtkaccount.c Thu Mar 28 09:49:16 2013 +0100 @@ -118,7 +118,7 @@ GtkWidget *login_frame; GtkWidget *protocol_menu; GtkWidget *password_box; - char *password; + gchar *password; GtkWidget *username_entry; #if GTK_CHECK_VERSION(3,0,0) GdkRGBA username_entry_hint_color; @@ -733,10 +733,11 @@ /* Set the fields. */ if (dialog->account != NULL) { - if (dialog->password && - purple_account_get_remember_password(dialog->account)) + if (dialog->password && purple_account_get_remember_password( + dialog->account)) { gtk_entry_set_text(GTK_ENTRY(dialog->password_entry), dialog->password); + } gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(dialog->remember_pass_check), @@ -1382,7 +1383,7 @@ purple_signals_disconnect_by_handle(dialog); - g_free(dialog->password); + purple_str_wipe(dialog->password); g_free(dialog); return FALSE; @@ -1527,7 +1528,8 @@ /* Remember Password */ - remember = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->remember_pass_check)); + remember = gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(dialog->remember_pass_check)); if(!remember) purple_keyring_set_password(account, NULL, NULL, NULL); @@ -1695,11 +1697,9 @@ static void pidgin_account_dialog_show_continue(PurpleAccount *account, - const char *password, - GError *error, - gpointer data) + const gchar *password, GError *error, gpointer _type) { - PidginAccountDialogType type = (PidginAccountDialogType)GPOINTER_TO_INT(data); + PidginAccountDialogType type = GPOINTER_TO_INT(_type); AccountPrefsDialog *dialog; GtkWidget *win; GtkWidget *main_vbox; @@ -1722,10 +1722,10 @@ g_hash_table_insert(account_pref_wins, account, dialog); } - dialog->account = account; + dialog->account = account; dialog->password = g_strdup(password); - dialog->type = type; - dialog->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); + dialog->type = type; + dialog->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); if (dialog->account == NULL) { /* Select the first prpl in the list*/ @@ -1821,8 +1821,7 @@ } void -pidgin_account_dialog_show(PidginAccountDialogType type, - PurpleAccount *account) +pidgin_account_dialog_show(PidginAccountDialogType type, PurpleAccount *account) { /* this is to make sure the password will be cached */ purple_account_get_password(account,