diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-mt.c | 30 |
2 files changed, 33 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 8babbc6bea..f0bf90c3e3 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2001-07-26 Peter Williams <peterw@ximian.com> + + * mail-mt.c (do_get_pass): Use magic to make the password + remembering checkbutton come after the entry, visually. + 2001-07-26 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (write_headers): Respect Gtk theme colors for the diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 9f330b217a..a4d7f91d9a 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -424,8 +424,9 @@ do_get_pass(struct _mail_msg *mm) struct _pass_msg *m = (struct _pass_msg *)mm; const MailConfigAccount *mca; GtkWidget *dialogue; - GtkWidget *tb; - + GtkWidget *tb, *entry; + GList *children, *iter; + /* this api is just awful ... hence the hacks */ dialogue = gnome_request_dialog(m->secret, m->prompt, NULL, 0, pass_got, m, NULL); @@ -435,8 +436,33 @@ do_get_pass(struct _mail_msg *mm) tb = gtk_check_button_new_with_label (_("Remember this password")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tb), mca->source->save_passwd); gtk_widget_show (tb); + + /* 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) { + gtk_object_ref (GTK_OBJECT (entry)); + gtk_container_remove (GTK_CONTAINER (GNOME_DIALOG (dialogue)->vbox), entry); + } + gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialogue)->vbox), tb, TRUE, FALSE, 0); + + if (entry) { + gtk_box_pack_end (GTK_BOX (GNOME_DIALOG (dialogue)->vbox), entry, TRUE, FALSE, 0); + gtk_object_unref (GTK_OBJECT (entry)); + } + m->tb = tb; e_container_foreach_leaf((GtkContainer *)dialogue, focus_on_entry, NULL); |