/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
}
static void
-reply_forward_cb (ModestMailOperation *mail_op,
- TnyHeader *header,
- TnyMsg *msg,
+reply_forward_cb (ModestMailOperation *mail_op, TnyHeader *header, TnyMsg *msg,
gpointer user_data)
{
TnyMsg *new_msg;
/* Check if folder is empty and set headers view contents style */
folder_empty = (tny_folder_get_all_count (folder) == 0);
all_marked_as_deleted = modest_header_view_is_empty (MODEST_HEADER_VIEW(header_view));
- folder_empty = folder_empty || all_marked_as_deleted ;
- if (folder_empty) {
-
- printf ("DEBUG: %s: tny_folder_get_all_count() returned 0.\n", __FUNCTION__);
+ if (folder_empty || all_marked_as_deleted)
modest_main_window_set_contents_style (win,
MODEST_MAIN_WINDOW_CONTENTS_STYLE_EMPTY);
- } else {
- printf ("DEBUG: %s: tny_folder_get_all_count() returned >0.\n", __FUNCTION__);
- }
}
void
const gchar *help_id = NULL;
if (MODEST_IS_MAIN_WINDOW (win)) {
- const gchar *action_name;
- action_name = gtk_action_get_name (action);
-
- if (!strcmp (action_name, "FolderViewCSMHelp") ||
- !strcmp (action_name, "HeaderViewCSMHelp")) {
- GtkWidget *folder_view;
- TnyFolderStore *folder_store;
- /* Get selected folder */
- folder_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
- MODEST_WIDGET_TYPE_FOLDER_VIEW);
- folder_store = modest_folder_view_get_selected (MODEST_FOLDER_VIEW (folder_view));
-
- /* Switch help_id */
- if (TNY_IS_FOLDER (folder_store)) {
- switch (modest_tny_folder_guess_folder_type (TNY_FOLDER (folder_store))) {
- case TNY_FOLDER_TYPE_NORMAL:
- help_id = "applications_email_managefolders";
- break;
- case TNY_FOLDER_TYPE_INBOX:
- help_id = "applications_email_inbox";
- break;
- case TNY_FOLDER_TYPE_OUTBOX:
- help_id = "applications_email_outbox";
- break;
- case TNY_FOLDER_TYPE_SENT:
- help_id = "applications_email_sent";
- break;
- case TNY_FOLDER_TYPE_DRAFTS:
- help_id = "applications_email_drafts";
- break;
- case TNY_FOLDER_TYPE_ARCHIVE:
- help_id = "applications_email_managefolders";
- break;
- default:
- help_id = "applications_email_managefolders";
- }
- } else {
- help_id = "applications_email_mainview";
+ GtkWidget *folder_view;
+ TnyFolderStore *folder_store;
+
+ /* Get selected folder */
+ folder_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
+ MODEST_WIDGET_TYPE_FOLDER_VIEW);
+ folder_store = modest_folder_view_get_selected (MODEST_FOLDER_VIEW (folder_view));
+
+ /* Switch help_id */
+ if (TNY_IS_FOLDER (folder_store)) {
+ switch (modest_tny_folder_guess_folder_type (TNY_FOLDER (folder_store))) {
+ case TNY_FOLDER_TYPE_NORMAL:
+ help_id = "applications_email_managefolders";
+ break;
+ case TNY_FOLDER_TYPE_INBOX:
+ help_id = "applications_email_inbox";
+ break;
+ case TNY_FOLDER_TYPE_OUTBOX:
+ help_id = "applications_email_outbox";
+ break;
+ case TNY_FOLDER_TYPE_SENT:
+ help_id = "applications_email_sent";
+ break;
+ case TNY_FOLDER_TYPE_DRAFTS:
+ help_id = "applications_email_drafts";
+ break;
+ case TNY_FOLDER_TYPE_ARCHIVE:
+ help_id = "applications_email_managefolders";
+ break;
+ default:
+ help_id = "applications_email_managefolders";
}
- g_object_unref (folder_store);
} else {
- help_id = "applications_email_mainview";
+ help_id = "applications_email_mainview";
}
+ g_object_unref (folder_store);
} else if (MODEST_IS_MSG_VIEW_WINDOW (win)) {
help_id = "applications_email_viewer";
} else if (MODEST_IS_MSG_EDIT_WINDOW (win))