#define MODEST_TOOLBAR_ICON_ITALIC GTK_STOCK_ITALIC
#define MODEST_TOOLBAR_ICON_FIND GTK_STOCK_FIND
#define MODEST_TOOLBAR_ICON_DOWNLOAD_IMAGES GTK_STOCK_MISSING_IMAGE
+#define MODEST_TOOLBAR_ICON_INSERT_IMAGES GTK_STOCK_ORIENTATION_PORTRAIT
/* Stock icon names */
#define MODEST_STOCK_MAIL_SEND "modest-stock-mail-send"
#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"
{
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
{ "/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
{ "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
};
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);
}
<toolitem action="ActionsBold"/>
<toolitem action="ActionsItalics"/>
<placeholder name="FontColor" />
+ <toolitem action="ActionsInsertImage"/>
</toolbar>
<accelerator name="AccelToggleFullscreen" action="ToggleFullscreen"/>