diff options
author | Sankar P <psankar@novell.com> | 2008-04-10 19:20:04 +0800 |
---|---|---|
committer | Sankarasivasubramanian Pasupathilingam <psankar@src.gnome.org> | 2008-04-10 19:20:04 +0800 |
commit | afeeff5b22e0ba6deef0b02622823e939d067f9a (patch) | |
tree | 237294a6f40b16583e439395802fb5768d22c85e | |
parent | a04ddcee5a2c42f98319ec5c1f26b7f63f52c0ef (diff) | |
download | gsoc2013-evolution-afeeff5b22e0ba6deef0b02622823e939d067f9a.tar gsoc2013-evolution-afeeff5b22e0ba6deef0b02622823e939d067f9a.tar.gz gsoc2013-evolution-afeeff5b22e0ba6deef0b02622823e939d067f9a.tar.bz2 gsoc2013-evolution-afeeff5b22e0ba6deef0b02622823e939d067f9a.tar.lz gsoc2013-evolution-afeeff5b22e0ba6deef0b02622823e939d067f9a.tar.xz gsoc2013-evolution-afeeff5b22e0ba6deef0b02622823e939d067f9a.tar.zst gsoc2013-evolution-afeeff5b22e0ba6deef0b02622823e939d067f9a.zip |
Change the name of the variable we look for in the glade file.
2008-04-10 Sankar P <psankar@novell.com>
* 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
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/em-composer-prefs.c | 22 |
2 files changed, 25 insertions, 7 deletions
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 <psankar@novell.com> + + * 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 <mbarnes@redhat.com> * 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 (); |