aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-composer-prefs.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-03-30 06:29:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-03-30 06:29:15 +0800
commitc280ce21b80b39dbbc40bd91a9f97335190955c1 (patch)
treed43fc40ff0c15d0353de067232208f9deabda532 /mail/mail-composer-prefs.c
parenta455db74f5f8f9549ad749e9f053ed2473c58809 (diff)
downloadgsoc2013-evolution-c280ce21b80b39dbbc40bd91a9f97335190955c1.tar.gz
gsoc2013-evolution-c280ce21b80b39dbbc40bd91a9f97335190955c1.tar.zst
gsoc2013-evolution-c280ce21b80b39dbbc40bd91a9f97335190955c1.zip
Same here.
2002-03-29 Jeffrey Stedfast <fejj@ximian.com> * mail-composer-prefs.c (mail_composer_prefs_construct): Same here. * mail-preferences.c (mail_preferences_construct): Do some gtk hackery action so we can detect if a option menu has changed. svn path=/trunk/; revision=16290
Diffstat (limited to 'mail/mail-composer-prefs.c')
-rw-r--r--mail/mail-composer-prefs.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c
index 6b1f4e09dc..9b20e2fe77 100644
--- a/mail/mail-composer-prefs.c
+++ b/mail/mail-composer-prefs.c
@@ -144,6 +144,23 @@ menu_changed (GtkWidget *widget, gpointer user_data)
}
static void
+option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
+{
+ GtkWidget *menu, *item;
+ GList *items;
+
+ menu = gtk_option_menu_get_menu (omenu);
+
+ items = GTK_MENU_SHELL (menu)->children;
+ while (items) {
+ item = items->data;
+ gtk_signal_connect (GTK_OBJECT (item), "activate",
+ menu_changed, user_data);
+ items = items->next;
+ }
+}
+
+static void
mail_composer_prefs_construct (MailComposerPrefs *prefs)
{
GtkWidget *toplevel, *menu;
@@ -183,8 +200,7 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
menu = e_charset_picker_new (mail_config_get_default_charset ());
gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu));
- gtk_signal_connect (GTK_OBJECT (prefs->charset), "clicked",
- menu_changed, prefs);
+ option_menu_connect (prefs->charset, prefs);
/* Spell Checking */
prefs->spell_check = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEnableSpellChecking"));
@@ -197,16 +213,14 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
style = 0;
gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->forward_style)),
attach_style_info, &style);
- gtk_signal_connect (GTK_OBJECT (prefs->forward_style), "clicked",
- menu_changed, prefs);
+ option_menu_connect (prefs->forward_style, prefs);
prefs->reply_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuReplyStyle"));
gtk_option_menu_set_history (prefs->reply_style, mail_config_get_default_reply_style ());
style = 0;
gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->reply_style)),
attach_style_info, &style);
- gtk_signal_connect (GTK_OBJECT (prefs->reply_style), "clicked",
- menu_changed, prefs);
+ option_menu_connect (prefs->reply_style, prefs);
/* FIXME: do the other tabs... */
}