diff options
author | Peter Williams <peterw@ximian.com> | 2001-07-27 03:47:05 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-07-27 03:47:05 +0800 |
commit | 871a58ea8aa324673075ceb24246faf7b56739c3 (patch) | |
tree | be56e5b33e57052f0845c581312cc12ac3b28faa /mail/mail-mt.c | |
parent | ad7a5a909534915ed585e2795606f11d7260e0c7 (diff) | |
download | gsoc2013-evolution-871a58ea8aa324673075ceb24246faf7b56739c3.tar gsoc2013-evolution-871a58ea8aa324673075ceb24246faf7b56739c3.tar.gz gsoc2013-evolution-871a58ea8aa324673075ceb24246faf7b56739c3.tar.bz2 gsoc2013-evolution-871a58ea8aa324673075ceb24246faf7b56739c3.tar.lz gsoc2013-evolution-871a58ea8aa324673075ceb24246faf7b56739c3.tar.xz gsoc2013-evolution-871a58ea8aa324673075ceb24246faf7b56739c3.tar.zst gsoc2013-evolution-871a58ea8aa324673075ceb24246faf7b56739c3.zip |
Use magic to make the password remembering checkbutton come after the
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.
svn path=/trunk/; revision=11432
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r-- | mail/mail-mt.c | 30 |
1 files changed, 28 insertions, 2 deletions
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); |