aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-02 05:17:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-02 05:17:09 +0800
commite0f8febd78facee97682c102b0dbdc98d65c2189 (patch)
treeaa5477cd33d004e71bc7326157b6a6b15b950b61
parentd7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee (diff)
downloadgsoc2013-evolution-e0f8febd78facee97682c102b0dbdc98d65c2189.tar
gsoc2013-evolution-e0f8febd78facee97682c102b0dbdc98d65c2189.tar.gz
gsoc2013-evolution-e0f8febd78facee97682c102b0dbdc98d65c2189.tar.bz2
gsoc2013-evolution-e0f8febd78facee97682c102b0dbdc98d65c2189.tar.lz
gsoc2013-evolution-e0f8febd78facee97682c102b0dbdc98d65c2189.tar.xz
gsoc2013-evolution-e0f8febd78facee97682c102b0dbdc98d65c2189.tar.zst
gsoc2013-evolution-e0f8febd78facee97682c102b0dbdc98d65c2189.zip
Updated to use the new signature APIs. (signature_added): _()ify the
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. svn path=/trunk/; revision=25287
-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);