{"claws-mail/msg-path-list", 0, TARGET_MAIL_CM_PATH_LIST},
};
+static void summary_reedit_cb(GtkAction *gaction, gpointer data);
static void summary_reply_cb(GtkAction *gaction, gpointer data);
/* Only submenus and specifically-handled menu entries here */
static GtkActionEntry summary_popup_entries[] =
{
{"SummaryViewPopup", NULL, "SummaryViewPopup", NULL, NULL, NULL },
+ {"SummaryViewPopup/Reedit", NULL, N_("Re-edit"), NULL, NULL, G_CALLBACK(summary_reedit_cb) },
{"SummaryViewPopup/Reply", NULL, N_("_Reply"), NULL, NULL, G_CALLBACK(summary_reply_cb) }, /* COMPOSE_REPLY */
{"SummaryViewPopup/ReplyTo", NULL, N_("Repl_y to"), NULL, NULL, NULL },
{"SummaryViewPopup/ReplyTo/All", NULL, N_("_All"), NULL, NULL, G_CALLBACK(summary_reply_cb) }, /* COMPOSE_REPLY_TO_ALL */
G_N_ELEMENTS(summary_popup_entries), (gpointer)summaryview);
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus", "SummaryViewPopup", "SummaryViewPopup", GTK_UI_MANAGER_MENU)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup", "Reedit", "SummaryViewPopup/Reedit", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup", "Reply", "SummaryViewPopup/Reply", GTK_UI_MANAGER_MENUITEM)
#ifndef GENERIC_UMPC
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup", "ReplyTo", "SummaryViewPopup/ReplyTo", GTK_UI_MANAGER_MENU)
g_slist_free(mlist);
- if (is_refresh) {
- if (!quicksearch_is_in_typing(summaryview->quicksearch)) {
- summaryview->displayed =
- summary_find_msg_by_msgnum(summaryview,
- displayed_msgnum);
- if (!summaryview->displayed)
- messageview_clear(summaryview->messageview);
+ if (quicksearch_is_in_typing(summaryview->quicksearch) ||
+ quicksearch_is_running(summaryview->quicksearch)) {
+ summaryview->displayed =
+ summary_find_msg_by_msgnum(summaryview,
+ displayed_msgnum);
+ if (!summaryview->displayed)
+ messageview_clear(summaryview->messageview);
+ summary_unlock(summaryview);
+
+ if (quicksearch_is_running(summaryview->quicksearch))
+ summary_select_by_msgnum(summaryview, selected_msgnum,
+ OPEN_SELECTED_ON_SEARCH_RESULTS);
+ else
+ summary_select_by_msgnum(summaryview, selected_msgnum,
+ FALSE);
+
+ summary_lock(summaryview);
+ if (!summaryview->selected) {
+ /* no selected message - select first unread
+ message, but do not display it */
+ node = summary_find_next_flagged_msg(summaryview, NULL,
+ MSG_UNREAD, FALSE);
+ if (node == NULL && GTK_CMCLIST(ctree)->row_list != NULL)
+ node = gtk_cmctree_node_nth
+ (ctree,
+ item->sort_type == SORT_DESCENDING
+ ? 0 : GTK_CMCLIST(ctree)->rows - 1);
summary_unlock(summaryview);
if (quicksearch_is_running(summaryview->quicksearch))
- summary_select_by_msgnum(summaryview, selected_msgnum,
+ summary_select_node(summaryview, node,
OPEN_SELECTED_ON_SEARCH_RESULTS);
else
- summary_select_by_msgnum(summaryview, selected_msgnum,
- FALSE);
+ summary_select_node(summaryview, node,
+ OPEN_SELECTED_ON_FOLDER_OPEN);
summary_lock(summaryview);
- if (!summaryview->selected) {
- /* no selected message - select first unread
- message, but do not display it */
- node = summary_find_next_flagged_msg(summaryview, NULL,
- MSG_UNREAD, FALSE);
- if (node == NULL && GTK_CMCLIST(ctree)->row_list != NULL)
- node = gtk_cmctree_node_nth
- (ctree,
- item->sort_type == SORT_DESCENDING
- ? 0 : GTK_CMCLIST(ctree)->rows - 1);
- summary_unlock(summaryview);
-
- if (quicksearch_is_running(summaryview->quicksearch))
- summary_select_node(summaryview, node,
- OPEN_SELECTED_ON_SEARCH_RESULTS);
- else
- summary_select_node(summaryview, node,
- OPEN_SELECTED_ON_FOLDER_OPEN);
-
- summary_lock(summaryview);
- }
- } else {
- /* just select first/last */
- if (GTK_CMCLIST(ctree)->row_list != NULL)
- node = gtk_cmctree_node_nth
- (ctree,
- item->sort_type == SORT_DESCENDING
- ? 0 : GTK_CMCLIST(ctree)->rows - 1);
- summary_select_node(summaryview, node, OPEN_SELECTED_ON_SEARCH_RESULTS);
}
} else {
/* backward compat */
if (node) {
gint open_selected = -1;
- if (!is_refresh) {
- if (OPEN_SELECTED_ON_FOLDER_OPEN)
- open_selected = 1;
- else
- open_selected = 0;
- }
+ if (OPEN_SELECTED_ON_FOLDER_OPEN)
+ open_selected = 1;
+ else
+ open_selected = 0;
summary_select_node(summaryview, node, open_selected);
}
gint i;
#ifndef GENERIC_UMPC
-#define N_ENTRIES 39
+#define N_ENTRIES 40
#else
-#define N_ENTRIES 28
+#define N_ENTRIES 29
#endif
static struct {
const gchar *entry;
entry[i].entry = (const gchar *) entry_str; entry[i++].cond = main_window_get_mask(__VA_ARGS__, -1); \
} while (0)
+ FILL_TABLE("Menus/SummaryViewPopup/Reedit", M_TARGET_EXIST, M_DRAFT);
FILL_TABLE("Menus/SummaryViewPopup/Reply", M_HAVE_ACCOUNT, M_TARGET_EXIST);
#ifndef GENERIC_UMPC
FILL_TABLE("Menus/SummaryViewPopup/ReplyTo", M_HAVE_ACCOUNT, M_TARGET_EXIST);
static gchar date_modified[80];
static gchar col_score[11];
static gchar from_buf[BUFFSIZE], to_buf[BUFFSIZE];
- static gchar tmp1[BUFFSIZE], tmp2[BUFFSIZE], tmp3[BUFFSIZE];
+ static gchar tmp1[BUFFSIZE], tmp2[BUFFSIZE+4], tmp3[BUFFSIZE];
gint *col_pos = summaryview->col_pos;
gchar *from_text = NULL, *to_text = NULL, *tags_text = NULL;
gboolean should_swap = FALSE;
to_text = to_text ? to_text : _("(No From)");
}
}
- snprintf(tmp2, BUFFSIZE-1, "➜ %s", to_text);
+ snprintf(tmp2, BUFFSIZE+4, "➜ %s", to_text);
tmp2[BUFFSIZE-1]='\0';
text[col_pos[S_COL_FROM]] = tmp2;
}
gtk_widget_set_sensitive(summaryview->ctree, TRUE);
}
+static void summary_reedit_cb(GtkAction *gaction, gpointer data)
+{
+ SummaryView *summaryview = (SummaryView *)data;
+ summary_reedit(summaryview);
+}
+
#define DO_ACTION(name, act) { if (!strcmp(a_name, name)) action = act; }
static void summary_reply_cb(GtkAction *gaction, gpointer data)
{