aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'composer/e-composer-actions.c')
-rw-r--r--composer/e-composer-actions.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index 13fe48495e..b47b60241a 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -401,11 +401,15 @@ e_composer_actions_init (EMsgComposer *composer)
{
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
+ GtkhtmlEditor *editor;
+ EWebView *web_view;
gboolean visible;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
- ui_manager = gtkhtml_editor_get_ui_manager (GTKHTML_EDITOR (composer));
+ editor = GTKHTML_EDITOR (composer);
+ web_view = e_msg_composer_get_web_view (composer);
+ ui_manager = gtkhtml_editor_get_ui_manager (editor);
/* Composer Actions */
action_group = composer->priv->composer_actions;
@@ -445,6 +449,21 @@ e_composer_actions_init (EMsgComposer *composer)
g_object_set (
ACTION (SAVE_DRAFT), "short-label", _("Save Draft"), NULL);
+ g_object_bind_property (
+ web_view, "editable",
+ GTKHTML_EDITOR_ACTION_EDIT_MENU (editor), "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ web_view, "editable",
+ GTKHTML_EDITOR_ACTION_FORMAT_MENU (editor), "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ web_view, "editable",
+ GTKHTML_EDITOR_ACTION_INSERT_MENU (editor), "sensitive",
+ G_BINDING_SYNC_CREATE);
+
#if defined (HAVE_NSS)
visible = TRUE;
#else