diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-04-02 05:16:31 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-04-02 05:16:31 +0800 |
commit | d7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee (patch) | |
tree | cf4b217d2027123e882857127f9ac988ff608e34 | |
parent | f82c1236a636c7ccc1d095bc39710c0c43ab1a54 (diff) | |
download | gsoc2013-evolution-d7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee.tar gsoc2013-evolution-d7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee.tar.gz gsoc2013-evolution-d7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee.tar.bz2 gsoc2013-evolution-d7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee.tar.lz gsoc2013-evolution-d7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee.tar.xz gsoc2013-evolution-d7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee.tar.zst gsoc2013-evolution-d7d9c8b2ffcb27a8bc53d1e895fcf840906b69ee.zip |
Set the updated sig->name on the menu item.
2004-04-01 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (signature_changed): Set the updated
sig->name on the menu item.
svn path=/trunk/; revision=25286
-rw-r--r-- | mail/ChangeLog | 3 | ||||
-rw-r--r-- | mail/mail-account-gui.c | 23 |
2 files changed, 23 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 43ef1251a6..c02c8bce98 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,8 @@ 2004-04-01 Jeffrey Stedfast <fejj@ximian.com> + * mail-account-gui.c (signature_changed): Set the updated + sig->name on the menu item. + * importers/netscape-importer.c (netscape_import_accounts): Updated for signature API changes. diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 03f277dfc2..97cffb7fb3 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -1318,6 +1318,21 @@ signature_removed (ESignatureList *signatures, ESignature *sig, MailAccountGui * } 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, MailAccountGui *gui) { GtkWidget *menu; @@ -1329,7 +1344,7 @@ signature_changed (ESignatureList *signatures, ESignature *sig, MailAccountGui * 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; @@ -1347,13 +1362,15 @@ static void sig_fill_menu (MailAccountGui *gui) { ESignatureList *signatures; - GtkWidget *menu; + GtkWidget *menu, *item; EIterator *it; menu = gtk_option_menu_get_menu (gui->sig_menu); clear_menu (menu); - 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); |