+/* Returns whether the selected message is marked as deleted. */
+static gboolean
+_message_is_marked_as_deleted (ModestMsgViewWindow *win)
+{
+ g_return_val_if_fail (win, FALSE);
+ g_return_val_if_fail (MODEST_IS_MSG_VIEW_WINDOW(win), FALSE);
+
+ TnyHeader* header = modest_msg_view_window_get_header (win);
+ if (!header)
+ return FALSE;
+
+ return (tny_header_get_flags (header) & TNY_HEADER_FLAG_DELETED);
+}
+
+
+
+/* Returns whether the selected message is marked as deleted.
+ * @param win The main window, or NULL if you want this function
+ * to discover the main window itself, which is marginally less
+ * efficient. */