From c3b248ff4bca0b226f1c33896a89243fdec89def Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 19 Sep 2001 00:16:34 +0000 Subject: Make the title translatable, and also use the account name when possible. 2001-09-18 Jeffrey Stedfast * mail-mt.c (do_get_pass): Make the title translatable, and also use the account name when possible. Sorta fixes bug #6277. svn path=/trunk/; revision=12964 --- mail/ChangeLog | 5 +++++ mail/mail-mt.c | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index e5fae8ac50..0b32158e67 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2001-09-18 Jeffrey Stedfast + + * mail-mt.c (do_get_pass): Make the title translatable, and also + use the account name when possible. Sorta fixes bug #6277. + 2001-09-17 * mail-send-recv.c (get_receive_type): Function to get the real diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 7ca2b3342c..634dd91eae 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "folder-browser-factory.h" #include "e-util/e-msgport.h" @@ -430,11 +431,12 @@ static void do_get_pass (struct _mail_msg *mm) { struct _pass_msg *m = (struct _pass_msg *)mm; - const MailConfigAccount *mca; + const MailConfigAccount *mca = NULL; GtkWidget *dialogue; GtkWidget *check, *entry; GList *children, *iter; gboolean show; + char *title; /* this api is just awful ... hence the hacks */ dialogue = gnome_request_dialog (m->secret, m->prompt, NULL, @@ -494,7 +496,18 @@ do_get_pass (struct _mail_msg *mm) /* hrm, we can't run this async since the gui_port from which we're called will reply to our message for us */ - gtk_window_set_title (GTK_WINDOW(dialogue), "Enter Password"); + 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); + gnome_dialog_run_and_close ((GnomeDialog *)dialogue); /*gtk_widget_show(dialogue);*/ -- cgit v1.2.3