diff options
Diffstat (limited to 'mail/mail-session.c')
-rw-r--r-- | mail/mail-session.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c index c338ad3e63..8858af01f5 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -264,87 +264,6 @@ request_password(struct _pass_msg *m) gtk_widget_show(m->check); } -#if 0 - - /* FIXME: Remove this total snot */ - - /* assume we can use any widget to translate string for display */ - check_label = gtk_label_new (""); - title = e_utf8_to_gtk_string (GTK_WIDGET (check_label), m->prompt); - password_dialogue = (GnomeDialog *)dialogue = gnome_request_dialog (m->secret, title, NULL, 0, pass_got, m, NULL); - g_free(title); - password_destroy_id = g_signal_connect (dialogue, "destroy", request_password_deleted, m); - - check = gtk_check_button_new (); - gtk_misc_set_alignment (GTK_MISC (check_label), 0.0, 0.5); - accel_key = gtk_label_parse_uline (GTK_LABEL (check_label), - m->service_url ? _("_Remember this password") : - _("_Remember this password for the remainder of this session")); - gtk_widget_add_accelerator (check, "clicked", - GNOME_DIALOG (password_dialogue)->accelerators, - accel_key, - GDK_MOD1_MASK, 0); - gtk_container_add (GTK_CONTAINER (check), check_label); - - show = TRUE; - - if (m->service_url) { - mca = mail_config_get_account_by_source_url(m->service_url); - if (mca) - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), mca->source->save_passwd); - else { - mca = mail_config_get_account_by_transport_url (m->service_url); - if (mca) - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), mca->transport->save_passwd); - else { - d(printf ("Cannot figure out which account owns URL \"%s\"\n", m->service_url)); - show = FALSE; - } - } - } - - if (show) - gtk_widget_show_all (check); - - /* do some dirty stuff to put the checkbutton after the entry */ - entry = NULL; - children = gtk_container_children (GTK_CONTAINER (GNOME_DIALOG (dialogue)->vbox)); - for (iter = children; iter; iter = iter->next) { - if (GTK_IS_ENTRY (iter->data)) { - entry = GTK_WIDGET (iter->data); - break; - } - } - g_list_free (children); - - if (entry) { - g_object_ref((entry)); - gtk_container_remove (GTK_CONTAINER (GNOME_DIALOG (dialogue)->vbox), entry); - } - - gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialogue)->vbox), check, TRUE, FALSE, 0); - - if (entry) { - gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialogue)->vbox), entry, TRUE, FALSE, 0); - gtk_widget_grab_focus (entry); - g_object_unref((entry)); - } - - m->check = check; - - if (mca) { - char *name; - - name = e_utf8_to_gtk_string (GTK_WIDGET (dialogue), mca->name); - title = g_strdup_printf (_("Enter Password for %s"), name); - g_free (name); - } else - title = g_strdup (_("Enter Password")); - - gtk_window_set_title (GTK_WINDOW (dialogue), title); - g_free (title); -#endif - if (m->ismain) gtk_dialog_run(password_dialogue); else |