diff options
author | Milan Crha <mcrha@redhat.com> | 2008-05-27 02:02:30 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-05-27 02:02:30 +0800 |
commit | c9d8512b2e3a29263935bef58ae1c01469dee0c4 (patch) | |
tree | b322095bf80e1075b72cf6cac6be13057e18dae4 /mail/em-composer-prefs.c | |
parent | f4db10997283c2455a81e4d6342492aa902ad27b (diff) | |
download | gsoc2013-evolution-c9d8512b2e3a29263935bef58ae1c01469dee0c4.tar.gz gsoc2013-evolution-c9d8512b2e3a29263935bef58ae1c01469dee0c4.tar.zst gsoc2013-evolution-c9d8512b2e3a29263935bef58ae1c01469dee0c4.zip |
** Fix for bug #322553
2008-05-26 Milan Crha <mcrha@redhat.com>
** Fix for bug #322553
* mail-config.h: (mail_config_scripts_disabled):
* mail-config.c: (struct MailConfig), (mail_config_init),
(mail_config_scripts_disabled): New helper function.
* em-composer-prefs.c: (sig_load_preview):
Write to html stream at least one character.
* em-composer-prefs.c: (em_composer_prefs_construct): Disable
signature's Add Script button when not approved running scripts.
* mail-config.c: (mail_config_get_gconf_client): Ensure init.
* mail-config.c: (mail_config_signature_run_script): Do not run
script when disabled in /desktop/gnome/lockdown/disable_command_line.
svn path=/trunk/; revision=35551
Diffstat (limited to 'mail/em-composer-prefs.c')
-rw-r--r-- | mail/em-composer-prefs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index dc7b3b9c4c..41975589ef 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -168,8 +168,11 @@ sig_load_preview (EMComposerPrefs *prefs, else str = e_msg_composer_get_sig_file_content ( signature->filename, signature->html); - if (!str) - str = g_strdup (""); + if (!str || !*str) { + /* make html stream happy and write at least one character */ + g_free (str); + str = g_strdup (" "); + } if (signature->html) { gtk_html_load_from_string (html, str, strlen (str)); @@ -1045,7 +1048,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) prefs->sig_add = GTK_BUTTON (widget); widget = glade_xml_get_widget (gui, "cmdSignatureAddScript"); - gtk_widget_set_sensitive (widget, sensitive); + gtk_widget_set_sensitive (widget, sensitive && !mail_config_scripts_disabled ()); g_signal_connect ( widget, "clicked", G_CALLBACK (sig_add_script_cb), prefs); |