-static GSList *
-all_recipients_list (TnyMsg *msg)
-{
- TnyHeader *header = NULL;
- GSList *recipients = NULL;
- gchar *from = NULL, *to = NULL, *cc = NULL, *bcc = NULL;
-
- if (msg == NULL)
- return NULL;
-
- header = tny_msg_get_header (msg);
- if (header == NULL)
- return NULL;
-
- from = tny_header_dup_from (header);
- to = tny_header_dup_to (header);
- cc = tny_header_dup_cc (header);
- bcc = tny_header_dup_bcc (header);
-
- recipients = NULL;
- if (from)
- recipients = g_slist_concat (recipients, modest_text_utils_split_addresses_list (from));
- if (to)
- recipients = g_slist_concat (recipients, modest_text_utils_split_addresses_list (to));
- if (cc)
- recipients = g_slist_concat (recipients, modest_text_utils_split_addresses_list (cc));
- if (bcc)
- recipients = g_slist_concat (recipients, modest_text_utils_split_addresses_list (bcc));
-
- g_free (from);
- g_free (to);
- g_free (cc);
- g_free (bcc);
-
- return recipients;
+static void
+setup_menu (ModestMsgViewWindow *self)
+{
+ g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW(self));
+
+ /* Settings menu buttons */
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_replytoall"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_on_reply_all),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_reply_msg));
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_forward"), "<Control>d",
+ APP_MENU_CALLBACK (modest_ui_actions_on_forward),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_reply_msg));
+
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_mark_as_read"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_on_mark_as_read),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_mark_as_read_msg_in_view));
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_mark_as_unread"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_on_mark_as_unread),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_mark_as_unread_msg_in_view));
+
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_viewer_save_attachments"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_save_attachments),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_save_attachments));
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_remove_attachments"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_remove_attachments),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_remove_attachments));
+
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_new_message"), "<Control>n",
+ APP_MENU_CALLBACK (modest_ui_actions_on_new_msg),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_new_msg));
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_viewer_addtocontacts"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_add_to_contacts),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_add_to_contacts));
+
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mail_bd_external_images"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_on_fetch_images),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_fetch_images));
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_ti_message_properties"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_on_details),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_details));