+
+static void
+on_cc_button_toggled (HildonCheckButton *button,
+ ModestMsgEditWindow *window)
+{
+ g_return_if_fail (MODEST_MSG_EDIT_WINDOW (window));
+
+ modest_msg_edit_window_show_cc (MODEST_MSG_EDIT_WINDOW (window),
+ hildon_check_button_get_active (button));
+}
+
+static void
+on_bcc_button_toggled (HildonCheckButton *button,
+ ModestMsgEditWindow *window)
+{
+ g_return_if_fail (MODEST_MSG_EDIT_WINDOW (window));
+
+ modest_msg_edit_window_show_bcc (MODEST_MSG_EDIT_WINDOW (window),
+ hildon_check_button_get_active (button));
+}
+
+static void
+setup_menu (ModestMsgEditWindow *self)
+{
+ ModestMsgEditWindowPrivate *priv = NULL;
+
+ g_return_if_fail (MODEST_IS_MSG_EDIT_WINDOW(self));
+
+ priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (self);
+
+ /* Settings menu buttons */
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_editor_checknames"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_on_check_names),
+ NULL);
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_undo"), "<Ctrl>z",
+ APP_MENU_CALLBACK (modest_ui_actions_on_undo),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_undo));
+
+ priv->cc_button = hildon_check_button_new (0);
+ gtk_button_set_label (GTK_BUTTON (priv->cc_button), _("mcen_me_editor_showcc"));
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON (priv->cc_button),
+ FALSE);
+ modest_hildon2_window_add_button_to_menu (MODEST_HILDON2_WINDOW (self), GTK_BUTTON (priv->cc_button),
+ NULL);
+ g_signal_connect (G_OBJECT (priv->cc_button), "toggled",
+ G_CALLBACK (on_cc_button_toggled), (gpointer) self);
+ priv->bcc_button = hildon_check_button_new (0);
+ gtk_button_set_label (GTK_BUTTON (priv->bcc_button), _("mcen_me_editor_showbcc"));
+ hildon_check_button_set_active (HILDON_CHECK_BUTTON (priv->bcc_button),
+ FALSE);
+ modest_hildon2_window_add_button_to_menu (MODEST_HILDON2_WINDOW (self), GTK_BUTTON (priv->bcc_button),
+ NULL);
+ g_signal_connect (G_OBJECT (priv->bcc_button), "toggled",
+ G_CALLBACK (on_bcc_button_toggled), (gpointer) self);
+
+ 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_inbox_remove_attachments"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_on_remove_attachments),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_editor_remove_attachment));
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_message_settings"), NULL,
+ APP_MENU_CALLBACK (on_message_settings),
+ NULL);
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_viewer_find"), "<Ctrl>f",
+ APP_MENU_CALLBACK (modest_ui_actions_on_toggle_find_in_page),
+ NULL);
+}
+