aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog1
-rw-r--r--composer/e-msg-composer.c30
2 files changed, 27 insertions, 4 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 23c61881a1..4d22d92c2f 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,6 +1,7 @@
2004-04-01 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c: Updated to use the new signature APIs.
+ (signature_added): _()ify the "Autogenerated" signature name.
2004-03-31 Not Zed <NotZed@Ximian.com>
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 2cf916b6e8..f00cab01d7 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2004,7 +2004,11 @@ signature_added (ESignatureList *signatures, ESignature *sig, EMsgComposer *comp
GtkWidget *menu, *item;
menu = gtk_option_menu_get_menu (composer->sig_menu);
- item = gtk_menu_item_new_with_label (sig->name);
+
+ if (sig->autogen)
+ item = gtk_menu_item_new_with_label (_("Autogenerated"));
+ else
+ item = gtk_menu_item_new_with_label (sig->name);
g_object_set_data ((GObject *) item, "sig", sig);
gtk_widget_show (item);
@@ -2036,6 +2040,21 @@ signature_removed (ESignatureList *signatures, ESignature *sig, EMsgComposer *co
}
static void
+menu_item_set_label (GtkWidget *widget, const char *label)
+{
+ GList *child;
+
+ child = gtk_container_get_children ((GtkContainer *) widget);
+ while (child != NULL) {
+ if (GTK_IS_LABEL (child->data)) {
+ gtk_label_set_text (child->data, label);
+ break;
+ }
+ child = child->next;
+ }
+}
+
+static void
signature_changed (ESignatureList *signatures, ESignature *sig, EMsgComposer *composer)
{
GtkWidget *menu;
@@ -2047,7 +2066,7 @@ signature_changed (ESignatureList *signatures, ESignature *sig, EMsgComposer *co
while (items != NULL) {
cur = g_object_get_data (items->data, "sig");
if (cur == sig) {
- gtk_label_set ((GtkLabel *) ((GtkBin *) items->data)->child, sig->name);
+ menu_item_set_label (items->data, sig->name);
break;
}
items = items->next;
@@ -2102,12 +2121,15 @@ static void
setup_signatures_menu (EMsgComposer *composer)
{
ESignatureList *signatures;
- GtkWidget *menu;
+ GtkWidget *menu, *item;
EIterator *it;
menu = gtk_menu_new ();
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_menu_item_new_with_label (_("None")));
+ item = gtk_menu_item_new_with_label (_("None"));
+ gtk_widget_show (item);
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
signatures = mail_config_get_signatures ();
it = e_list_get_iterator ((EList *) signatures);