#define MODEST_TOOLBAR_ICON_PREV "general_back"
#define MODEST_TOOLBAR_ICON_FIND "general_search"
#define MODEST_TOOLBAR_ICON_DOWNLOAD_IMAGES "email_download_external_images"
+#define MODEST_TOOLBAR_ICON_INSERT_IMAGES "general_toolbar_images"
/* Stock icon names */
#define MODEST_STOCK_MAIL_SEND "modest-stock-mail-send"
{ "/ToolBar/ToolbarSend", G_CALLBACK(modest_ui_dimming_rules_on_send) },
{ "/ToolBar/ActionsBold", G_CALLBACK(modest_ui_dimming_rules_on_set_style) },
{ "/ToolBar/ActionsItalics", G_CALLBACK(modest_ui_dimming_rules_on_set_style) },
+ { "/ToolBar/ActionsInsertImage", G_CALLBACK(modest_ui_dimming_rules_on_insert_image) },
};
G_END_DECLS
tool_item = gtk_ui_manager_get_widget (parent_priv->ui_manager, "/ToolBar/ActionsItalics");
gtk_tool_item_set_expand (GTK_TOOL_ITEM (tool_item), TRUE);
gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (tool_item), TRUE);
+ tool_item = gtk_ui_manager_get_widget (parent_priv->ui_manager, "/ToolBar/ActionsInsertImage");
+ gtk_tool_item_set_expand (GTK_TOOL_ITEM (tool_item), TRUE);
+ gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (tool_item), TRUE);
/* Explicitelly show all the toolbar (a normal gtk_widget_show
will not show the tool items added to the placeholders) */
/* Set the no show all *after* showing all items. We do not
want the toolbar to be shown with a show all because it
- could go agains the gconf setting regarding showing or not
+ could go against the gconf setting regarding showing or not
the toolbar of the editor window */
gtk_widget_set_no_show_all (parent_priv->toolbar, TRUE);
}
gtk_button_set_alignment (GTK_BUTTON (priv->bcc_button), 0.5, 0.5);
gtk_button_set_alignment (GTK_BUTTON (priv->bcc_button), 0.5, 0.5);
- modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_editor_attach_inlineimage"), NULL,
- APP_MENU_CALLBACK (modest_ui_actions_on_insert_image),
- MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_set_style));
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_editor_add_attachment"), NULL,
APP_MENU_CALLBACK (modest_msg_edit_window_add_attachment_clicked),
NULL);
<toolitem action="ActionsBold"/>
<toolitem action="ActionsItalics"/>
<placeholder name="FontColor" />
+ <toolitem action="ActionsInsertImage"/>
</toolbar>
<accelerator name="AccelToggleFullscreen" action="ToggleFullscreen"/>
{
g_return_val_if_fail (MODEST_MSG_EDIT_WINDOW (win), FALSE);
- ModestMsgEditFormat format =
- modest_msg_edit_window_get_format (MODEST_MSG_EDIT_WINDOW (win));
-
- return (format != MODEST_MSG_EDIT_FORMAT_HTML);
+ return modest_ui_dimming_rules_on_set_style (win, user_data);
}
static gboolean
{ "CloseWindowShortcut", NULL, NULL, "Escape", NULL, NULL },
/* TOOLBAR ACTIONS */
+ { "ActionsInsertImage", MODEST_TOOLBAR_ICON_INSERT_IMAGES, NULL, NULL, NULL, G_CALLBACK (modest_ui_actions_on_insert_image) },
#ifndef MODEST_TOOLKIT_HILDON2
{ "ToolbarSend", MODEST_TOOLBAR_ICON_MAIL_SEND, N_("mcen_me_editor_send"), "<Control>Return", NULL, G_CALLBACK (modest_ui_actions_on_send) },
#endif
#ifdef MODEST_TOOLKIT_GTK
{ "ToolbarAttach", "stock_attach", N_("mcen_me_editor_attachfile"), NULL, NULL, G_CALLBACK (modest_ui_actions_on_attach_file) },
+
#endif
};