guint action,
GtkWidget *widget);
+static void set_decode_cb (MainWindow *mainwin,
+ guint action,
+ GtkWidget *widget);
+
static void hide_read_messages (MainWindow *mainwin,
guint action,
GtkWidget *widget);
{N_("/_File"), NULL, NULL, 0, "<Branch>"},
{N_("/_File/_Add mailbox"), NULL, NULL, 0, "<Branch>"},
{N_("/_File/_Add mailbox/MH..."), NULL, add_mailbox_cb, 0, NULL},
+ {N_("/_File/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_File/Change folder order"), NULL, foldersort_cb, 0, NULL},
+ {N_("/_File/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_File/_Import mbox file..."), NULL, import_mbox_cb, 0, NULL},
{N_("/_File/_Export to mbox file..."), NULL, export_mbox_cb, 0, NULL},
- {N_("/_File/Empty _trash"), "<shift>D", empty_trash_cb, 0, NULL},
+ {N_("/_File/---"), NULL, NULL, 0, "<Separator>"},
+ {N_("/_File/Empty all _Trash folders"), "<shift>D", empty_trash_cb, 0, NULL},
{N_("/_File/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_File/_Save as..."), "<control>S", save_as_cb, 0, NULL},
{N_("/_File/_Print..."), NULL, print_cb, 0, NULL},
#undef CODESET_SEPARATOR
#undef CODESET_ACTION
+#define DECODE_SEPARATOR \
+ {N_("/_View/Decode/---"), NULL, NULL, 0, "<Separator>"}
+#define DECODE_ACTION(action) \
+ NULL, set_decode_cb, action, "/View/Decode/Auto detect"
+ {N_("/_View/Decode"), NULL, NULL, 0, "<Branch>"},
+ {N_("/_View/Decode/_Auto detect"),
+ NULL, set_decode_cb, 0, "<RadioItem>"},
+ {N_("/_View/Decode/---"), NULL, NULL, 0, "<Separator>"},
+ {N_("/_View/Decode/_8bit"), DECODE_ACTION(ENC_8BIT)},
+ {N_("/_View/Decode/_Quoted printable"), DECODE_ACTION(ENC_QUOTED_PRINTABLE)},
+ {N_("/_View/Decode/_Base64"), DECODE_ACTION(ENC_BASE64)},
+ {N_("/_View/Decode/_Uuencode"), DECODE_ACTION(ENC_X_UUENCODE)},
+
+#undef DECODE_SEPARATOR
+#undef DECODE_ACTION
+
{N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_View/Open in new _window"), "<control><alt>N", open_msg_cb, 0, NULL},
{N_("/_View/Mess_age source"), "<control>U", view_source_cb, 0, NULL},
{N_("/_Configuration/_Edit accounts..."),
NULL, account_edit_open, 0, NULL},
{N_("/_Configuration/---"), NULL, NULL, 0, "<Separator>"},
- {N_("/_Configuration/_Common preferences..."),
- NULL, prefs_common_open_cb, 0, NULL},
+ {N_("/_Configuration/_Preferences..."),
+ NULL, prefs_open_cb, 0, NULL},
{N_("/_Configuration/Pre-processing..."),
NULL, prefs_pre_processing_open_cb, 0, NULL},
{N_("/_Configuration/Post-processing..."),
NULL, prefs_filtering_open_cb, 0, NULL},
{N_("/_Configuration/_Templates..."), NULL, prefs_template_open_cb, 0, NULL},
{N_("/_Configuration/_Actions..."), NULL, prefs_actions_open_cb, 0, NULL},
- {N_("/_Configuration/_Other Preferences..."), NULL, prefs_open_cb, 0, NULL},
{N_("/_Configuration/Plugins..."), NULL, plugins_open_cb, 0, NULL},
{N_("/_Help"), NULL, NULL, 0, "<Branch>"},
manage_window_focus_in(mainwin->window, NULL, NULL);
}
- procmsg_empty_trash();
+ procmsg_empty_all_trash();
if (mainwin->summaryview->folder_item &&
mainwin->summaryview->folder_item->stype == F_TRASH)
return;
}
folder = folder_new(folder_get_class_from_string("mh"),
- !strcmp(path, "Mail") ? _("Mailbox") : g_basename(path),
- path);
+ !strcmp(path, "Mail") ? _("Mailbox") :
+ g_path_get_basename(path), path);
g_free(path);
if (folder->klass->create_tree(folder) < 0) {
{"/File/Add mailbox/MH..." , M_UNLOCKED},
{"/File/Change folder order" , M_UNLOCKED},
{"/File/Export to mbox file..." , M_UNLOCKED},
- {"/File/Empty trash" , M_UNLOCKED},
+ {"/File/Empty all Trash folders" , M_UNLOCKED},
{"/File/Work offline" , M_UNLOCKED},
{"/File/Save as...", M_TARGET_EXIST|M_UNLOCKED},
if (GTK_CHECK_MENU_ITEM(widget)->active) {
str = conv_get_charset_str((CharSet)action);
- g_free(prefs_common.force_charset);
- prefs_common.force_charset = str ? g_strdup(str) : NULL;
-
+
+ g_free(mainwin->messageview->forced_charset);
+ mainwin->messageview->forced_charset = str ? g_strdup(str) : NULL;
+ procmime_force_charset(str);
+
summary_redisplay_msg(mainwin->summaryview);
debug_print("forced charset: %s\n", str ? str : "Auto-Detect");
}
}
+static void set_decode_cb(MainWindow *mainwin, guint action,
+ GtkWidget *widget)
+{
+ if (GTK_CHECK_MENU_ITEM(widget)->active) {
+ mainwin->messageview->forced_encoding = (EncodingType)action;
+
+ summary_redisplay_msg(mainwin->summaryview);
+
+ debug_print("forced encoding: %d\n", action);
+ }
+}
+
static void hide_read_messages (MainWindow *mainwin, guint action,
GtkWidget *widget)
{
{
FolderItem *item;
- item = folderview_get_selected(mainwin->folderview);
+ item = folderview_get_selected_item(mainwin->folderview);
if (item) {
main_window_cursor_wait(mainwin);
STATUSBAR_PUSH(mainwin, _("Deleting duplicated messages..."));
static void prefs_common_open_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{
- prefs_common_open();
+ /* prefs_common_open(); */
}
static void prefs_pre_processing_open_cb(MainWindow *mainwin, guint action,