From afeeff5b22e0ba6deef0b02622823e939d067f9a Mon Sep 17 00:00:00 2001 From: Sankar P Date: Thu, 10 Apr 2008 11:20:04 +0000 Subject: Change the name of the variable we look for in the glade file. 2008-04-10 Sankar P * em-composer-prefs.c: (em_composer_prefs_construct): Change the name of the variable we look for in the glade file. Also add some if conditions to avoid certain crash. ** See bug #527327 svn path=/trunk/; revision=35352 --- mail/ChangeLog | 10 ++++++++++ mail/em-composer-prefs.c | 22 +++++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 258bd680f8..bb817387d7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2008-04-10 Sankar P + + * em-composer-prefs.c: (em_composer_prefs_construct): + Change the name of the variable we look for in + the glade file. + + Also add some if conditions to avoid certain crash. + + ** See bug #527327 + 2008-04-09 Matthew Barnes * mail-config.glade: diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 4e9b846b37..230d32526c 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -946,7 +946,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) gconf_bridge_bind_property (bridge, key, G_OBJECT (widget), "active"); prefs->charset = GTK_OPTION_MENU ( - glade_xml_get_widget (gui, "omenuCharset")); + glade_xml_get_widget (gui, "omenuCharset1")); buf = gconf_client_get_string ( client, "/apps/evolution/mail/composer/charset", NULL); menu = e_charset_picker_new ( @@ -991,14 +991,18 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) spell_setup (prefs); /* Forwards and Replies */ - prefs->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle")); + prefs->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle")); style = gconf_client_get_int (client, "/apps/evolution/mail/format/forward_style", NULL); gtk_option_menu_set_history (prefs->forward_style, style); style = 0; + gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->forward_style)), - attach_style_info, &style); - option_menu_connect (prefs, prefs->forward_style, G_CALLBACK (style_activate), - "/apps/evolution/mail/format/forward_style"); + attach_style_info, &style); + + if (gtk_option_menu_get_menu (prefs->forward_style)) { + option_menu_connect (prefs, prefs->forward_style, G_CALLBACK (style_activate), + "/apps/evolution/mail/format/forward_style"); + } prefs->reply_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuReplyStyle")); style = gconf_client_get_int (client, "/apps/evolution/mail/format/reply_style", NULL); @@ -1006,8 +1010,12 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) style = 0; gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->reply_style)), attach_style_info_reply, &style); - option_menu_connect (prefs, prefs->reply_style, G_CALLBACK (style_activate), - "/apps/evolution/mail/format/reply_style"); + + + if (gtk_option_menu_get_menu (prefs->reply_style)) { + option_menu_connect (prefs, prefs->reply_style, G_CALLBACK (style_activate), + "/apps/evolution/mail/format/reply_style"); + } /* Signatures */ dialog = (GtkDialog *) gtk_dialog_new (); -- cgit