aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-07-27 03:47:05 +0800
committerPeter Williams <peterw@src.gnome.org>2001-07-27 03:47:05 +0800
commit871a58ea8aa324673075ceb24246faf7b56739c3 (patch)
treebe56e5b33e57052f0845c581312cc12ac3b28faa
parentad7a5a909534915ed585e2795606f11d7260e0c7 (diff)
downloadgsoc2013-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
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-mt.c30
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);