#include "maemo/modest-hildon-includes.h"
#include "maemo/modest-connection-specific-smtp-window.h"
#endif /* !MODEST_TOOLKIT_GTK */
-#include <modest-utils.h>
+#include <modest-utils.h>
#include "widgets/modest-ui-constants.h"
#include <widgets/modest-main-window.h>
#include <widgets/modest-msg-view-window.h>
ModestWindowMgr *mgr = NULL;
#ifdef MODEST_PLATFORM_MAEMO
- modest_osso_save_state();
+ modest_window_mgr_save_state_for_all_windows (modest_runtime_get_window_mgr ());
#endif /* MODEST_PLATFORM_MAEMO */
g_debug ("closing down, clearing %d item(s) from operation queue",
void
modest_ui_actions_add_to_contacts (GtkAction *action, ModestWindow *win)
{
- g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW (win));
-
- modest_msg_view_window_add_to_contacts (MODEST_MSG_VIEW_WINDOW (win));
+ if (MODEST_IS_MSG_VIEW_WINDOW (win))
+ modest_msg_view_window_add_to_contacts (MODEST_MSG_VIEW_WINDOW (win));
+ else if (MODEST_IS_MSG_EDIT_WINDOW (win))
+ modest_msg_edit_window_add_to_contacts (MODEST_MSG_EDIT_WINDOW (win));
}
void
if (protocol) {
if (tny_account_get_connection_status (account) ==
TNY_CONNECTION_STATUS_CONNECTED) {
- format = modest_protocol_get_translation (protocol,
- MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE,
- subject);
+ if (header) {
+ format = modest_protocol_get_translation (protocol,
+ MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE,
+ subject);
+ } else {
+ format = modest_protocol_get_translation (protocol,
+ MODEST_PROTOCOL_TRANSLATION_MSG_NOT_AVAILABLE_LOST_HEADER);
+ }
} else {
format = g_strdup_printf (_("mail_ib_backend_server_invalid"),
tny_account_get_hostname (account));
header_view = modest_header_window_get_header_view ((ModestHeaderWindow *) source);
#else
if (MODEST_IS_MAIN_WINDOW (source))
- header_view = modest_main_window_get_child_widget ((ModestMainWindow *) source,
- MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW);
+ header_view = MODEST_HEADER_VIEW (modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (source),
+ MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW));
#endif
if (header_view) {
TnyFolder *folder = modest_header_view_get_folder (header_view);