/*
Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail team
+ Copyright (C) 1999-2018 the Claws Mail team and Hiroyuki Yamamoto
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "folderview.h"
#include "folder_item_prefs.h"
#include "foldersel.h"
+#include "quicksearch.h"
#include "summaryview.h"
#include "summary_search.h"
#include "messageview.h"
#include "import.h"
#include "export.h"
#include "edittags.h"
+#include "password.h"
#include "prefs_common.h"
#include "prefs_actions.h"
#include "prefs_filtering.h"
#include "prefs_template.h"
#include "action.h"
#include "account.h"
-#ifndef USE_NEW_ADDRBOOK
+#ifndef USE_ALT_ADDRBOOK
#include "addressbook.h"
#else
#include "addressbook-dbus.h"
#include "news.h"
#include "socket.h"
#include "printing.h"
+#include "send_message.h"
#ifdef G_OS_WIN32
#include "w32lib.h"
#endif
gpointer data);
static void toggle_fullscreen_cb (GtkAction *action,
gpointer data);
+static void toggle_menubar_cb (GtkAction *action,
+ gpointer data);
static void hide_quotes_cb(GtkAction *action,
gpointer data);
gpointer data);
static void mark_all_read_cb (GtkAction *action,
gpointer data);
+static void mark_all_unread_cb (GtkAction *action,
+ gpointer data);
static void mark_as_spam_cb (GtkAction *action,
gpointer data);
static void mark_as_ham_cb (GtkAction *action,
gpointer data);
static void select_thread_cb (GtkAction *action,
gpointer data);
+static void trash_thread_cb (GtkAction *action,
+ gpointer data);
static void delete_thread_cb (GtkAction *action,
gpointer data);
static void forget_session_passwords_cb (GtkAction *action,
gpointer data );
-
+#ifndef PASSWORD_CRYPTO_OLD
+static void forget_master_passphrase_cb (GtkAction *action,
+ gpointer data );
+#endif
static gboolean mainwindow_focus_in_event (GtkWidget *widget,
GdkEventFocus *focus,
gpointer data);
static GtkActionEntry mainwin_entries[] =
{
- {"Menu", NULL, "Menu" },
+ {"Menu", NULL, "Menu", NULL, NULL, NULL },
/* menus */
- {"File", NULL, N_("_File") },
- {"Edit", NULL, N_("_Edit") },
- {"View", NULL, N_("_View") },
- {"Message", NULL, N_("_Message") },
- {"Tools", NULL, N_("_Tools") },
- {"Configuration", NULL, N_("_Configuration") },
- {"Help", NULL, N_("_Help") },
+ {"File", NULL, N_("_File"), NULL, NULL, NULL },
+ {"Edit", NULL, N_("_Edit"), NULL, NULL, NULL },
+ {"View", NULL, N_("_View"), NULL, NULL, NULL },
+ {"Message", NULL, N_("_Message"), NULL, NULL, NULL },
+ {"Tools", NULL, N_("_Tools"), NULL, NULL, NULL },
+ {"Configuration", NULL, N_("_Configuration"), NULL, NULL, NULL },
+ {"Help", NULL, N_("_Help"), NULL, NULL, NULL },
/* File menu */
- {"File/AddMailbox", NULL, N_("_Add mailbox") },
- {"File/AddMailbox/MH", NULL, N_("MH..."), NULL, NULL, G_CALLBACK(add_mailbox_cb) },
- {"File/---", NULL, "---" },
-
- {"File/SortMailboxes", NULL, N_("Change mailbox order..."), NULL, NULL, G_CALLBACK(foldersort_cb) },
-
- /* {"File/---", NULL, "---" }, */
- {"File/ImportMbox", NULL, N_("_Import mbox file..."), NULL, NULL, G_CALLBACK(import_mbox_cb) },
- {"File/ExportMbox", NULL, N_("_Export to mbox file..."), NULL, NULL, G_CALLBACK(export_mbox_cb) },
- {"File/ExportSelMbox", NULL, N_("_Export selected to mbox file..."), NULL, NULL, G_CALLBACK(export_list_mbox_cb) },
- /* {"File/---", NULL, "---" }, */
- {"File/EmptyTrashes", NULL, N_("Empty all _Trash folders"), "<shift>D", NULL, G_CALLBACK(empty_trash_cb) },
- /* {"File/---", NULL, "---" }, */
-
- {"File/SaveAs", NULL, N_("_Save email as..."), "<control>S", NULL, G_CALLBACK(save_as_cb) },
- {"File/SavePartAs", NULL, N_("_Save part as..."), "Y", NULL, G_CALLBACK(save_part_as_cb) },
- /* {"File/---", NULL, "---" }, */
-
- {"File/PageSetup", NULL, N_("Page setup..."), NULL, NULL, G_CALLBACK(page_setup_cb) },
- {"File/Print", NULL, N_("_Print..."), "<control>P", NULL, G_CALLBACK(print_cb) },
- /* {"File/---", NULL, "---" }, */
- {"File/SynchroniseFolders", NULL, N_("Synchronise folders"), "<control><shift>S", NULL, G_CALLBACK(sync_cb) },
- /* {"File/---", NULL, "---" }, */
- {"File/Exit", NULL, N_("E_xit"), "<control>Q", NULL, G_CALLBACK(app_exit_cb) },
+ {"File/AddMailbox", NULL, N_("_Add mailbox"), NULL, NULL, NULL },
+ {"File/AddMailbox/MH", NULL, N_("MH..."), NULL, NULL, G_CALLBACK(add_mailbox_cb) },
+ {"File/---", NULL, "---", NULL, NULL, NULL },
+
+ {"File/SortMailboxes", NULL, N_("Change mailbox order..."), NULL, NULL, G_CALLBACK(foldersort_cb) },
+
+ /* {"File/---", NULL, "---", NULL, NULL, NULL }, */
+ {"File/ImportMbox", NULL, N_("_Import mbox file..."), NULL, NULL, G_CALLBACK(import_mbox_cb) },
+ {"File/ExportMbox", NULL, N_("_Export to mbox file..."), NULL, NULL, G_CALLBACK(export_mbox_cb) },
+ {"File/ExportSelMbox", NULL, N_("_Export selected to mbox file..."), NULL, NULL, G_CALLBACK(export_list_mbox_cb) },
+ /* {"File/---", NULL, "---", NULL, NULL, NULL }, */
+ {"File/EmptyTrashes", NULL, N_("Empty all _Trash folders"), "<shift>D", NULL, G_CALLBACK(empty_trash_cb) },
+ /* {"File/---", NULL, "---", NULL, NULL, NULL }, */
+
+ {"File/SaveAs", NULL, N_("_Save email as..."), "<control>S", NULL, G_CALLBACK(save_as_cb) },
+ {"File/SavePartAs", NULL, N_("_Save part as..."), "Y", NULL, G_CALLBACK(save_part_as_cb) },
+ /* {"File/---", NULL, "---", NULL, NULL, NULL }, */
+
+ {"File/PageSetup", NULL, N_("Page setup..."), NULL, NULL, G_CALLBACK(page_setup_cb) },
+ {"File/Print", NULL, N_("_Print..."), "<control>P", NULL, G_CALLBACK(print_cb) },
+ /* {"File/---", NULL, "---", NULL, NULL, NULL }, */
+ {"File/SynchroniseFolders", NULL, N_("Synchronise folders"), "<control><shift>S", NULL, G_CALLBACK(sync_cb) },
+ /* {"File/---", NULL, "---", NULL, NULL, NULL }, */
+ {"File/Exit", NULL, N_("E_xit"), "<control>Q", NULL, G_CALLBACK(app_exit_cb) },
/* Edit menu */
- {"Edit/Copy", NULL, N_("_Copy"), "<control>C", NULL, G_CALLBACK(copy_cb) },
- {"Edit/SelectAll", NULL, N_("Select _all"), "<control>A", NULL, G_CALLBACK(allsel_cb) },
- {"Edit/SelectThread", NULL, N_("Select _thread"), NULL, NULL, G_CALLBACK(select_thread_cb) },
- {"Edit/DeleteThread", NULL, N_("_Delete thread"), NULL, NULL, G_CALLBACK(delete_thread_cb) },
- {"Edit/---", NULL, "---" },
- {"Edit/Find", NULL, N_("_Find in current message..."), "<control>F", NULL, G_CALLBACK(search_cb) },
+ {"Edit/Copy", NULL, N_("_Copy"), "<control>C", NULL, G_CALLBACK(copy_cb) },
+ {"Edit/SelectAll", NULL, N_("Select _all"), "<control>A", NULL, G_CALLBACK(allsel_cb) },
+ {"Edit/SelectThread", NULL, N_("Select _thread"), NULL, NULL, G_CALLBACK(select_thread_cb) },
+ {"Edit/---", NULL, "---", NULL, NULL, NULL },
+ {"Edit/Find", NULL, N_("_Find in current message..."), "<control>F", NULL, G_CALLBACK(search_cb) },
{"Edit/SearchFolder", NULL, N_("_Search folder..."), "<shift><control>F", NULL, G_CALLBACK(search_folder_cb) },
{"Edit/QuickSearch", NULL, N_("_Quick search"), "slash", NULL, G_CALLBACK(mainwindow_quicksearch) },
/* View menu */
- {"View/ShowHide", NULL, N_("Show or hi_de") },
- {"View/ShowHide/Toolbar", NULL, N_("_Toolbar") },
+ {"View/ShowHide", NULL, N_("Show or hi_de"), NULL, NULL, NULL },
+ {"View/ShowHide/Toolbar", NULL, N_("_Toolbar"), NULL, NULL, NULL },
- {"View/SetColumns", NULL, N_("Set displayed _columns") },
- {"View/SetColumns/Folderlist", NULL, N_("In _folder list..."), NULL, NULL, G_CALLBACK(set_folder_display_item_cb) },
- {"View/SetColumns/Messagelist", NULL, N_("In _message list..."), NULL, NULL, G_CALLBACK(set_summary_display_item_cb) },
- {"View/---", NULL, "---" },
+ {"View/SetColumns", NULL, N_("Set displayed _columns"), NULL, NULL, NULL },
+ {"View/SetColumns/Folderlist", NULL, N_("In _folder list..."), NULL, NULL, G_CALLBACK(set_folder_display_item_cb) },
+ {"View/SetColumns/Messagelist", NULL, N_("In _message list..."), NULL, NULL, G_CALLBACK(set_summary_display_item_cb) },
+ {"View/---", NULL, "---", NULL, NULL, NULL },
#ifndef GENERIC_UMPC
- {"View/Layout", NULL, N_("La_yout") },
-
+ {"View/Layout", NULL, N_("La_yout"), NULL, NULL, NULL },
#endif
- {"View/Sort", NULL, N_("_Sort") },
- {"View/Sort/---", NULL, "---" },
+ {"View/Sort", NULL, N_("_Sort"), NULL, NULL, NULL },
+ {"View/Sort/---", NULL, "---", NULL, NULL, NULL },
{"View/Sort/AttractSubj", NULL, N_("_Attract by subject"), NULL, NULL, G_CALLBACK(attract_by_subject_cb) },
{"View/ExpandThreads", NULL, N_("E_xpand all threads"), NULL, NULL, G_CALLBACK(expand_threads_cb) },
{"View/CollapseThreads", NULL, N_("Co_llapse all threads"), NULL, NULL, G_CALLBACK(collapse_threads_cb) },
- {"View/Goto", NULL, N_("_Go to") },
- {"View/Goto/Prev", NULL, N_("_Previous message"), "P", NULL, G_CALLBACK(prev_cb) },
- {"View/Goto/Next", NULL, N_("_Next message"), "N", NULL, G_CALLBACK(next_cb) },
- {"View/Goto/---", NULL, "---", NULL, NULL, NULL },
- {"View/Goto/PrevUnread", NULL, N_("P_revious unread message"), "<shift>P", NULL, G_CALLBACK(prev_unread_cb) },
- {"View/Goto/NextUnread", NULL, N_("N_ext unread message"), "<shift>N", NULL, G_CALLBACK(next_unread_cb) },
- /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Goto/PrevNew", NULL, N_("Previous ne_w message"), NULL, NULL, G_CALLBACK(prev_new_cb) },
- {"View/Goto/NextNew", NULL, N_("Ne_xt new message"), NULL, NULL, G_CALLBACK(next_new_cb) },
- /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Goto/PrevMarked", NULL, N_("Previous _marked message"), NULL, NULL, G_CALLBACK(prev_marked_cb) },
- {"View/Goto/NextMarked", NULL, N_("Next m_arked message"), NULL, NULL, G_CALLBACK(next_marked_cb) },
- /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Goto/PrevLabeled", NULL, N_("Previous _labeled message"), NULL, NULL, G_CALLBACK(prev_labeled_cb) },
- {"View/Goto/NextLabeled", NULL, N_("Next la_beled message"), NULL, NULL, G_CALLBACK(next_labeled_cb) },
- /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Goto/PrevHistory", NULL, N_("Previous opened message"), "<alt>Left", NULL, G_CALLBACK(prev_history_cb) },
- {"View/Goto/NextHistory", NULL, N_("Next opened message"), "<alt>Right", NULL, G_CALLBACK(next_history_cb) },
- /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Goto/ParentMessage", NULL, N_("Parent message"), "<control>Up", NULL, G_CALLBACK(parent_cb) },
- /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Goto/NextUnreadFolder", NULL, N_("Next unread _folder"), "<shift>G", NULL, G_CALLBACK(goto_unread_folder_cb) },
- {"View/Goto/OtherFolder", NULL, N_("_Other folder..."), "G", NULL, G_CALLBACK(goto_folder_cb) },
- /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Goto/NextPart", NULL, N_("Next part"), "A", NULL, G_CALLBACK(goto_next_part_cb) },
- {"View/Goto/PrevPart", NULL, N_("Previous part"), "Z", NULL, G_CALLBACK(goto_prev_part_cb) },
-
- /* {"View/Scroll/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Scroll", NULL, N_("Message scroll") },
- {"View/Scroll/PrevLine", NULL, N_("Previous line"), NULL, NULL, G_CALLBACK(scroll_prev_line_cb) },
- {"View/Scroll/NextLine", NULL, N_("Next line"), NULL, NULL, G_CALLBACK(scroll_next_line_cb) },
- {"View/Scroll/PrevPage", NULL, N_("Previous page"), NULL, NULL, G_CALLBACK(scroll_prev_page_cb) },
- {"View/Scroll/NextPage", NULL, N_("Next page"), NULL, NULL, G_CALLBACK(scroll_next_page_cb) },
-
- /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Encoding", NULL, N_("Character _encoding") }, /* set_charset_cb */
- {"View/Encoding/---", NULL, "---" },
+ {"View/Goto", NULL, N_("_Go to"), NULL, NULL, NULL },
+ {"View/Goto/Prev", NULL, N_("_Previous message"), "P", NULL, G_CALLBACK(prev_cb) },
+ {"View/Goto/Next", NULL, N_("_Next message"), "N", NULL, G_CALLBACK(next_cb) },
+ {"View/Goto/---", NULL, "---", NULL, NULL, NULL },
+ {"View/Goto/PrevUnread", NULL, N_("P_revious unread message"), "<shift>P", NULL, G_CALLBACK(prev_unread_cb) },
+ {"View/Goto/NextUnread", NULL, N_("N_ext unread message"), "<shift>N", NULL, G_CALLBACK(next_unread_cb) },
+ /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Goto/PrevNew", NULL, N_("Previous ne_w message"), NULL, NULL, G_CALLBACK(prev_new_cb) },
+ {"View/Goto/NextNew", NULL, N_("Ne_xt new message"), NULL, NULL, G_CALLBACK(next_new_cb) },
+ /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Goto/PrevMarked", NULL, N_("Previous _marked message"), NULL, NULL, G_CALLBACK(prev_marked_cb) },
+ {"View/Goto/NextMarked", NULL, N_("Next m_arked message"), NULL, NULL, G_CALLBACK(next_marked_cb) },
+ /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Goto/PrevLabeled", NULL, N_("Previous _labeled message"), NULL, NULL, G_CALLBACK(prev_labeled_cb) },
+ {"View/Goto/NextLabeled", NULL, N_("Next la_beled message"), NULL, NULL, G_CALLBACK(next_labeled_cb) },
+ /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Goto/PrevHistory", NULL, N_("Previous opened message"), "<alt>Left", NULL, G_CALLBACK(prev_history_cb) },
+ {"View/Goto/NextHistory", NULL, N_("Next opened message"), "<alt>Right", NULL, G_CALLBACK(next_history_cb) },
+ /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Goto/ParentMessage", NULL, N_("Parent message"), "<control>Up", NULL, G_CALLBACK(parent_cb) },
+ /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Goto/NextUnreadFolder", NULL, N_("Next unread _folder"), "<shift>G", NULL, G_CALLBACK(goto_unread_folder_cb) },
+ {"View/Goto/Folder", NULL, N_("F_older..."), "G", NULL, G_CALLBACK(goto_folder_cb) },
+ /* {"View/Goto/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Goto/NextPart", NULL, N_("Next part"), "A", NULL, G_CALLBACK(goto_next_part_cb) },
+ {"View/Goto/PrevPart", NULL, N_("Previous part"), "Z", NULL, G_CALLBACK(goto_prev_part_cb) },
+
+ /* {"View/Scroll/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Scroll", NULL, N_("Message scroll"), NULL, NULL, NULL },
+ {"View/Scroll/PrevLine", NULL, N_("Previous line"), NULL, NULL, G_CALLBACK(scroll_prev_line_cb) },
+ {"View/Scroll/NextLine", NULL, N_("Next line"), NULL, NULL, G_CALLBACK(scroll_next_line_cb) },
+ {"View/Scroll/PrevPage", NULL, N_("Previous page"), NULL, NULL, G_CALLBACK(scroll_prev_page_cb) },
+ {"View/Scroll/NextPage", NULL, N_("Next page"), NULL, NULL, G_CALLBACK(scroll_next_page_cb) },
+
+ /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Encoding", NULL, N_("Character _encoding"), NULL, NULL, NULL }, /* set_charset_cb */
+ {"View/Encoding/---", NULL, "---", NULL, NULL, NULL },
#define ENC_ACTION(cs_char,c_char,string) \
{ "View/Encoding/" cs_char, NULL, N_(string), NULL, NULL, c_char }
- {"View/Encoding/Western", NULL, N_("Western European") },
- {"View/Encoding/Baltic", NULL, N_("Baltic") },
- {"View/Encoding/Hebrew", NULL, N_("Hebrew") },
- {"View/Encoding/Arabic", NULL, N_("Arabic") },
- {"View/Encoding/Cyrillic", NULL, N_("Cyrillic") },
- {"View/Encoding/Japanese", NULL, N_("Japanese") },
- {"View/Encoding/Chinese", NULL, N_("Chinese") },
- {"View/Encoding/Korean", NULL, N_("Korean") },
- {"View/Encoding/Thai", NULL, N_("Thai") },
+ {"View/Encoding/Western", NULL, N_("Western European"), NULL, NULL, NULL },
+ {"View/Encoding/Baltic", NULL, N_("Baltic"), NULL, NULL, NULL },
+ {"View/Encoding/Hebrew", NULL, N_("Hebrew"), NULL, NULL, NULL },
+ {"View/Encoding/Arabic", NULL, N_("Arabic"), NULL, NULL, NULL },
+ {"View/Encoding/Cyrillic", NULL, N_("Cyrillic"), NULL, NULL, NULL },
+ {"View/Encoding/Japanese", NULL, N_("Japanese"), NULL, NULL, NULL },
+ {"View/Encoding/Chinese", NULL, N_("Chinese"), NULL, NULL, NULL },
+ {"View/Encoding/Korean", NULL, N_("Korean"), NULL, NULL, NULL },
+ {"View/Encoding/Thai", NULL, N_("Thai"), NULL, NULL, NULL },
- {"View/Decode", NULL, N_("Decode") }, /* set_decode_cb */
- {"View/Decode/---", NULL, "---" },
+ {"View/Decode", NULL, N_("Decode"), NULL, NULL, NULL }, /* set_decode_cb */
+ {"View/Decode/---", NULL, "---", NULL, NULL, NULL },
#define DEC_ACTION(cs_type,c_type,string) \
{ "View/Decode/" cs_type, NULL, N_(string), NULL, NULL, c_type }
- /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/OpenNewWindow", NULL, N_("Open in new _window"), "<control><alt>N", NULL, G_CALLBACK(open_msg_cb) },
- {"View/MessageSource", NULL, N_("Mess_age source"), "<control>U", NULL, G_CALLBACK(view_source_cb) },
- /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Part", NULL, N_("Message part") },
- {"View/Part/AsText", NULL, N_("View as text"), "T", NULL, G_CALLBACK(view_part_as_text_cb) },
- {"View/Part/Open", NULL, N_("Open"), "L", NULL, G_CALLBACK(open_part_cb) },
+ /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/OpenNewWindow", NULL, N_("Open in new _window"), "<control><alt>N", NULL, G_CALLBACK(open_msg_cb) },
+ {"View/MessageSource", NULL, N_("Mess_age source"), "<control>U", NULL, G_CALLBACK(view_source_cb) },
+ /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/Part", NULL, N_("Message part"), NULL, NULL, NULL },
+ {"View/Part/AsText", NULL, N_("View as text"), "T", NULL, G_CALLBACK(view_part_as_text_cb) },
+ {"View/Part/Open", NULL, N_("Open"), "L", NULL, G_CALLBACK(open_part_cb) },
#ifndef G_OS_WIN32
- {"View/Part/OpenWith", NULL, N_("Open with..."), "O", NULL, G_CALLBACK(open_part_with_cb) },
+ {"View/Part/OpenWith", NULL, N_("Open with..."), "O", NULL, G_CALLBACK(open_part_with_cb) },
#endif
- /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
+ /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/Quotes", NULL, N_("Quotes") },
- /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
- {"View/UpdateSummary", NULL, N_("_Update summary"), "<control><alt>U", NULL, G_CALLBACK(update_summary_cb) },
+ {"View/Quotes", NULL, N_("Quotes"), NULL, NULL, NULL },
+ /* {"View/---", NULL, "---", NULL, NULL, NULL }, */
+ {"View/UpdateSummary", NULL, N_("_Update summary"), "<control><alt>U", NULL, G_CALLBACK(update_summary_cb) },
/* Message menu */
- {"Message/Receive", NULL, N_("Recei_ve") },
- {"Message/Receive/CurrentAccount", NULL, N_("Get from _current account"), "<control>I", NULL, G_CALLBACK(mw_inc_mail_cb) },
- {"Message/Receive/AllAccounts", NULL, N_("Get from _all accounts"), "<shift><control>I", NULL, G_CALLBACK(mw_inc_all_account_mail_cb) },
- {"Message/Receive/CancelReceiving", NULL, N_("Cancel receivin_g"), NULL, NULL, G_CALLBACK(inc_cancel_cb) },
- {"Message/Receive/---", NULL, "---" },
- {"Message/Receive/PlaceHolder", NULL, "PlaceHolder,", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
- {"Message/SendQueue", NULL, N_("_Send queued messages"), NULL, NULL, G_CALLBACK(mw_send_queue_cb) },
- {"Message/CancelSending", NULL, N_("Cancel sending"), NULL, NULL, G_CALLBACK(send_cancel_cb) },
-
- {"Message/---", NULL, "---" },
-
- {"Message/ComposeEmail", NULL, N_("Compose a_n email message"), "<control>M", NULL, G_CALLBACK(mw_compose_mail_cb) },
- {"Message/ComposeNews", NULL, N_("Compose a news message"), NULL, NULL, G_CALLBACK(mw_compose_news_cb) },
-
- {"Message/Reply", NULL, N_("_Reply"), "<control>R", NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REPLY */
- {"Message/ReplyTo", NULL, N_("Repl_y to") },
- {"Message/ReplyTo/All", NULL, N_("_All"), "<control><shift>R", NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REPLY_TO_ALL */
- {"Message/ReplyTo/Sender", NULL, N_("_Sender"), NULL, NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REPLY_TO_SENDER */
- {"Message/ReplyTo/List", NULL, N_("Mailing _list"), "<control>L", NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REPLY_TO_LIST */
- {"Message/FollowupReply", NULL, N_("Follow-up and reply to"), NULL, NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_FOLLOWUP_AND_REPLY_TO */
- /*{"Message/---", NULL, "---" },*/
-
- {"Message/Forward", NULL, N_("_Forward"), "<control><alt>F", NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_FORWARD_INLINE */
- {"Message/ForwardAtt", NULL, N_("For_ward as attachment"), NULL, NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_FORWARD_AS_ATTACH */
- {"Message/Redirect", NULL, N_("Redirec_t"), NULL, NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REDIRECT */
-
- {"Message/MailingList", NULL, N_("Mailing-_List") },
- {"Message/MailingList/Post", NULL, N_("Post") },
- {"Message/MailingList/Post/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
- {"Message/MailingList/Help", NULL, N_("Help") },
- {"Message/MailingList/Help/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
- {"Message/MailingList/Subscribe", NULL, N_("Subscribe") },
- {"Message/MailingList/Subscribe/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
- {"Message/MailingList/Unsubscribe", NULL, N_("Unsubscribe") },
- {"Message/MailingList/Unsubscribe/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
- {"Message/MailingList/ViewArchive", NULL, N_("View archive") },
- {"Message/MailingList/ViewArchive/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
- {"Message/MailingList/ContactOwner", NULL, N_("Contact owner") },
- {"Message/MailingList/ContactOwner/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ {"Message/Receive", NULL, N_("Recei_ve"), NULL, NULL, NULL },
+ {"Message/Receive/CurrentAccount", NULL, N_("Get from _current account"), "<control>I", NULL, G_CALLBACK(mw_inc_mail_cb) },
+ {"Message/Receive/AllAccounts", NULL, N_("Get from _all accounts"), "<shift><control>I", NULL, G_CALLBACK(mw_inc_all_account_mail_cb) },
+ {"Message/Receive/CancelReceiving", NULL, N_("Cancel receivin_g"), NULL, NULL, G_CALLBACK(inc_cancel_cb) },
+ {"Message/Receive/---", NULL, "---", NULL, NULL, NULL },
+ {"Message/Receive/PlaceHolder", NULL, "PlaceHolder,", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ {"Message/SendQueue", NULL, N_("_Send queued messages"), NULL, NULL, G_CALLBACK(mw_send_queue_cb) },
+ {"Message/CancelSending", NULL, N_("Cancel sending"), NULL, NULL, G_CALLBACK(send_cancel_cb) },
+
+ {"Message/---", NULL, "---", NULL, NULL, NULL },
+
+ {"Message/ComposeEmail", NULL, N_("Compose a_n email message"), "<control>M", NULL, G_CALLBACK(mw_compose_mail_cb) },
+ {"Message/ComposeNews", NULL, N_("Compose a news message"), NULL, NULL, G_CALLBACK(mw_compose_news_cb) },
+
+ {"Message/Reply", NULL, N_("_Reply"), "<control>R", NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REPLY */
+ {"Message/ReplyTo", NULL, N_("Repl_y to"), NULL, NULL, NULL },
+ {"Message/ReplyTo/All", NULL, N_("_All"), "<control><shift>R", NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REPLY_TO_ALL */
+ {"Message/ReplyTo/Sender", NULL, N_("_Sender"), NULL, NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REPLY_TO_SENDER */
+ {"Message/ReplyTo/List", NULL, N_("Mailing _list"), "<control>L", NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REPLY_TO_LIST */
+ {"Message/FollowupReply", NULL, N_("Follow-up and reply to"), NULL, NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_FOLLOWUP_AND_REPLY_TO */
+ /* {"Message/---", NULL, "---", NULL, NULL, NULL }, */
+
+ {"Message/Forward", NULL, N_("_Forward"), "<control><alt>F", NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_FORWARD_INLINE */
+ {"Message/ForwardAtt", NULL, N_("For_ward as attachment"), NULL, NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_FORWARD_AS_ATTACH */
+ {"Message/Redirect", NULL, N_("Redirec_t"), NULL, NULL, G_CALLBACK(main_window_reply_cb) }, /* COMPOSE_REDIRECT */
+
+ {"Message/MailingList", NULL, N_("Mailing-_List"), NULL, NULL, NULL },
+ {"Message/MailingList/Post", NULL, N_("Post"), NULL, NULL, NULL },
+ {"Message/MailingList/Post/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ {"Message/MailingList/Help", NULL, N_("Help"), NULL, NULL, NULL },
+ {"Message/MailingList/Help/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ {"Message/MailingList/Subscribe", NULL, N_("Subscribe"), NULL, NULL, NULL },
+ {"Message/MailingList/Subscribe/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ {"Message/MailingList/Unsubscribe", NULL, N_("Unsubscribe"), NULL, NULL, NULL },
+ {"Message/MailingList/Unsubscribe/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ {"Message/MailingList/ViewArchive", NULL, N_("View archive"), NULL, NULL, NULL },
+ {"Message/MailingList/ViewArchive/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ {"Message/MailingList/ContactOwner", NULL, N_("Contact owner"), NULL, NULL, NULL },
+ {"Message/MailingList/ContactOwner/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
/* separation */
- {"Message/Move", NULL, N_("M_ove..."), "<control>O", NULL, G_CALLBACK(move_to_cb) },
- {"Message/Copy", NULL, N_("_Copy..."), "<shift><control>O", NULL, G_CALLBACK(copy_to_cb) },
- {"Message/Trash", NULL, N_("Move to _trash"), "<control>D", NULL, G_CALLBACK(delete_trash_cb) },
- {"Message/Delete", NULL, N_("_Delete..."), NULL, NULL, G_CALLBACK(delete_cb) },
- {"Message/CancelNews", NULL, N_("Cancel a news message"), NULL, NULL, G_CALLBACK(cancel_cb) },
+ {"Message/Move", NULL, N_("M_ove..."), "<control>O", NULL, G_CALLBACK(move_to_cb) },
+ {"Message/Copy", NULL, N_("_Copy..."), "<shift><control>O", NULL, G_CALLBACK(copy_to_cb) },
+ {"Message/Trash", NULL, N_("Move to _trash"), "<control>D", NULL, G_CALLBACK(delete_trash_cb) },
+ {"Message/Delete", NULL, N_("_Delete..."), NULL, NULL, G_CALLBACK(delete_cb) },
+ {"Message/TrashThread", NULL, N_("Move thread to tr_ash"), NULL, NULL, G_CALLBACK(trash_thread_cb) },
+ {"Message/DeleteThread", NULL, N_("Delete t_hread"), NULL, NULL, G_CALLBACK(delete_thread_cb) },
+ {"Message/CancelNews", NULL, N_("Cancel a news message"), NULL, NULL, G_CALLBACK(cancel_cb) },
/* separation */
- {"Message/Mark", NULL, N_("_Mark") },
- {"Message/Mark/Mark", NULL, N_("_Mark"), "<shift>asterisk", NULL, G_CALLBACK(mark_cb) },
- {"Message/Mark/Unmark", NULL, N_("_Unmark"), "U", NULL, G_CALLBACK(unmark_cb) },
- {"Message/Mark/---", NULL, "---", NULL, NULL, NULL },
+ {"Message/Mark", NULL, N_("_Mark"), NULL, NULL, NULL },
+ {"Message/Mark/Mark", NULL, N_("_Mark"), "<shift>asterisk", NULL, G_CALLBACK(mark_cb) },
+ {"Message/Mark/Unmark", NULL, N_("_Unmark"), "U", NULL, G_CALLBACK(unmark_cb) },
+ {"Message/Mark/---", NULL, "---", NULL, NULL, NULL },
- {"Message/Mark/MarkUnread", NULL, N_("Mark as unr_ead"), "<shift>exclam", NULL, G_CALLBACK(mark_as_unread_cb) },
- {"Message/Mark/MarkRead", NULL, N_("Mark as rea_d"), NULL, NULL, G_CALLBACK(mark_as_read_cb) },
+ {"Message/Mark/MarkRead", NULL, N_("Mark as rea_d"), NULL, NULL, G_CALLBACK(mark_as_read_cb) },
+ {"Message/Mark/MarkUnread", NULL, N_("Mark as unr_ead"), "<shift>exclam", NULL, G_CALLBACK(mark_as_unread_cb) },
/* separation */
- {"Message/Mark/MarkAllRead", NULL, N_("Mark all read"), NULL, NULL, G_CALLBACK(mark_all_read_cb) },
+ {"Message/Mark/MarkAllRead", NULL, N_("Mark all read"), NULL, NULL, G_CALLBACK(mark_all_read_cb) },
+ {"Message/Mark/MarkAllUnread", NULL, N_("Mark all unread"), NULL, NULL, G_CALLBACK(mark_all_unread_cb) },
/* separation */
- {"Message/Mark/IgnoreThread", NULL, N_("Ignore thread"), NULL, NULL, G_CALLBACK(ignore_thread_cb) },
- {"Message/Mark/UnignoreThread", NULL, N_("Unignore thread"), NULL, NULL, G_CALLBACK(unignore_thread_cb) },
- {"Message/Mark/WatchThread", NULL, N_("Watch thread"), NULL, NULL, G_CALLBACK(watch_thread_cb) },
- {"Message/Mark/UnwatchThread", NULL, N_("Unwatch thread"), NULL, NULL, G_CALLBACK(unwatch_thread_cb) },
+ {"Message/Mark/IgnoreThread", NULL, N_("Ignore thread"), NULL, NULL, G_CALLBACK(ignore_thread_cb) },
+ {"Message/Mark/UnignoreThread", NULL, N_("Unignore thread"), NULL, NULL, G_CALLBACK(unignore_thread_cb) },
+ {"Message/Mark/WatchThread", NULL, N_("Watch thread"), NULL, NULL, G_CALLBACK(watch_thread_cb) },
+ {"Message/Mark/UnwatchThread", NULL, N_("Unwatch thread"), NULL, NULL, G_CALLBACK(unwatch_thread_cb) },
/* separation */
- {"Message/Mark/MarkSpam", NULL, N_("Mark as _spam"), NULL, NULL, G_CALLBACK(mark_as_spam_cb) },
- {"Message/Mark/MarkHam", NULL, N_("Mark as _ham"), NULL, NULL, G_CALLBACK(mark_as_ham_cb) },
+ {"Message/Mark/MarkSpam", NULL, N_("Mark as _spam"), NULL, NULL, G_CALLBACK(mark_as_spam_cb) },
+ {"Message/Mark/MarkHam", NULL, N_("Mark as _ham"), NULL, NULL, G_CALLBACK(mark_as_ham_cb) },
/* separation */
- {"Message/Mark/Lock", NULL, N_("Lock"), NULL, NULL, G_CALLBACK(lock_msgs_cb) },
- {"Message/Mark/Unlock", NULL, N_("Unlock"), NULL, NULL, G_CALLBACK(unlock_msgs_cb) },
+ {"Message/Mark/Lock", NULL, N_("Lock"), NULL, NULL, G_CALLBACK(lock_msgs_cb) },
+ {"Message/Mark/Unlock", NULL, N_("Unlock"), NULL, NULL, G_CALLBACK(unlock_msgs_cb) },
- {"Message/ColorLabel", NULL, N_("Color la_bel") },
- {"Message/Tags", NULL, N_("Ta_gs") },
- /*{"Message/---", NULL, "---" },*/
+ {"Message/ColorLabel", NULL, N_("Color la_bel"), NULL, NULL, NULL },
+ {"Message/Tags", NULL, N_("Ta_gs"), NULL, NULL, NULL },
+ /*{"Message/---", NULL, "---", NULL, NULL, NULL },*/
- {"Message/Reedit", NULL, N_("Re-_edit"), NULL, NULL, G_CALLBACK(reedit_cb) },
- /*{"Message/---", NULL, "---" },*/
+ {"Message/Reedit", NULL, N_("Re-_edit"), NULL, NULL, G_CALLBACK(reedit_cb) },
+ /*{"Message/---", NULL, "---", NULL, NULL, NULL },*/
- {"Message/CheckSignature", NULL, N_("Check signature"), "C", NULL, G_CALLBACK(check_signature_cb) },
+ {"Message/CheckSignature", NULL, N_("Check signature"), "C", NULL, G_CALLBACK(check_signature_cb) },
/* Tools menu */
- {"Tools/AddressBook", NULL, N_("_Address book"), "<control><shift>A", NULL, G_CALLBACK(addressbook_open_cb) },
- {"Tools/AddSenderToAB", NULL, N_("Add sender to address boo_k"), NULL, NULL, G_CALLBACK(add_address_cb) },
-
- {"Tools/CollectAddresses", NULL, N_("C_ollect addresses") },
- {"Tools/CollectAddresses/FromFolder", NULL, N_("From current _folder..."), NULL, NULL, G_CALLBACK(addr_harvest_cb) },
- {"Tools/CollectAddresses/FromSelected", NULL, N_("From selected _messages..."), NULL, NULL, G_CALLBACK(addr_harvest_msg_cb) },
- {"Tools/---", NULL, "---", NULL, NULL, NULL },
-
- {"Tools/FilterFolder", NULL, N_("_Filter all messages in folder"), NULL, NULL, G_CALLBACK(filter_cb) },
- {"Tools/FilterSelected", NULL, N_("Filter _selected messages"), NULL, NULL, G_CALLBACK(filter_list_cb) },
- {"Tools/RunProcessing", NULL, N_("Run folder pr_ocessing rules"), NULL, NULL, G_CALLBACK(process_cb) },
-
- {"Tools/CreateFilterRule", NULL, N_("_Create filter rule") },
- {"Tools/CreateFilterRule/Automatically",NULL, N_("_Automatically"), NULL, NULL, G_CALLBACK(create_filter_cb) }, /* FILTER_BY_AUTO */
- {"Tools/CreateFilterRule/ByFrom", NULL, N_("By _From"), NULL, NULL, G_CALLBACK(create_filter_cb) }, /* FILTER_BY_FROM */
- {"Tools/CreateFilterRule/ByTo", NULL, N_("By _To"), NULL, NULL, G_CALLBACK(create_filter_cb) }, /* FILTER_BY_TO */
- {"Tools/CreateFilterRule/BySubject", NULL, N_("By _Subject"), NULL, NULL, G_CALLBACK(create_filter_cb) }, /* FILTER_BY_SUBJECT */
-
- {"Tools/CreateProcessingRule", NULL, N_("Create processing rule") },
- {"Tools/CreateProcessingRule/Automatically", NULL, N_("_Automatically"), NULL, NULL, G_CALLBACK(create_processing_cb) },
- {"Tools/CreateProcessingRule/ByFrom", NULL, N_("By _From"), NULL, NULL, G_CALLBACK(create_processing_cb) },
- {"Tools/CreateProcessingRule/ByTo", NULL, N_("By _To"), NULL, NULL, G_CALLBACK(create_processing_cb) },
- {"Tools/CreateProcessingRule/BySubject",NULL, N_("By _Subject"), NULL, NULL, G_CALLBACK(create_processing_cb) },
- /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
-
- {"Tools/ListUrls", NULL, N_("List _URLs..."), "<control><shift>U", NULL, G_CALLBACK(open_urls_cb) },
-
- /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
- {"Tools/Actions", NULL, N_("Actio_ns") },
- {"Tools/Actions/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
- /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
-
- {"Tools/CheckNewMessages", NULL, N_("Ch_eck for new messages in all folders"), NULL, NULL, G_CALLBACK(update_folderview_cb) },
- {"Tools/DeleteDuplicates", NULL, N_("Delete du_plicated messages") },
- {"Tools/DeleteDuplicates/SelFolder", NULL, N_("In selected folder"), NULL, NULL, G_CALLBACK(delete_duplicated_cb) },
- {"Tools/DeleteDuplicates/AllFolders", NULL, N_("In all folders"), NULL, NULL, G_CALLBACK(delete_duplicated_all_cb) },
- /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
-
- {"Tools/Execute", NULL, N_("E_xecute"), "X", NULL, G_CALLBACK(execute_summary_cb) },
- {"Tools/Expunge", NULL, N_("Exp_unge"), "<control>E", NULL, G_CALLBACK(expunge_summary_cb) },
+ {"Tools/AddressBook", NULL, N_("_Address book"), "<control><shift>A", NULL, G_CALLBACK(addressbook_open_cb) },
+ {"Tools/AddSenderToAB", NULL, N_("Add sender to address boo_k"), NULL, NULL, G_CALLBACK(add_address_cb) },
+
+ {"Tools/CollectAddresses", NULL, N_("C_ollect addresses"), NULL, NULL, NULL },
+ {"Tools/CollectAddresses/FromFolder", NULL, N_("From current _folder..."), NULL, NULL, G_CALLBACK(addr_harvest_cb) },
+ {"Tools/CollectAddresses/FromSelected", NULL, N_("From selected _messages..."), NULL, NULL, G_CALLBACK(addr_harvest_msg_cb) },
+ {"Tools/---", NULL, "---", NULL, NULL, NULL },
+
+ {"Tools/FilterFolder", NULL, N_("_Filter all messages in folder"), NULL, NULL, G_CALLBACK(filter_cb) },
+ {"Tools/FilterSelected", NULL, N_("Filter _selected messages"), NULL, NULL, G_CALLBACK(filter_list_cb) },
+ {"Tools/RunProcessing", NULL, N_("Run folder pr_ocessing rules"), NULL, NULL, G_CALLBACK(process_cb) },
+
+ {"Tools/CreateFilterRule", NULL, N_("_Create filter rule"), NULL, NULL, NULL },
+ {"Tools/CreateFilterRule/Automatically", NULL, N_("_Automatically"), NULL, NULL, G_CALLBACK(create_filter_cb) }, /* FILTER_BY_AUTO */
+ {"Tools/CreateFilterRule/ByFrom", NULL, N_("By _From"), NULL, NULL, G_CALLBACK(create_filter_cb) }, /* FILTER_BY_FROM */
+ {"Tools/CreateFilterRule/ByTo", NULL, N_("By _To"), NULL, NULL, G_CALLBACK(create_filter_cb) }, /* FILTER_BY_TO */
+ {"Tools/CreateFilterRule/BySubject", NULL, N_("By _Subject"), NULL, NULL, G_CALLBACK(create_filter_cb) }, /* FILTER_BY_SUBJECT */
+
+ {"Tools/CreateProcessingRule", NULL, N_("Create processing rule"), NULL, NULL, NULL },
+ {"Tools/CreateProcessingRule/Automatically", NULL, N_("_Automatically"), NULL, NULL, G_CALLBACK(create_processing_cb) },
+ {"Tools/CreateProcessingRule/ByFrom", NULL, N_("By _From"), NULL, NULL, G_CALLBACK(create_processing_cb) },
+ {"Tools/CreateProcessingRule/ByTo", NULL, N_("By _To"), NULL, NULL, G_CALLBACK(create_processing_cb) },
+ {"Tools/CreateProcessingRule/BySubject", NULL, N_("By _Subject"), NULL, NULL, G_CALLBACK(create_processing_cb) },
+ /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
+
+ {"Tools/ListUrls", NULL, N_("List _URLs..."), "<control><shift>U", NULL, G_CALLBACK(open_urls_cb) },
+
+ /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
+ {"Tools/Actions", NULL, N_("Actio_ns"), NULL, NULL, NULL },
+ {"Tools/Actions/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
+
+ {"Tools/CheckNewMessages", NULL, N_("Ch_eck for new messages in all folders"), NULL, NULL, G_CALLBACK(update_folderview_cb) },
+ {"Tools/DeleteDuplicates", NULL, N_("Delete du_plicated messages"), NULL, NULL, NULL },
+ {"Tools/DeleteDuplicates/SelFolder", NULL, N_("In selected folder"), NULL, NULL, G_CALLBACK(delete_duplicated_cb) },
+ {"Tools/DeleteDuplicates/AllFolders", NULL, N_("In all folders"), NULL, NULL, G_CALLBACK(delete_duplicated_all_cb) },
+ /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
+
+ {"Tools/Execute", NULL, N_("E_xecute"), "X", NULL, G_CALLBACK(execute_summary_cb) },
+ {"Tools/Expunge", NULL, N_("Exp_unge"), "<control>E", NULL, G_CALLBACK(expunge_summary_cb) },
#ifdef USE_GNUTLS
- /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
- {"Tools/SSLCertificates", NULL, N_("SSL cer_tificates"), NULL, NULL, G_CALLBACK(ssl_manager_open_cb) },
+ /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
+ {"Tools/SSLCertificates", NULL, N_("SSL/TLS cer_tificates"), NULL, NULL, G_CALLBACK(ssl_manager_open_cb) },
#endif
- /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
-#ifndef G_OS_WIN32
- {"Tools/FilteringLog", NULL, N_("Filtering Lo_g"), NULL, NULL, G_CALLBACK(filtering_debug_window_show_cb) },
+ /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
+ {"Tools/FilteringLog", NULL, N_("Filtering Lo_g"), NULL, NULL, G_CALLBACK(filtering_debug_window_show_cb) },
+ {"Tools/NetworkLog", NULL, N_("Network _Log"), "<shift><control>L", NULL, G_CALLBACK(log_window_show_cb) },
+ /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
+ {"Tools/ForgetSessionPasswords", NULL, N_("_Forget all session passwords"), NULL, NULL, G_CALLBACK(forget_session_passwords_cb) },
+#ifndef PASSWORD_CRYPTO_OLD
+ {"Tools/ForgetMasterPassphrase", NULL, N_("Forget _master passphrase"), NULL, NULL, G_CALLBACK(forget_master_passphrase_cb) },
#endif
- {"Tools/NetworkLog", NULL, N_("Network _Log"), "<shift><control>L", NULL, G_CALLBACK(log_window_show_cb) },
- /* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
- {"Tools/ForgetSessionPasswords", NULL, N_("_Forget all session passwords"), NULL, NULL, G_CALLBACK(forget_session_passwords_cb) },
/* Configuration menu */
- {"Configuration/ChangeAccount", NULL, N_("C_hange current account") },
- {"Configuration/ChangeAccount/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
- {"Configuration/AccountPrefs", NULL, N_("_Preferences for current account..."), NULL, NULL, G_CALLBACK(prefs_account_open_cb) },
- {"Configuration/CreateAccount", NULL, N_("Create _new account..."), NULL, NULL, G_CALLBACK(new_account_cb) },
- {"Configuration/EditAccounts", NULL, N_("_Edit accounts..."), NULL, NULL, G_CALLBACK(account_edit_open) },
- {"Configuration/---", NULL, "---", NULL, NULL, NULL },
-
- {"Configuration/Preferences", NULL, N_("P_references..."), NULL, NULL, G_CALLBACK(prefs_open_cb) },
- {"Configuration/PreProcessing", NULL, N_("Pre-pr_ocessing..."), NULL, NULL, G_CALLBACK(prefs_pre_processing_open_cb) },
- {"Configuration/PostProcessing", NULL, N_("Post-pro_cessing..."), NULL, NULL, G_CALLBACK(prefs_post_processing_open_cb) },
- {"Configuration/Filtering", NULL, N_("_Filtering..."), NULL, NULL, G_CALLBACK(prefs_filtering_open_cb) },
- {"Configuration/Templates", NULL, N_("_Templates..."), NULL, NULL, G_CALLBACK(prefs_template_open_cb) },
- {"Configuration/Actions", NULL, N_("_Actions..."), NULL, NULL, G_CALLBACK(prefs_actions_open_cb) },
- {"Configuration/Tags", NULL, N_("Tag_s..."), NULL, NULL, G_CALLBACK(prefs_tags_open_cb) },
- /*{"Configuration/---", NULL, "---", NULL, NULL, NULL }, */
- {"Configuration/Plugins", NULL, N_("Plu_gins..."), NULL, NULL, G_CALLBACK(plugins_open_cb) },
+ {"Configuration/ChangeAccount", NULL, N_("C_hange current account"), NULL, NULL, NULL },
+ {"Configuration/ChangeAccount/PlaceHolder", NULL, "Placeholder", NULL, NULL, G_CALLBACK(mainwindow_nothing_cb) },
+ {"Configuration/AccountPrefs", NULL, N_("_Preferences for current account..."), NULL, NULL, G_CALLBACK(prefs_account_open_cb) },
+ {"Configuration/CreateAccount", NULL, N_("Create _new account..."), NULL, NULL, G_CALLBACK(new_account_cb) },
+ {"Configuration/EditAccounts", NULL, N_("_Edit accounts..."), NULL, NULL, G_CALLBACK(account_edit_open) },
+ {"Configuration/---", NULL, "---", NULL, NULL, NULL },
+
+ {"Configuration/Preferences", NULL, N_("P_references..."), NULL, NULL, G_CALLBACK(prefs_open_cb) },
+ {"Configuration/PreProcessing", NULL, N_("Pre-pr_ocessing..."), NULL, NULL, G_CALLBACK(prefs_pre_processing_open_cb) },
+ {"Configuration/PostProcessing", NULL, N_("Post-pro_cessing..."), NULL, NULL, G_CALLBACK(prefs_post_processing_open_cb) },
+ {"Configuration/Filtering", NULL, N_("_Filtering..."), NULL, NULL, G_CALLBACK(prefs_filtering_open_cb) },
+ {"Configuration/Templates", NULL, N_("_Templates..."), NULL, NULL, G_CALLBACK(prefs_template_open_cb) },
+ {"Configuration/Actions", NULL, N_("_Actions..."), NULL, NULL, G_CALLBACK(prefs_actions_open_cb) },
+ {"Configuration/Tags", NULL, N_("Tag_s..."), NULL, NULL, G_CALLBACK(prefs_tags_open_cb) },
+ /* {"Configuration/---", NULL, "---", NULL, NULL, NULL }, */
+ {"Configuration/Plugins", NULL, N_("Plu_gins..."), NULL, NULL, G_CALLBACK(plugins_open_cb) },
/* Help menu */
- {"Help/Manual", NULL, N_("_Manual"), NULL, NULL, G_CALLBACK(manual_open_cb) },
- {"Help/FAQ", NULL, N_("_Online User-contributed FAQ"), NULL, NULL, G_CALLBACK(manual_faq_open_cb) },
- {"Help/IconLegend", NULL, N_("Icon _Legend"), NULL, NULL, G_CALLBACK(legend_open_cb) },
+ {"Help/Manual", NULL, N_("_Manual"), NULL, NULL, G_CALLBACK(manual_open_cb) },
+ {"Help/FAQ", NULL, N_("_Online User-contributed FAQ"), NULL, NULL, G_CALLBACK(manual_faq_open_cb) },
+ {"Help/IconLegend", NULL, N_("Icon _Legend"), NULL, NULL, G_CALLBACK(legend_open_cb) },
#ifdef G_OS_WIN32
- {"Help/SetDefault", NULL, N_("Set as default client"), NULL, NULL, G_CALLBACK(set_default_client_cb) },
+ {"Help/SetDefault", NULL, N_("Set as default client"), NULL, NULL, G_CALLBACK(set_default_client_cb) },
#endif
- {"Help/---", NULL, "---" },
- {"Help/About", NULL, N_("_About"), NULL, NULL, G_CALLBACK(about_cb) },
+ {"Help/---", NULL, "---", NULL, NULL, NULL },
+ {"Help/About", NULL, N_("_About"), NULL, NULL, G_CALLBACK(about_cb) },
};
static GtkToggleActionEntry mainwin_toggle_entries[] = {
- {"File/OfflineMode", NULL, N_("Offline _mode"), "<control>W", NULL, G_CALLBACK(toggle_work_offline_cb) }, /*toggle*/
- {"View/ShowHide/MessageView", NULL, N_("_Message view"), "V", NULL, G_CALLBACK(toggle_message_cb) }, /* toggle */
+ {"File/OfflineMode", NULL, N_("Offline _mode"), "<control>W", NULL, G_CALLBACK(toggle_work_offline_cb), FALSE }, /*toggle*/
+ {"View/ShowHide/MenuBar", NULL, N_("Men_ubar"), "<control>F12", NULL, G_CALLBACK(toggle_menubar_cb), FALSE }, /* toggle */
+ {"View/ShowHide/MessageView", NULL, N_("_Message view"), "V", NULL, G_CALLBACK(toggle_message_cb), FALSE }, /* toggle */
#ifndef GENERIC_UMPC
- {"View/ShowHide/StatusBar", NULL, N_("Status _bar"), NULL, NULL, G_CALLBACK(toggle_statusbar_cb) }, /* toggle */
-#endif
- {"View/ShowHide/ColumnHeaders", NULL, N_("Column headers"), NULL, NULL, G_CALLBACK(toggle_col_headers_cb) }, /* toggle */
- {"View/ThreadView", NULL, N_("Th_read view"), "<control>T", NULL, G_CALLBACK(thread_cb) }, /* toggle */
- {"View/HideReadThreads", NULL, N_("Hide read threads"), NULL, NULL, G_CALLBACK(hide_read_threads) }, /* toggle */
- {"View/HideReadMessages", NULL, N_("_Hide read messages"), NULL, NULL, G_CALLBACK(hide_read_messages) }, /* toggle */
- {"View/HideDelMessages", NULL, N_("Hide deleted messages"), NULL, NULL, G_CALLBACK(hide_del_messages) }, /* toggle */
-#ifndef MAEMO
- {"View/FullScreen", NULL, N_("_Fullscreen"), "F11", NULL, G_CALLBACK(toggle_fullscreen_cb) }, /* toggle */
+ {"View/ShowHide/StatusBar", NULL, N_("Status _bar"), NULL, NULL, G_CALLBACK(toggle_statusbar_cb), FALSE }, /* toggle */
#endif
- {"View/AllHeaders", NULL, N_("Show all _headers"), "<control>H", NULL, G_CALLBACK(show_all_header_cb) }, /* toggle */
- {"View/Quotes/CollapseAll", NULL, N_("_Collapse all"), "<control><shift>Q", NULL, G_CALLBACK(hide_quotes_cb) }, /* 1 toggle */
- {"View/Quotes/Collapse2", NULL, N_("Collapse from level _2"), NULL, NULL, G_CALLBACK(hide_quotes_cb) }, /* 2 toggle */
- {"View/Quotes/Collapse3", NULL, N_("Collapse from level _3"), NULL, NULL, G_CALLBACK(hide_quotes_cb) }, /* 3 toggle */
+ {"View/ShowHide/ColumnHeaders", NULL, N_("Column headers"), NULL, NULL, G_CALLBACK(toggle_col_headers_cb), FALSE }, /* toggle */
+ {"View/ThreadView", NULL, N_("Th_read view"), "<control>T", NULL, G_CALLBACK(thread_cb), FALSE }, /* toggle */
+ {"View/HideReadThreads", NULL, N_("Hide read threads"), NULL, NULL, G_CALLBACK(hide_read_threads), FALSE }, /* toggle */
+ {"View/HideReadMessages", NULL, N_("_Hide read messages"), NULL, NULL, G_CALLBACK(hide_read_messages), FALSE }, /* toggle */
+ {"View/HideDelMessages", NULL, N_("Hide deleted messages"), NULL, NULL, G_CALLBACK(hide_del_messages), FALSE }, /* toggle */
+ {"View/FullScreen", NULL, N_("_Fullscreen"), "F11", NULL, G_CALLBACK(toggle_fullscreen_cb), FALSE }, /* toggle */
+ {"View/AllHeaders", NULL, N_("Show all _headers"), "<control>H", NULL, G_CALLBACK(show_all_header_cb), FALSE }, /* toggle */
+ {"View/Quotes/CollapseAll", NULL, N_("_Collapse all"), "<control><shift>Q", NULL, G_CALLBACK(hide_quotes_cb), FALSE }, /* 1 toggle */
+ {"View/Quotes/Collapse2", NULL, N_("Collapse from level _2"), NULL, NULL, G_CALLBACK(hide_quotes_cb), FALSE }, /* 2 toggle */
+ {"View/Quotes/Collapse3", NULL, N_("Collapse from level _3"), NULL, NULL, G_CALLBACK(hide_quotes_cb), FALSE }, /* 3 toggle */
};
static GtkRadioActionEntry mainwin_showhide_radio_entries[] = { /* toggle_toolbar_cb */
- {"View/ShowHide/Toolbar/TextBelowIcon", NULL, N_("Text _below icons"), NULL, NULL, TOOLBAR_BOTH }, /* radio TOOLBAR_BOTH */
- {"View/ShowHide/Toolbar/TextBesideIcon",NULL, N_("Text be_side icons"), NULL, NULL, TOOLBAR_BOTH_HORIZ }, /* radio TOOLBAR_BOTH_HORIZ */
- {"View/ShowHide/Toolbar/IconOnly", NULL, N_("_Icons only"), NULL, NULL, TOOLBAR_ICON }, /* radio TOOLBAR_ICON */
- {"View/ShowHide/Toolbar/TextOnly", NULL, N_("_Text only"), NULL, NULL, TOOLBAR_TEXT }, /* radio TOOLBAR_TEXT */
+ {"View/ShowHide/Toolbar/TextBelowIcon", NULL, N_("Text _below icons"), NULL, NULL, TOOLBAR_BOTH }, /* radio TOOLBAR_BOTH */
+ {"View/ShowHide/Toolbar/TextBesideIcon", NULL, N_("Text be_side icons"), NULL, NULL, TOOLBAR_BOTH_HORIZ }, /* radio TOOLBAR_BOTH_HORIZ */
+ {"View/ShowHide/Toolbar/IconOnly", NULL, N_("_Icons only"), NULL, NULL, TOOLBAR_ICON }, /* radio TOOLBAR_ICON */
+ {"View/ShowHide/Toolbar/TextOnly", NULL, N_("_Text only"), NULL, NULL, TOOLBAR_TEXT }, /* radio TOOLBAR_TEXT */
#ifndef GENERIC_UMPC
- {"View/ShowHide/Toolbar/Hide", NULL, N_("_Hide"), NULL, NULL, TOOLBAR_NONE }, /* radio TOOLBAR_NONE */
+ {"View/ShowHide/Toolbar/Hide", NULL, N_("_Hide"), NULL, NULL, TOOLBAR_NONE }, /* radio TOOLBAR_NONE */
#endif
};
#ifndef GENERIC_UMPC
static GtkRadioActionEntry mainwin_layout_radio_entries[] = { /* set_layout_cb */
- {"View/Layout/Standard", NULL, N_("_Standard"), NULL, NULL, NORMAL_LAYOUT }, /* radio NORMAL_LAYOUT */
- {"View/Layout/ThreeColumns", NULL, N_("_Three columns"), NULL, NULL, VERTICAL_LAYOUT }, /* radio VERTICAL_LAYOUT */
- {"View/Layout/WideMessage", NULL, N_("_Wide message"), NULL, NULL, WIDE_LAYOUT }, /* radio WIDE_LAYOUT */
- {"View/Layout/WideMessageList", NULL, N_("W_ide message list"), NULL, NULL, WIDE_MSGLIST_LAYOUT }, /* radio WIDE_MSGLIST_LAYOUT */
- {"View/Layout/SmallScreen", NULL, N_("S_mall screen"), NULL, NULL, SMALL_LAYOUT }, /* radio SMALL_LAYOUT */
+ {"View/Layout/Standard", NULL, N_("_Standard"), NULL, NULL, NORMAL_LAYOUT }, /* radio NORMAL_LAYOUT */
+ {"View/Layout/ThreeColumns", NULL, N_("_Three columns"), NULL, NULL, VERTICAL_LAYOUT }, /* radio VERTICAL_LAYOUT */
+ {"View/Layout/WideMessage", NULL, N_("_Wide message"), NULL, NULL, WIDE_LAYOUT }, /* radio WIDE_LAYOUT */
+ {"View/Layout/WideMessageList", NULL, N_("W_ide message list"), NULL, NULL, WIDE_MSGLIST_LAYOUT }, /* radio WIDE_MSGLIST_LAYOUT */
+ {"View/Layout/SmallScreen", NULL, N_("S_mall screen"), NULL, NULL, SMALL_LAYOUT }, /* radio SMALL_LAYOUT */
};
#endif
static GtkRadioActionEntry mainwin_sort_radio_entries[] = { /* sort_summary_cb */
- {"View/Sort/Number", NULL, N_("By _number"), NULL, NULL, SORT_BY_NUMBER }, /* radio SORT_BY_NUMBER */
- {"View/Sort/Size", NULL, N_("By s_ize"), NULL, NULL, SORT_BY_SIZE }, /* radio SORT_BY_SIZE */
- {"View/Sort/Date", NULL, N_("By _date"), NULL, NULL, SORT_BY_DATE }, /* radio SORT_BY_DATE */
- {"View/Sort/ThreadDate", NULL, N_("By thread date"), NULL, NULL, SORT_BY_THREAD_DATE }, /* radio SORT_BY_THREAD_DATE */
- {"View/Sort/From", NULL, N_("By _From"), NULL, NULL, SORT_BY_FROM }, /* radio SORT_BY_FROM */
- {"View/Sort/To", NULL, N_("By _To"), NULL, NULL, SORT_BY_TO }, /* radio SORT_BY_TO */
- {"View/Sort/Subject", NULL, N_("By s_ubject"), NULL, NULL, SORT_BY_SUBJECT }, /* radio SORT_BY_SUBJECT */
- {"View/Sort/Color", NULL, N_("By _color label"), NULL, NULL, SORT_BY_LABEL }, /* radio SORT_BY_LABEL */
- {"View/Sort/Tag", NULL, N_("By tag"), NULL, NULL, SORT_BY_TAGS }, /* radio SORT_BY_TAGS */
- {"View/Sort/Mark", NULL, N_("By _mark"), NULL, NULL, SORT_BY_MARK }, /* radio SORT_BY_MARK */
- {"View/Sort/Status", NULL, N_("By _status"), NULL, NULL, SORT_BY_STATUS }, /* radio SORT_BY_STATUS */
- {"View/Sort/Attachment", NULL, N_("By a_ttachment"), NULL, NULL, SORT_BY_MIME }, /* radio SORT_BY_MIME */
- {"View/Sort/Score", NULL, N_("By score"), NULL, NULL, SORT_BY_SCORE }, /* radio SORT_BY_SCORE */
- {"View/Sort/Locked", NULL, N_("By locked"), NULL, NULL, SORT_BY_LOCKED }, /* radio SORT_BY_LOCKED */
- {"View/Sort/DontSort", NULL, N_("D_on't sort"), NULL, NULL, SORT_BY_NONE }, /* radio SORT_BY_NONE */
+ {"View/Sort/Number", NULL, N_("By _number"), NULL, NULL, SORT_BY_NUMBER }, /* radio SORT_BY_NUMBER */
+ {"View/Sort/Size", NULL, N_("By s_ize"), NULL, NULL, SORT_BY_SIZE }, /* radio SORT_BY_SIZE */
+ {"View/Sort/Date", NULL, N_("By _date"), NULL, NULL, SORT_BY_DATE }, /* radio SORT_BY_DATE */
+ {"View/Sort/ThreadDate", NULL, N_("By thread date"), NULL, NULL, SORT_BY_THREAD_DATE }, /* radio SORT_BY_THREAD_DATE */
+ {"View/Sort/From", NULL, N_("By _From"), NULL, NULL, SORT_BY_FROM }, /* radio SORT_BY_FROM */
+ {"View/Sort/To", NULL, N_("By _To"), NULL, NULL, SORT_BY_TO }, /* radio SORT_BY_TO */
+ {"View/Sort/Subject", NULL, N_("By s_ubject"), NULL, NULL, SORT_BY_SUBJECT }, /* radio SORT_BY_SUBJECT */
+ {"View/Sort/Color", NULL, N_("By _color label"), NULL, NULL, SORT_BY_LABEL }, /* radio SORT_BY_LABEL */
+ {"View/Sort/Tag", NULL, N_("By tag"), NULL, NULL, SORT_BY_TAGS }, /* radio SORT_BY_TAGS */
+ {"View/Sort/Mark", NULL, N_("By _mark"), NULL, NULL, SORT_BY_MARK }, /* radio SORT_BY_MARK */
+ {"View/Sort/Status", NULL, N_("By _status"), NULL, NULL, SORT_BY_STATUS }, /* radio SORT_BY_STATUS */
+ {"View/Sort/Attachment", NULL, N_("By a_ttachment"), NULL, NULL, SORT_BY_MIME }, /* radio SORT_BY_MIME */
+ {"View/Sort/Score", NULL, N_("By score"), NULL, NULL, SORT_BY_SCORE }, /* radio SORT_BY_SCORE */
+ {"View/Sort/Locked", NULL, N_("By locked"), NULL, NULL, SORT_BY_LOCKED }, /* radio SORT_BY_LOCKED */
+ {"View/Sort/DontSort", NULL, N_("D_on't sort"), NULL, NULL, SORT_BY_NONE }, /* radio SORT_BY_NONE */
};
static GtkRadioActionEntry mainwin_sorttype_radio_entries[] = { /* sort_summary_type_cb */
- {"View/Sort/Ascending", NULL, N_("Ascending"), NULL, NULL, SORT_ASCENDING }, /* radio SORT_ASCENDING */
- {"View/Sort/Descending", NULL, N_("Descending"), NULL, NULL, SORT_DESCENDING }, /* radio SORT_DESCENDING */
+ {"View/Sort/Ascending", NULL, N_("Ascending"), NULL, NULL, SORT_ASCENDING }, /* radio SORT_ASCENDING */
+ {"View/Sort/Descending", NULL, N_("Descending"), NULL, NULL, SORT_DESCENDING }, /* radio SORT_DESCENDING */
};
static GtkRadioActionEntry mainwin_radio_enc_entries[] =
ENC_ACTION(CS_ISO_8859_9, C_ISO_8859_9, N_("Turkish (ISO-8859-_9)")), /* RADIO set_charset_cb */
ENC_ACTION("Cyrillic/"CS_ISO_8859_5, C_ISO_8859_5, "ISO-8859-_5"), /* RADIO set_charset_cb */
ENC_ACTION("Cyrillic/"CS_KOI8_R, C_KOI8_R, "KOI8-_R"), /* RADIO set_charset_cb */
+ ENC_ACTION("Cyrillic/"CS_MACCYR, C_MACCYR, "_Mac-Cyrillic"), /* RADIO set_charset_cb */
ENC_ACTION("Cyrillic/"CS_KOI8_U, C_KOI8_U, "KOI8-_U"), /* RADIO set_charset_cb */
ENC_ACTION("Cyrillic/"CS_WINDOWS_1251, C_WINDOWS_1251, "Windows-1251"), /* RADIO set_charset_cb */
ENC_ACTION("Japanese/"CS_ISO_2022_JP, C_ISO_2022_JP, "ISO-2022-_JP"), /* RADIO set_charset_cb */
};
static gboolean offline_ask_sync = TRUE;
-static guint lastkey;
static gboolean is_obscured = FALSE;
-static gboolean main_window_accel_activate (GtkAccelGroup *accelgroup,
- GObject *arg1,
- guint value,
- GdkModifierType mod,
- gpointer user_data)
-{
- MainWindow *mainwin = (MainWindow *)user_data;
-
- if (mainwin->summaryview &&
- mainwin->summaryview->quicksearch &&
- quicksearch_has_focus(mainwin->summaryview->quicksearch) &&
- (mod == 0 || mod == GDK_SHIFT_MASK)) {
- quicksearch_pass_key(mainwin->summaryview->quicksearch, lastkey, mod);
- return TRUE;
- }
- return FALSE;
-}
-
#define N_COLOR_LABELS colorlabel_get_color_count()
static void mainwindow_colorlabel_menu_item_activate_item_cb(GtkMenuItem *menu_item,
}
}
} else
- g_warning("invalid number of color elements (%d)\n", n);
+ g_warning("invalid number of color elements (%d)", n);
g_slist_free(sel);
/* reset "dont_toggle" state */
g_free(new_accel);
}
}
+ g_list_free(closures);
}
static void mainwindow_colorlabel_menu_create(MainWindow *mainwin, gboolean refresh)
return tag_b == NULL ? 0:1;
if (tag_b == NULL)
- return tag_a == NULL ? 0:1;
+ return 1;
return g_utf8_collate(tag_a, tag_b);
}
gpointer data)
{
MainWindow *mainwin = (MainWindow*) data;
-
+
if (!mainwin || !event)
return FALSE;
if (quicksearch_has_focus(mainwin->summaryview->quicksearch))
{
- lastkey = event->keyval;
- return FALSE;
+ GtkWidget *entry =
+ quicksearch_get_entry(mainwin->summaryview->quicksearch);
+ gboolean handled;
+ g_signal_emit_by_name(entry, "key-press-event", event, &handled);
+ if (handled) {
+ return TRUE;
+ }
}
switch (event->keyval) {
case GDK_KEY_Q: /* Quit */
-#ifndef MAEMO
BREAK_ON_MODIFIER_KEY();
if (gtk_window_is_active(GTK_WINDOW(mainwin->window))) {
app_exit_cb(NULL, mainwin);
}
-#endif
return FALSE;
case GDK_KEY_space:
BREAK_ON_MODIFIER_KEY();
&& mainwin->summaryview->folder_item->total_msgs == 0))) {
g_signal_stop_emission_by_name(G_OBJECT(widget),
"key_press_event");
- folderview_select_next_unread(mainwin->folderview, TRUE);
+ folderview_select_next_with_flag(mainwin->folderview, MSG_UNREAD);
}
}
break;
-
-#ifdef MAEMO
- case GDK_KEY_F6:
- if (maemo_mainwindow_is_fullscreen(widget)) {
- gtk_window_unfullscreen(GTK_WINDOW(widget));
- } else {
- gtk_window_fullscreen(GTK_WINDOW(widget));
- }
- break;
- case GDK_KEY_F7:
- {
- PangoFontDescription *font_desc;
- int size;
- font_desc = pango_font_description_from_string(prefs_common.normalfont);
- size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
- if (size < 30) {
- size++; pango_font_description_set_size(font_desc, size*PANGO_SCALE);
- g_free(prefs_common.normalfont);
- prefs_common.normalfont = pango_font_description_to_string(font_desc);
- main_window_reflect_prefs_all();
- }
- pango_font_description_free(font_desc);
- font_desc = pango_font_description_from_string(prefs_common.textfont);
- size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
- if (size < 30) {
- size++; pango_font_description_set_size(font_desc, size*PANGO_SCALE);
- g_free(prefs_common.textfont);
- prefs_common.textfont = pango_font_description_to_string(font_desc);
- main_window_reflect_prefs_all();
- }
- pango_font_description_free(font_desc);
- }
- break;
- case GDK_KEY_F8:
- {
- PangoFontDescription *font_desc;
- int size;
- font_desc = pango_font_description_from_string(prefs_common.normalfont);
- size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
- if (size > 5) {
- size--; pango_font_description_set_size(font_desc, size*PANGO_SCALE);
- g_free(prefs_common.normalfont);
- prefs_common.normalfont = pango_font_description_to_string(font_desc);
- main_window_reflect_prefs_all();
- }
- pango_font_description_free(font_desc);
- font_desc = pango_font_description_from_string(prefs_common.textfont);
- size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
- if (size > 5) {
- size--; pango_font_description_set_size(font_desc, size*PANGO_SCALE);
- g_free(prefs_common.textfont);
- prefs_common.textfont = pango_font_description_to_string(font_desc);
- main_window_reflect_prefs_all();
- }
- pango_font_description_free(font_desc);
- }
- break;
- case GDK_KEY_Escape:
- if (mainwin->summaryview &&
- mainwin->summaryview->ext_messageview &&
- mainwin->summaryview->ext_messageview->window &&
- widget == mainwin->summaryview->ext_messageview->window) {
- messageview_destroy(mainwin->summaryview->ext_messageview);
- }
- break;
-#endif
default:
break;
}
#undef BREAK_ON_MODIFIER_KEY
-#ifdef MAEMO
-void mainwindow_maemo_led_set(gboolean state) {
- static gint last_state = -1;
- if (last_state == state)
- return;
- last_state = (gint)state;
- if (prefs_common.maemo_show_led) {
- if(state) {
- execute_command_line("/usr/bin/dbus-send --system --type=method_call "
- "--dest=com.nokia.mce "
- "/com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate "
- "string:PatternCommunicationEvent", TRUE);
- execute_command_line("/usr/bin/dbus-send --system --type=method_call "
- "--dest=com.nokia.mce "
- "/com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate "
- "string:PatternCommunicationEmail", TRUE);
- } else {
- execute_command_line("/usr/bin/dbus-send --system --type=method_call "
- "--dest=com.nokia.mce "
- "/com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate "
- "string:PatternCommunicationEvent", TRUE);
- execute_command_line("/usr/bin/dbus-send --system --type=method_call "
- "--dest=com.nokia.mce "
- "/com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate "
- "string:PatternCommunicationEmail", TRUE);
- }
- }
-}
-
-static void led_update(FolderItem *removed_item)
-{
- guint new, unread, unreadmarked, marked, total, replied;
- guint forwarded, locked, ignored, watched;
-
- folder_count_total_msgs(&new, &unread, &unreadmarked, &marked, &total,
- &replied, &forwarded, &locked, &ignored,
- &watched);
- if (removed_item) {
- total -= removed_item->total_msgs;
- new -= removed_item->new_msgs;
- unread -= removed_item->unread_msgs;
- }
-
- if (new > 0)
- mainwindow_maemo_led_set(TRUE);
- else
- mainwindow_maemo_led_set(FALSE);
-}
-
-static gboolean maemo_folder_item_update_hook(gpointer source, gpointer data)
-{
- led_update(NULL);
-
- return FALSE;
-}
-
-static gboolean maemo_folder_update_hook(gpointer source, gpointer data)
-{
- FolderUpdateData *hookdata;
- hookdata = source;
- if (hookdata->update_flags & FOLDER_REMOVE_FOLDERITEM)
- led_update(hookdata->item);
- else
- led_update(NULL);
-
- return FALSE;
-}
-
-static void main_window_install_maemo_hooks(MainWindow *mainwin)
-{
- gint maemo_item_hook_id, maemo_folder_hook_id;
-
- maemo_item_hook_id = hooks_register_hook (FOLDER_ITEM_UPDATE_HOOKLIST, maemo_folder_item_update_hook, NULL);
- if (maemo_item_hook_id == -1) {
- goto err_out_item;
- }
-
- maemo_folder_hook_id = hooks_register_hook (FOLDER_UPDATE_HOOKLIST, maemo_folder_update_hook, NULL);
- if (maemo_folder_hook_id == -1) {
- goto err_out_folder;
- }
-
- return;
-
-err_out_folder:
- hooks_unregister_hook(FOLDER_ITEM_UPDATE_HOOKLIST, maemo_item_hook_id);
-err_out_item:
- return;
-}
-#endif
-
MainWindow *main_window_create()
{
MainWindow *mainwin;
FolderView *folderview;
SummaryView *summaryview;
MessageView *messageview;
-#if !GTK_CHECK_VERSION(3, 0, 0)
GdkColormap *colormap;
gboolean success[4];
-#endif
GdkColor color[4];
GtkWidget *ac_menu;
gint i;
/* main window */
window = GTK_WIDGET(gtkut_window_new(GTK_WINDOW_TOPLEVEL, "mainwindow"));
- gtk_window_set_title(GTK_WINDOW(window), PROG_VERSION_FRIENDLY);
+ gtk_window_set_title(GTK_WINDOW(window), PROG_VERSION);
gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
#ifdef GENERIC_UMPC
prefs_common.layout_mode = SMALL_LAYOUT;
gtk_action_group_add_radio_actions(mainwin->action_group, mainwin_radio_dec_entries,
G_N_ELEMENTS(mainwin_radio_dec_entries), C_AUTO, G_CALLBACK(set_decode_cb), (gpointer)mainwin);
-#ifndef MAEMO
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/", "Menu", NULL, GTK_UI_MANAGER_MENUBAR)
-#else
- MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/", "Menu", NULL, GTK_UI_MANAGER_POPUP)
-#endif
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu", "File", "File", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu", "Edit", "Edit", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu", "View", "View", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Edit", "Copy", "Edit/Copy", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Edit", "SelectAll", "Edit/SelectAll", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Edit", "SelectThread", "Edit/SelectThread", GTK_UI_MANAGER_MENUITEM)
- MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Edit", "DeleteThread", "Edit/DeleteThread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Edit", "Separator1", "Edit/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Edit", "Find", "Edit/Find", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Edit", "SearchFolder", "Edit/SearchFolder", GTK_UI_MANAGER_MENUITEM)
/* View menu */
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "ShowHide", "View/ShowHide", GTK_UI_MANAGER_MENU)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/ShowHide", "MenuBar", "View/ShowHide/MenuBar", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/ShowHide", "Toolbar", "View/ShowHide/Toolbar", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/ShowHide/Toolbar", "TextBelowIcon", "View/ShowHide/Toolbar/TextBelowIcon", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/ShowHide/Toolbar", "TextBesideIcon", "View/ShowHide/Toolbar/TextBesideIcon", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/SetColumns", "Messagelist", "View/SetColumns/Messagelist", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Separator1", "View/---", GTK_UI_MANAGER_SEPARATOR)
-#ifndef MAEMO
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "FullScreen", "View/FullScreen", GTK_UI_MANAGER_MENUITEM)
-#endif
#ifndef GENERIC_UMPC
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Layout", "View/Layout", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Layout", "Standard", "View/Layout/Standard", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "ParentMessage", "View/Goto/ParentMessage", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator7", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextUnreadFolder", "View/Goto/NextUnreadFolder", GTK_UI_MANAGER_MENUITEM)
- MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "OtherFolder", "View/Goto/OtherFolder", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Folder", "View/Goto/Folder", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator8", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextPart", "View/Goto/NextPart", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "PrevPart", "View/Goto/PrevPart", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding", "Cyrillic", "View/Encoding/Cyrillic", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_ISO_8859_5, "View/Encoding/Cyrillic/"CS_ISO_8859_5, GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_KOI8_R, "View/Encoding/Cyrillic/"CS_KOI8_R, GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_MACCYR, "View/Encoding/Cyrillic/"CS_MACCYR, GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_KOI8_U, "View/Encoding/Cyrillic/"CS_KOI8_U, GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_WINDOWS_1251, "View/Encoding/Cyrillic/"CS_WINDOWS_1251, GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "Copy", "Message/Copy", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "Trash", "Message/Trash", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "Delete", "Message/Delete", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "TrashThread", "Message/TrashThread", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "DeleteThread", "Message/DeleteThread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "CancelNews", "Message/CancelNews", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "Separator4", "Message/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Mark", "Message/Mark/Mark", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Unmark", "Message/Mark/Unmark", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Separator1", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
- MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkUnread", "Message/Mark/MarkUnread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkRead", "Message/Mark/MarkRead", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkUnread", "Message/Mark/MarkUnread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Separator2", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkAllRead", "Message/Mark/MarkAllRead", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkAllUnread", "Message/Mark/MarkAllUnread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Separator3", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "IgnoreThread", "Message/Mark/IgnoreThread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "UnignoreThread", "Message/Mark/UnignoreThread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "SSLCertificates", "Tools/SSLCertificates", GTK_UI_MANAGER_MENUITEM)
#endif
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator7", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
-#ifndef G_OS_WIN32
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "FilteringLog", "Tools/FilteringLog", GTK_UI_MANAGER_MENUITEM)
-#endif
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "NetworkLog", "Tools/NetworkLog", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator8", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "ForgetSessionPasswords", "Tools/ForgetSessionPasswords", GTK_UI_MANAGER_MENUITEM)
+#ifndef PASSWORD_CRYPTO_OLD
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "ForgetMasterPassphrase", "Tools/ForgetMasterPassphrase", GTK_UI_MANAGER_MENUITEM)
+#endif
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator9", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
/* Configuration menu */
menubar = gtk_ui_manager_get_widget(mainwin->ui_manager, "/Menu");
- gtk_widget_show_all(menubar);
+ if (prefs_common.mainwin_menubar)
+ gtk_widget_show_all(menubar);
+ else
+ gtk_widget_hide(menubar);
gtk_window_add_accel_group(GTK_WINDOW(window), gtk_ui_manager_get_accel_group(mainwin->ui_manager));
-#ifndef MAEMO
gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
-#else
- hildon_window_set_menu(HILDON_WINDOW(window), GTK_MENU(menubar));
-#endif
if (prefs_common.toolbar_detachable) {
handlebox = gtk_handle_box_new();
mainwin->window = window;
mainwin_list = g_list_append(mainwin_list, mainwin);
-#ifdef MAEMO
- mainwin->toolbar = toolbar_create(TOOLBAR_MAIN,
- window,
- (gpointer)mainwin);
-#else
mainwin->toolbar = toolbar_create(TOOLBAR_MAIN,
handlebox,
(gpointer)mainwin);
-#endif
toolbar_set_learn_button
(mainwin->toolbar,
LEARN_SPAM);
gtk_widget_set_size_request(progressbar, 120, 1);
gtk_box_pack_start(GTK_BOX(hbox_stat), progressbar, FALSE, FALSE, 0);
- online_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_ONLINE);
- offline_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_OFFLINE);
+ online_pixmap = stock_pixmap_widget(STOCK_PIXMAP_ONLINE);
+ offline_pixmap = stock_pixmap_widget(STOCK_PIXMAP_OFFLINE);
online_switch = gtk_button_new ();
- gtkut_widget_set_can_focus(online_switch, FALSE);
+ gtk_widget_set_can_focus(online_switch, FALSE);
CLAWS_SET_TIP(online_switch,
_("You are online. Click the icon to go offline"));
offline_switch = gtk_button_new ();
ac_button = gtk_button_new();
CLAWS_SET_TIP(ac_button, _("Select account"));
- gtkut_widget_set_can_focus(ac_button, FALSE);
+ gtk_widget_set_can_focus(ac_button, FALSE);
gtk_widget_set_size_request(ac_button, -1, 0);
gtk_box_pack_end(GTK_BOX(hbox_stat), ac_button, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(ac_button), "button_press_event",
summaryview->color_dim.red = summaryview->color_dim.green =
summaryview->color_dim.blue = COLOR_DIM;
- gtkut_convert_int_to_gdk_color(prefs_common.color_new,
+ gtkut_convert_int_to_gdk_color(prefs_common.color[COL_NEW],
&folderview->color_new);
- gtkut_convert_int_to_gdk_color(prefs_common.tgt_folder_col,
+ gtkut_convert_int_to_gdk_color(prefs_common.color[COL_TGT_FOLDER],
&folderview->color_op);
- summaryview->color_important.red = 0;
- summaryview->color_important.green = 0;
- summaryview->color_important.blue = (guint16)65535;
-
color[0] = summaryview->color_marked;
color[1] = summaryview->color_dim;
color[2] = folderview->color_new;
color[3] = folderview->color_op;
-#if !GTK_CHECK_VERSION(3, 0, 0)
colormap = gdk_drawable_get_colormap(gtk_widget_get_window(window));
gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
for (i = 0; i < 4; i++) {
if (success[i] == FALSE)
- g_warning("MainWindow: color allocation %d failed\n", i);
+ g_warning("MainWindow: color allocation %d failed", i);
}
-#endif
debug_print("done.\n");
#define ADD_MENU_ACCEL_GROUP_TO_WINDOW(menu,win) \
gtk_window_add_accel_group \
(GTK_WINDOW(win), \
- gtk_ui_manager_get_accel_group(gtkut_ui_manager())); \
- g_signal_connect(G_OBJECT(gtk_ui_manager_get_accel_group(gtkut_ui_manager())), \
- "accel_activate", \
- G_CALLBACK(main_window_accel_activate), mainwin);
+ gtk_ui_manager_get_accel_group(gtkut_ui_manager()));
ADD_MENU_ACCEL_GROUP_TO_WINDOW(summaryview->popupmenu, mainwin->window);
mainwindow_colorlabel_menu_create(mainwin, FALSE);
mainwindow_tags_menu_create(mainwin, FALSE);
-#ifdef MAEMO
- main_window_install_maemo_hooks(mainwin);
-#endif
-#ifndef MAEMO
if (prefs_common.mainwin_fullscreen) {
cm_toggle_menu_set_active_full(mainwin->ui_manager,
"Menu/View/FullScreen",
TRUE);
}
-#endif
+ if (prefs_common.mainwin_menubar)
+ cm_toggle_menu_set_active_full(mainwin->ui_manager,"Menu/View/ShowHide/MenuBar", TRUE);
+
return mainwin;
}
folderview_reinit_fonts(mainwin->folderview);
summary_reflect_prefs_pixmap_theme(mainwin->summaryview);
foldersel_reflect_prefs_pixmap_theme();
-#ifndef USE_NEW_ADDRBOOK
+#ifndef USE_ALT_ADDRBOOK
addressbook_reflect_prefs_pixmap_theme();
#endif
#ifndef GENERIC_UMPC
- pixmap = stock_pixmap_widget(mainwin->hbox_stat, STOCK_PIXMAP_ONLINE);
+ pixmap = stock_pixmap_widget(STOCK_PIXMAP_ONLINE);
gtk_container_remove(GTK_CONTAINER(mainwin->online_switch),
mainwin->online_pixmap);
gtk_container_add (GTK_CONTAINER(mainwin->online_switch), pixmap);
gtk_widget_show(pixmap);
mainwin->online_pixmap = pixmap;
- pixmap = stock_pixmap_widget(mainwin->hbox_stat, STOCK_PIXMAP_OFFLINE);
+ pixmap = stock_pixmap_widget(STOCK_PIXMAP_OFFLINE);
gtk_container_remove(GTK_CONTAINER(mainwin->offline_switch),
mainwin->offline_pixmap);
gtk_container_add (GTK_CONTAINER(mainwin->offline_switch), pixmap);
MainWindow *mainwin = (MainWindow *)data;
if (summary_is_locked(mainwin->summaryview)) {
- tags_tag = 0;
return TRUE;
}
/* re-create tags submenu */
: _("none"));
if (cur_account)
- buf = g_strdup_printf("%s - %s", ac_name, PROG_VERSION_FRIENDLY);
+ buf = g_strdup_printf("%s - %s", ac_name, PROG_VERSION);
else
- buf = g_strdup(PROG_VERSION_FRIENDLY);
+ buf = g_strdup(PROG_VERSION);
gtk_window_set_title(GTK_WINDOW(mainwin->window), buf);
g_free(buf);
if (for_quit)
val = alertpanel(_("Empty trash"),
_("Delete all messages in trash folders?"),
- GTK_STOCK_NO, "+" GTK_STOCK_YES, _("Don't quit"));
+ GTK_STOCK_NO, GTK_STOCK_YES, _("Don't quit"),
+ ALERTFOCUS_SECOND);
else
val = alertpanel(_("Empty trash"),
_("Delete all messages in trash folders?"),
- GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL,
+ ALERTFOCUS_SECOND);
if (val == G_ALERTALTERNATE) {
debug_print("will empty trash\n");
} else if (val == G_ALERTDEFAULT) {
if (mainwin->summaryview->folder_item &&
mainwin->summaryview->folder_item->stype == F_TRASH)
- gtk_widget_grab_focus(mainwin->folderview->ctree);
+ folderview_grab_focus(mainwin->folderview);
return TRUE;
}
if (mainwin->lock_count == 0 && !claws_is_starting())
UPDATE_STATE(M_UNLOCKED);
- if (selection != SUMMARY_NONE)
+ if (selection != SUMMARY_NONE && selection != SUMMARY_SELECTED_NONE)
UPDATE_STATE(M_MSG_EXIST);
if (item && item->path && folder_item_parent(item) && !item->no_select) {
UPDATE_STATE(M_EXEC);
!folder_has_parent_of_type(mainwin->summaryview->folder_item, F_TRASH)))
UPDATE_STATE(M_NOT_TRASH);
+ if (mainwin->summaryview->folder_item
+ && mainwin->summaryview->folder_item->stype != F_DRAFT)
+ UPDATE_STATE(M_NOT_DRAFT);
+
if (prefs_common.actions_list && g_slist_length(prefs_common.actions_list))
UPDATE_STATE(M_ACTIONS_EXIST);
break;
}
}
+
+#ifndef PASSWORD_CRYPTO_OLD
+ if (master_passphrase_is_entered()) {
+ UPDATE_STATE(M_MASTER_PASSPHRASE);
+ }
+#endif
#undef UPDATE_STATE
return state;
gint i;
gboolean mimepart_selected = FALSE;
-#define N_ENTRIES 82
+#define N_ENTRIES 88
static struct {
const gchar *entry;
SensitiveCondMask cond;
FILL_TABLE("Menu/File/Exit", M_UNLOCKED);
FILL_TABLE("Menu/Edit/SelectThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
- FILL_TABLE("Menu/Edit/DeleteThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/Edit/Find", M_SINGLE_TARGET_EXIST);
FILL_TABLE("Menu/Edit/QuickSearch", M_IN_MSGLIST);
+ FILL_TABLE("Menu/Edit/SearchFolder", M_TARGET_EXIST, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/View/SetColumns/Folderlist", M_UNLOCKED, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/View/Sort", M_EXEC, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/View/ThreadView", M_EXEC, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/View/ExpandThreads", M_MSG_EXIST, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/View/CollapseThreads", M_MSG_EXIST, M_SUMMARY_ISLIST);
- FILL_TABLE("Menu/View/HideReadThreads", M_HIDE_READ_THREADS, M_SUMMARY_ISLIST);
- FILL_TABLE("Menu/View/HideReadMessages", M_HIDE_READ_MSG, M_SUMMARY_ISLIST);
- FILL_TABLE("Menu/View/HideDelMessages", M_SUMMARY_ISLIST);
+ FILL_TABLE("Menu/View/HideReadThreads", M_HIDE_READ_THREADS, M_SUMMARY_ISLIST, M_NOT_DRAFT);
+ FILL_TABLE("Menu/View/HideReadMessages", M_HIDE_READ_MSG, M_SUMMARY_ISLIST, M_NOT_DRAFT);
+ FILL_TABLE("Menu/View/HideDelMessages", M_SUMMARY_ISLIST, M_NOT_DRAFT);
FILL_TABLE("Menu/View/Goto/Prev", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/Next", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/PrevUnread", M_MSG_EXIST);
+ FILL_TABLE("Menu/View/Goto/NextUnread", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/PrevNew", M_MSG_EXIST);
+ FILL_TABLE("Menu/View/Goto/NextNew", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/PrevMarked", M_MSG_EXIST);
+ FILL_TABLE("Menu/View/Goto/NextMarked", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/PrevLabeled", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/NextLabeled", M_MSG_EXIST);
FILL_TABLE("Menu/View/Goto/ParentMessage", M_SINGLE_TARGET_EXIST);
FILL_TABLE("Menu/Message/Copy", M_TARGET_EXIST, M_EXEC);
FILL_TABLE("Menu/Message/Trash", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS, M_NOT_TRASH);
FILL_TABLE("Menu/Message/Delete", M_TARGET_EXIST, M_ALLOW_DELETE);
+ FILL_TABLE("Menu/Message/TrashThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
+ FILL_TABLE("Menu/Message/DeleteThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/Message/CancelNews", M_TARGET_EXIST, M_ALLOW_DELETE, M_NEWS);
FILL_TABLE("Menu/Message/Mark", M_TARGET_EXIST, M_SUMMARY_ISLIST);
FILL_TABLE("Menu/Message/Mark/MarkSpam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
FILL_TABLE("Menu/Tools/Execute", M_DELAY_EXEC);
FILL_TABLE("Menu/Tools/Expunge", M_DELETED_EXISTS);
FILL_TABLE("Menu/Tools/ForgetSessionPasswords", M_SESSION_PASSWORDS);
+#ifndef PASSWORD_CRYPTO_OLD
+ FILL_TABLE("Menu/Tools/ForgetMasterPassphrase", M_MASTER_PASSPHRASE);
+#endif
FILL_TABLE("Menu/Tools/DeleteDuplicates/SelFolder", M_MSG_EXIST, M_ALLOW_DELETE);
FILL_TABLE("Menu/Configuration", M_UNLOCKED);
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/Sort/Descending", FALSE);
}
- if (mainwin->messageview
+ if (mainwin->messageview
&& mainwin->messageview->mimeview
&& mainwin->messageview->mimeview->textview)
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/AllHeaders",
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/ThreadView", (state & main_window_get_mask(M_THREADED, -1)) != 0);
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/ExpandThreads", (state & main_window_get_mask(M_THREADED, -1)) != 0);
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/CollapseThreads", (state & main_window_get_mask(M_THREADED, -1)) != 0);
- cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadThreads", (state & main_window_get_mask(M_THREADED, -1)) != 0);
+ cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadThreads", (state & main_window_get_mask(M_THREADED, -1)) != 0 && (state & main_window_get_mask(M_NOT_DRAFT, -1)) != 0);
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/CollapseAll", (prefs_common.hide_quotes == 1));
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/Collapse2", (prefs_common.hide_quotes == 2));
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/Collapse3", (prefs_common.hide_quotes == 3));
- if (mainwin->summaryview->folder_item && mainwin->summaryview->folder_item->hide_read_msgs)
+ if (mainwin->summaryview->folder_item && !mainwin->summaryview->folder_item->threaded)
+ cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/HideReadThreads", FALSE);
+ if ((mainwin->summaryview->folder_item && mainwin->summaryview->folder_item->hide_read_msgs) ||
+ quicksearch_has_sat_predicate(mainwin->summaryview->quicksearch))
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadThreads", FALSE);
- if (mainwin->summaryview->folder_item && mainwin->summaryview->folder_item->hide_read_threads)
+ if ((mainwin->summaryview->folder_item && mainwin->summaryview->folder_item->hide_read_threads) ||
+ quicksearch_has_sat_predicate(mainwin->summaryview->quicksearch))
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadMessages", FALSE);
+ if (quicksearch_has_sat_predicate(mainwin->summaryview->quicksearch))
+ cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideDelMessages", FALSE);
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/Goto/PrevHistory",
messageview_nav_has_prev(mainwin->messageview));
cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/Message/CheckSignature",
mimepart_selected && mainwin->messageview->mimeview->signed_part);
+ sensitive = TRUE;
+ if (mimepart_selected) {
+ MimeInfo *partinfo = messageview_get_selected_mime_part(mainwin->messageview);
+
+ if (partinfo && (partinfo->type == MIMETYPE_MESSAGE ||
+ partinfo->type == MIMETYPE_IMAGE ||
+ partinfo->type == MIMETYPE_MULTIPART)) {
+ sensitive = FALSE;
+ }
+ }
+ cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/Part/AsText", sensitive);
+
main_window_menu_callback_unblock(mainwin);
}
for (i = 0;
*buf != '>' && *buf != 0x00 && i < BUFFSIZE;
tmp[i++] = *(buf++));
+ if (*buf == 0) {
+ *buffer = NULL;
+ *url_decoded = '\0';
+ return;
+ }
buf++;
}
else {
GtkWidget *vpaned;
GtkWidget *vbox_body = mainwin->vbox_body;
gboolean first_set = (mainwin->hpaned == NULL);
- debug_print("Setting widgets... ");
+ debug_print("Setting widgets...\n");
#ifndef GENERIC_UMPC
mainwin->messageview->statusbar = mainwin->statusbar;
mainwin);
}
- debug_print("done.\n");
+ debug_print("Setting widgets done.\n");
}
void main_window_destroy_all(void)
/* free toolbar stuff */
toolbar_clear_list(TOOLBAR_MAIN);
- TOOLBAR_DESTROY_ACTIONS(mainwin->toolbar->action_list);
- TOOLBAR_DESTROY_ITEMS(mainwin->toolbar->item_list);
+ toolbar_destroy(mainwin->toolbar);
summaryview_destroy(mainwin->summaryview);
mainwin->folderview->mainwin = NULL;
if (prefs_common.confirm_on_exit) {
if (alertpanel(_("Exit"), _("Exit Claws Mail?"),
- GTK_STOCK_CANCEL, GTK_STOCK_QUIT, NULL)
+ GTK_STOCK_CANCEL, GTK_STOCK_QUIT, NULL, ALERTFOCUS_FIRST)
!= G_ALERTALTERNATE)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
static void search_folder_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
+ FolderItem *item = mainwin->summaryview->folder_item;
+ cm_return_if_fail(item != NULL);
summary_search(mainwin->summaryview);
}
msginfo_list = summary_get_selection(mainwin->summaryview);
cm_return_if_fail(msginfo_list != NULL);
- compose_reply_from_messageview(msgview, msginfo_list, action);
+
+ if (!summary_has_opened_message(mainwin->summaryview)) {
+ compose_reply_from_messageview(NULL, msginfo_list, action);
+ } else if (summary_is_opened_message_selected(mainwin->summaryview)) {
+ compose_reply_from_messageview(msgview, msginfo_list, action);
+ } else {
+ compose_reply_from_messageview(msgview, NULL, action);
+ }
+
g_slist_free(msginfo_list);
}
mainwindow_reset_paned(GTK_PANED(mainwin->vpaned));
if (old_layout_mode == SMALL_LAYOUT && layout_mode != SMALL_LAYOUT) {
mainwindow_reset_paned(GTK_PANED(mainwin->hpaned));
+ if (layout_mode == VERTICAL_LAYOUT)
+ mainwindow_reset_paned(GTK_PANED(mainwin->vpaned));
}
if (old_layout_mode != SMALL_LAYOUT && layout_mode == SMALL_LAYOUT) {
mainwin_paned_show_first(GTK_PANED(mainwin->hpaned));
online_switch_clicked (GTK_BUTTON(mainwin->offline_switch), mainwin);
offline_ask_sync = TRUE;
+ inc_reset_offline_override_timers();
+
switching = FALSE;
}
if (offline_ask_sync && ask && alertpanel(_("Folder synchronisation"),
_("Do you want to synchronise your folders now?"),
- GTK_STOCK_CANCEL, _("+_Synchronise"), NULL) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, _("_Synchronise"), NULL, ALERTFOCUS_SECOND) != G_ALERTALTERNATE)
return;
if (offline_ask_sync)
static void addressbook_open_cb(GtkAction *action, gpointer data)
{
-#ifndef USE_NEW_ADDRBOOK
+#ifndef USE_ALT_ADDRBOOK
addressbook_open(NULL);
#else
GError* error = NULL;
addressbook_dbus_open(FALSE, &error);
if (error) {
- g_warning("Failed to open address book");
- g_warning("%s", error->message);
+ g_warning("Failed to open address book: %s", error->message);
g_error_free(error);
}
#endif
}
}
+static void toggle_menubar_cb(GtkAction *action, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+ if (mainwin->menu_lock_count) return;
+ if (!gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
+ gtk_widget_hide(GTK_WIDGET(mainwin->menubar));
+ prefs_common.mainwin_menubar = FALSE;
+ } else {
+ gtk_widget_show(GTK_WIDGET(mainwin->menubar));
+ prefs_common.mainwin_menubar = TRUE;
+ }
+}
+
static void hide_quotes_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
summary_unmark(mainwin->summaryview);
}
+static void mark_as_read_cb(GtkAction *action, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+ summary_mark_as_read(mainwin->summaryview);
+}
+
static void mark_as_unread_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
summary_mark_as_unread(mainwin->summaryview);
}
-static void mark_as_read_cb(GtkAction *action, gpointer data)
+static void mark_all_read_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- summary_mark_as_read(mainwin->summaryview);
+ summary_mark_all_read(mainwin->summaryview, TRUE);
}
-static void mark_all_read_cb(GtkAction *action, gpointer data)
+static void mark_all_unread_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- summary_mark_all_read(mainwin->summaryview);
+ summary_mark_all_unread(mainwin->summaryview, TRUE);
}
static void mark_as_spam_cb(GtkAction *action, gpointer data)
static void sort_summary_cb(GtkAction *action, GtkRadioAction *current, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- FolderItem *item = mainwin->summaryview->folder_item;
gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
if (mainwin->menu_lock_count) return;
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current)) && item) {
+ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current))) {
summary_sort(mainwin->summaryview, (FolderSortKey)value,
- item->sort_type);
- item->sort_key = value;
+ mainwin->summaryview->sort_type);
}
}
static void sort_summary_type_cb(GtkAction *gaction, GtkRadioAction *current, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- FolderItem *item = mainwin->summaryview->folder_item;
gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
if (mainwin->menu_lock_count) return;
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current)) && item)
+ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current)))
summary_sort(mainwin->summaryview,
- item->sort_key, (FolderSortType)value);
+ mainwin->summaryview->sort_key, (FolderSortType)value);
}
static void attract_by_subject_cb(GtkAction *action, gpointer data)
summary_attract_by_subject(mainwin->summaryview);
}
-static void delete_duplicated_cb(GtkAction *action, gpointer data)
+void mainwindow_delete_duplicated(MainWindow *mainwin)
{
- MainWindow *mainwin = (MainWindow *)data;
FolderItem *item;
item = folderview_get_selected_item(mainwin->folderview);
if (item) {
+ gint result;
+
main_window_cursor_wait(mainwin);
STATUSBAR_PUSH(mainwin, _("Deleting duplicated messages..."));
-
- folderutils_delete_duplicates(item, prefs_common.immediate_exec ?
+ result = folderutils_delete_duplicates(item, prefs_common.immediate_exec ?
DELETE_DUPLICATES_REMOVE : DELETE_DUPLICATES_SETFLAG);
-
STATUSBAR_POP(mainwin);
main_window_cursor_normal(mainwin);
+
+ switch (result) {
+ case -1:
+ break;
+ case 0:
+ alertpanel_notice(_("No duplicate message found in selected folder.\n"));
+ break;
+ default: {
+ gchar *msg;
+
+ if (prefs_common.immediate_exec) {
+ msg = ngettext("Deleted %d duplicate message in selected folder.\n",
+ "Deleted %d duplicate messages in selected folder.\n",
+ result);
+ } else {
+ msg = ngettext("Marked %d duplicate message for deletion in selected folder.\n",
+ "Marked %d duplicate messages for deletion in selected folder.\n",
+ result);
+ }
+ alertpanel_notice(msg, result);
+ }
+ }
}
}
+static void delete_duplicated_cb(GtkAction *action, gpointer data)
+{
+ mainwindow_delete_duplicated((MainWindow *)data);
+}
+
struct DelDupsData
{
guint dups;
}
}
-static void delete_duplicated_all_cb(GtkAction *action, gpointer mw)
+void mainwindow_delete_duplicated_all(MainWindow *mainwin)
{
- MainWindow *mainwin = (MainWindow *)mw;
struct DelDupsData data = {0, 0};
main_window_cursor_wait(mainwin);
+ STATUSBAR_PUSH(mainwin, _("Deleting duplicated messages in all folders..."));
folder_func_to_all_folders(deldup_all, &data);
+ STATUSBAR_POP(mainwin);
main_window_cursor_normal(mainwin);
-
- alertpanel_notice(ngettext("Deleted %d duplicate message in %d folders.\n",
+
+ if (data.dups > 0) {
+ alertpanel_notice(ngettext("Deleted %d duplicate message in %d folders.\n",
"Deleted %d duplicate messages in %d folders.\n",
data.dups),
- data.dups, data.folders);
+ data.dups, data.folders);
+ } else {
+ alertpanel_notice(_("No duplicate message found in %d folders.\n"), data.folders);
+ }
+}
+
+static void delete_duplicated_all_cb(GtkAction *action, gpointer mw)
+{
+ MainWindow *mainwin = (MainWindow *)mw;
+
+ mainwindow_delete_duplicated_all(mainwin);
}
static void filter_cb(GtkAction *action, gpointer data)
FolderView *folderview = mainwin->folderview;
if (!mainwin->summaryview->folder_item) return;
- if (!folderview->opened) return;
+ if ((fitem = folderview_get_opened_item(folderview)) == NULL) return;
folder_update_op_count();
-
- fitem = gtk_cmctree_node_get_row_data(GTK_CMCTREE(folderview->ctree),
- folderview->opened);
- if (!fitem) return;
-
folder_item_scan(fitem);
summary_show(mainwin->summaryview, fitem);
}
static void prev_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- summary_step(mainwin->summaryview, GTK_SCROLL_STEP_BACKWARD);
+ summary_select_prev(mainwin->summaryview);
}
static void next_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- summary_step(mainwin->summaryview, GTK_SCROLL_STEP_FORWARD);
+ summary_select_next(mainwin->summaryview);
}
static void prev_unread_cb(GtkAction *action, gpointer data)
if (info) {
if (info->folder != mainwin->summaryview->folder_item)
folderview_select(mainwin->folderview, info->folder);
- summary_display_by_msgnum(mainwin->summaryview, info->msgnum);
- summary_display_msg_selected(mainwin->summaryview, FALSE);
- procmsg_msginfo_free(info);
+ summary_select_by_msgnum(mainwin->summaryview, info->msgnum,
+ OPEN_SELECTED_ON_PREVNEXT);
+ procmsg_msginfo_free(&info);
main_window_set_menu_sensitive(mainwindow_get_mainwindow());
toolbar_main_set_sensitive(mainwindow_get_mainwindow());
}
if (info) {
if (info->folder != mainwin->summaryview->folder_item)
folderview_select(mainwin->folderview, info->folder);
- summary_display_by_msgnum(mainwin->summaryview, info->msgnum);
- procmsg_msginfo_free(info);
+ summary_select_by_msgnum(mainwin->summaryview, info->msgnum,
+ OPEN_SELECTED_ON_PREVNEXT);
+ procmsg_msginfo_free(&info);
main_window_set_menu_sensitive(mainwindow_get_mainwindow());
toolbar_main_set_sensitive(mainwindow_get_mainwindow());
}
MainWindow *mainwin = (MainWindow *)data;
FolderItem *to_folder;
- to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_ALL, NULL, FALSE);
+ to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_ALL, NULL, FALSE,
+ _("Select folder to go to"));
if (to_folder)
folderview_select(mainwin->folderview, to_folder);
static void goto_unread_folder_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- folderview_select_next_unread(mainwin->folderview, FALSE);
+ folderview_select_next_with_flag(mainwin->folderview, MSG_UNREAD);
}
static void scroll_prev_line_cb(GtkAction *action, gpointer data)
static void select_thread_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- summary_select_thread(mainwin->summaryview, FALSE);
+ summary_select_thread(mainwin->summaryview, FALSE, FALSE);
+}
+
+static void trash_thread_cb(GtkAction *action, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+ summary_select_thread(mainwin->summaryview, FALSE, TRUE);
}
static void delete_thread_cb(GtkAction *action, gpointer data)
{
MainWindow *mainwin = (MainWindow *)data;
- summary_select_thread(mainwin->summaryview, TRUE);
+ summary_select_thread(mainwin->summaryview, TRUE, FALSE);
}
static void create_filter_cb(GtkAction *gaction, gpointer data)
if (!cur_account) {
new_account_cb(NULL, mainwin);
} else {
- account_open(cur_account);
+ account_open(cur_account, FALSE);
}
}
gchar *str;
if (item->path)
- str = g_strdup_printf(_("Scanning folder %s%c%s ..."),
+ str = g_strdup_printf(_("Scanning folder %s%c%s..."),
LOCAL_FOLDER(folder)->rootpath,
G_DIR_SEPARATOR,
item->path);
else
- str = g_strdup_printf(_("Scanning folder %s ..."),
+ str = g_strdup_printf(_("Scanning folder %s..."),
LOCAL_FOLDER(folder)->rootpath);
STATUSBAR_PUSH(mainwin, str);
fgtn), fgtn, accs);
}
+#ifndef PASSWORD_CRYPTO_OLD
+static void forget_master_passphrase_cb(GtkAction *action, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ main_window_lock(mainwin);
+ master_passphrase_forget();
+ main_window_unlock(mainwin);
+}
+#endif
+
void mainwindow_learn (MainWindow *mainwin, gboolean is_spam)
{
summary_mark_as_spam(mainwin->summaryview, is_spam, NULL);
return;
}
- msg = strrchr(tmp, G_DIR_SEPARATOR);
+ msg = strrchr(tmp, '/');
if (msg) {
*msg++ = '\0';
if ((item = folder_find_item_from_identifier(tmp))) {
}
if (item && msg && atoi(msg)) {
g_print("selecting message %d\n", atoi(msg));
- summary_select_by_msgnum(mainwin->summaryview, atoi(msg));
- summary_display_msg_selected(mainwin->summaryview, FALSE);
+ summary_select_by_msgnum(mainwin->summaryview, atoi(msg), TRUE);
if (popup)
main_window_popup(mainwin);
g_free(tmp);
msginfo = folder_item_get_msginfo_by_msgid(item, msg);
if (msginfo) {
g_print("selecting message %s\n", msg);
- summary_select_by_msgnum(mainwin->summaryview, msginfo->msgnum);
- summary_display_msg_selected(mainwin->summaryview, FALSE);
+ summary_select_by_msgnum(mainwin->summaryview, msginfo->msgnum, TRUE);
if (popup)
main_window_popup(mainwin);
g_free(tmp);
- procmsg_msginfo_free(msginfo);
+ procmsg_msginfo_free(&msginfo);
return;
} else {
g_print("'%s' not found\n", msg);
void mainwindow_exit_folder(MainWindow *mainwin) {
if (prefs_common.layout_mode == SMALL_LAYOUT) {
- folderview_close_opened(mainwin->folderview);
+ folderview_close_opened(mainwin->folderview, FALSE);
mainwin_paned_show_first(GTK_PANED(mainwin->hpaned));
- gtk_widget_grab_focus(mainwin->folderview->ctree);
+ folderview_grab_focus(mainwin->folderview);
}
mainwin->in_folder = FALSE;
main_window_set_menu_sensitive(mainwin);
&& mainwin->messageview->mimeview)
mimeview_select_prev_part(mainwin->messageview->mimeview);
}
-
-#ifdef MAEMO
-gboolean maemo_mainwindow_is_fullscreen(GtkWidget *widget)
-{
- gint w, h;
- gtk_window_get_size(GTK_WINDOW(widget), &w, &h);
- return (w == 800);
-}
-
-void maemo_window_full_screen_if_needed (GtkWindow *window)
-{
- if (maemo_mainwindow_is_fullscreen(mainwindow_get_mainwindow()->window)) {
- gtk_window_fullscreen(GTK_WINDOW(window));
- }
-}
-
-void maemo_connect_key_press_to_mainwindow (GtkWindow *window)
-{
- g_signal_connect(G_OBJECT(window), "key_press_event",
- G_CALLBACK(mainwindow_key_pressed), mainwindow_get_mainwindow());
-}
-#endif