{
GtkEntry* username = g_object_get_data (G_OBJECT (dialog), "username");
GtkEntry* password = g_object_get_data (G_OBJECT (dialog), "password");
+ GtkToggleButton* remember = g_object_get_data (G_OBJECT (dialog), "remember");
soup_auth_authenticate (save->auth,
gtk_entry_get_text (username), gtk_entry_get_text (password));
- if (save->http_auth->filename)
+ if (gtk_toggle_button_get_active (remember) && save->http_auth->filename)
{
save->username = g_strdup (gtk_entry_get_text (username));
save->password = g_strdup (gtk_entry_get_text (password));
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
g_object_set_data (G_OBJECT (dialog), "password", entry);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
+ hbox = gtk_hbox_new (FALSE, 6);
+ label = gtk_check_button_new_with_mnemonic (_("_Remember password"));
+ gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
+ g_object_set_data (G_OBJECT (dialog), "remember", label);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);