{N_("/Repl_y to/_sender"), NULL, summary_reply_cb, COMPOSE_REPLY_TO_SENDER, NULL},
{N_("/Repl_y to/mailing _list"),
"<control>L", summary_reply_cb, COMPOSE_REPLY_TO_LIST, NULL},
- {N_("/Follow-up and reply to"), NULL, summary_reply_cb, COMPOSE_FOLLOWUP_AND_REPLY_TO, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
- {N_("/_Forward"), "<control><alt>F", summary_reply_cb, COMPOSE_FORWARD, NULL},
+ {N_("/_Forward"), "<control><alt>F", summary_reply_cb, COMPOSE_FORWARD_INLINE, NULL},
+ {N_("/For_ward as attachment"), NULL, summary_reply_cb, COMPOSE_FORWARD_AS_ATTACH, NULL},
{N_("/Redirect"), NULL, summary_reply_cb, COMPOSE_REDIRECT, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/M_ove..."), "<control>O", summary_move_to, 0, NULL},
{N_("/_Copy..."), "<shift><control>O", summary_copy_to, 0, NULL},
{N_("/Move to _trash"), "<control>D", summary_delete_trash, 0, NULL},
{N_("/_Delete..."), NULL, summary_delete, 0, NULL},
- {N_("/Cancel a news message"), NULL, summary_cancel, 0, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Mark"), NULL, NULL, 0, "<Branch>"},
{N_("/_Mark/_Mark"), NULL, summary_mark, 0, NULL},
{N_("/_Mark/Unlock"), NULL, summary_msgs_unlock, 0, NULL},
{N_("/Color la_bel"), NULL, NULL, 0, NULL},
- {N_("/---"), NULL, NULL, 0, "<Separator>"},
- {N_("/Re-_edit"), NULL, summary_reedit, 0, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/Add sender to address boo_k"),
NULL, summary_add_address_cb, 0, NULL},
"<control><alt>N", summary_open_msg, 0, NULL},
{N_("/_View/_Source"), "<control>U", summary_view_source, 0, NULL},
{N_("/_View/All _header"), "<control>H", summary_show_all_header_cb, 0, "<ToggleItem>"},
+ {N_("/---"), NULL, NULL, 0, "<Separator>"},
+ {N_("/_Save as..."), "<control>S", summary_save_as, 0, NULL},
+ {N_("/_Print..."), "<control>P", summary_print, 0, NULL},
}; /* see also list in menu_connect_identical_items() in menu.c if this changes */
static const gchar *const col_label[N_SUMMARY_COLS] = {
- N_("M"), /* S_COL_MARK */
+ "", /* S_COL_MARK */
N_("S"), /* S_COL_STATUS */
"", /* S_COL_MIME */
N_("Subject"), /* S_COL_SUBJECT */
N_("To"), /* S_COL_TO */
N_("Date"), /* S_COL_DATE */
N_("Size"), /* S_COL_SIZE */
- N_("No."), /* S_COL_NUMBER */
+ N_("#"), /* S_COL_NUMBER */
N_("Score"), /* S_COL_SCORE */
- N_("L") /* S_COL_LOCKED */
+ "", /* S_COL_LOCKED */
};
#define START_LONG_OPERATION(summaryview) { \
if (summary_is_locked(summaryview)) return FALSE;
+ if (!summaryview->mainwin)
+ return FALSE;
+
inc_lock();
summary_lock(summaryview);
g_slist_free(mlist);
- gtk_clist_thaw(GTK_CLIST(ctree));
-
if (is_refresh) {
summaryview->displayed =
summary_find_msg_by_msgnum(summaryview,
summary_status_show(summaryview);
summary_set_menu_sensitive(summaryview);
toolbar_main_set_sensitive(summaryview->mainwin);
+
+ gtk_clist_thaw(GTK_CLIST(ctree));
debug_print("\n");
STATUSBAR_PUSH(summaryview->mainwin, _("Done."));
{"/Reply to/all" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
{"/Reply to/sender" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
{"/Reply to/mailing list" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Follow-up and reply to" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST|M_NEWS},
{"/Forward" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+ {"/Forward as attachment" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Redirect" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Re-edit" , M_HAVE_ACCOUNT|M_ALLOW_REEDIT},
-
- {"/Move..." , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NOT_NEWS},
- {"/Copy..." , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
- {"/Move to trash" , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NOT_NEWS},
- {"/Delete..." , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NOT_NEWS},
- {"/Cancel a news message" , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NEWS},
+ {"/Move..." , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
+ {"/Copy..." , M_TARGET_EXIST|M_EXEC},
+ {"/Move to trash" , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
+ {"/Delete..." , M_TARGET_EXIST|M_ALLOW_DELETE},
{"/Mark" , M_TARGET_EXIST},
{"/Mark/Mark" , M_TARGET_EXIST},
{"/View/Open in new window" , M_SINGLE_TARGET_EXIST},
{"/View/Source" , M_SINGLE_TARGET_EXIST},
{"/View/All header" , M_SINGLE_TARGET_EXIST},
-#if 0
- {"/Save as..." , M_TARGET_EXIST|M_UNLOCKED},
- {"/Print..." , M_TARGET_EXIST|M_UNLOCKED},
-
- {"/Select thread" , M_SINGLE_TARGET_EXIST},
- {"/Select all" , M_TARGET_EXIST},
-#endif
+ {"/Save as..." , M_TARGET_EXIST},
+ {"/Print..." , M_TARGET_EXIST},
{NULL, 0}
};
gint pos;
const gchar *title;
SummaryColumnType type;
- gboolean single_char;
GtkJustification justify;
static FolderSortKey sort_by[N_SUMMARY_COLS] = {
type = summaryview->col_state[pos].type;
/* CLAWS: mime and unread are single char headers */
- single_char = (type == S_COL_MIME || type == S_COL_STATUS);
justify = (type == S_COL_NUMBER || type == S_COL_SIZE)
? GTK_JUSTIFY_RIGHT : GTK_JUSTIFY_LEFT;
else
title = col_label[type];
break;
- /* CLAWS: dummies for mark and locked headers */
- case S_COL_MARK:
- case S_COL_LOCKED:
- title = "";
- break;
default:
title = gettext(col_label[type]);
}
gtk_widget_show(label);
gtk_clist_set_column_widget(clist, pos, label);
continue;
- } else if (single_char) {
+ } else if (type == S_COL_MARK) {
+ label = gtk_image_new_from_pixmap(markxpm, markxpmmask);
+ gtk_widget_show(label);
+ gtk_clist_set_column_widget(clist, pos, label);
+ continue;
+ } else if (type == S_COL_LOCKED) {
+ label = gtk_image_new_from_pixmap(lockedxpm, lockedxpmmask);
+ gtk_widget_show(label);
+ gtk_clist_set_column_widget(clist, pos, label);
+ continue;
+ } else if (type == S_COL_STATUS) {
gtk_clist_set_column_title(clist, pos, title);
continue;
}
- /* CLAWS: changed so that locked and mark headers
- * show a pixmap instead of single character */
hbox = gtk_hbox_new(FALSE, 4);
-
- if (type == S_COL_LOCKED)
- label = gtk_pixmap_new(lockedxpm, lockedxpmmask);
- else if (type == S_COL_MARK)
- label = gtk_pixmap_new(markxpm, markxpmmask);
- else
- label = gtk_label_new(title);
-
+ label = gtk_label_new(title);
+
if (justify == GTK_JUSTIFY_RIGHT)
gtk_box_pack_end(GTK_BOX(hbox), label,
FALSE, FALSE, 0);
void summary_reflect_prefs(void)
{
+ static gchar *last_font = NULL;
+ gboolean update_font = TRUE;
SummaryView *summaryview = NULL;
+
if (!mainwindow_get_mainwindow())
return;
summaryview = mainwindow_get_mainwindow()->summaryview;
- bold_style = bold_marked_style = bold_deleted_style =
- small_style = small_marked_style = small_deleted_style = NULL;
- summary_set_fonts(summaryview);
+
+ if (last_font && !strcmp(last_font, NORMAL_FONT))
+ update_font = FALSE;
+
+ if (last_font)
+ g_free(last_font);
+
+ last_font = g_strdup(NORMAL_FONT);
+
+ if (update_font) {
+ bold_style = bold_marked_style = bold_deleted_style =
+ small_style = small_marked_style = small_deleted_style = NULL;
+ summary_set_fonts(summaryview);
+ }
+
summary_set_column_titles(summaryview);
summary_show(summaryview, summaryview->folder_item);
}
summary_display_msg_full(summaryview, row, FALSE, FALSE);
}
+static gboolean defer_change(gpointer data);
+typedef struct _ChangeData {
+ MsgInfo *info;
+ gint op; /* 0, 1, 2 for unset, set, change */
+ MsgPermFlags set_flags;
+ MsgTmpFlags set_tmp_flags;
+ MsgPermFlags unset_flags;
+ MsgTmpFlags unset_tmp_flags;
+} ChangeData;
+
+static void summary_msginfo_unset_flags(MsgInfo *msginfo, MsgPermFlags flags, MsgTmpFlags tmp_flags)
+{
+ if (!msginfo->folder || !msginfo->folder->processing_pending) {
+ debug_print("flags: doing unset now\n");
+ procmsg_msginfo_unset_flags(msginfo, flags, tmp_flags);
+ } else {
+ ChangeData *unset_data = g_new0(ChangeData, 1);
+ unset_data->info = msginfo;
+ unset_data->op = 0;
+ unset_data->unset_flags = flags;
+ unset_data->unset_tmp_flags = tmp_flags;
+ debug_print("flags: deferring unset\n");
+ g_timeout_add(100, defer_change, unset_data);
+ }
+}
+
+static void summary_msginfo_set_flags(MsgInfo *msginfo, MsgPermFlags flags, MsgTmpFlags tmp_flags)
+{
+ if (!msginfo->folder || !msginfo->folder->processing_pending) {
+ debug_print("flags: doing set now\n");
+ procmsg_msginfo_set_flags(msginfo, flags, tmp_flags);
+ } else {
+ ChangeData *set_data = g_new0(ChangeData, 1);
+ set_data->info = msginfo;
+ set_data->op = 1;
+ set_data->set_flags = flags;
+ set_data->set_tmp_flags = tmp_flags;
+ debug_print("flags: deferring set\n");
+ g_timeout_add(100, defer_change, set_data);
+ }
+}
+
+static void summary_msginfo_change_flags(MsgInfo *msginfo,
+ MsgPermFlags add_flags, MsgTmpFlags add_tmp_flags,
+ MsgPermFlags rem_flags, MsgTmpFlags rem_tmp_flags)
+{
+ if (!msginfo->folder || !msginfo->folder->processing_pending) {
+ debug_print("flags: doing change now\n");
+ procmsg_msginfo_change_flags(msginfo, add_flags, add_tmp_flags,
+ rem_flags, rem_tmp_flags);
+ } else {
+ ChangeData *change_data = g_new0(ChangeData, 1);
+ change_data->info = msginfo;
+ change_data->op = 2;
+ change_data->set_flags = add_flags;
+ change_data->set_tmp_flags = add_tmp_flags;
+ change_data->unset_flags = rem_flags;
+ change_data->unset_tmp_flags = rem_tmp_flags;
+ debug_print("flags: deferring change\n");
+ g_timeout_add(100, defer_change, change_data);
+ }
+}
+
+gboolean defer_change(gpointer data)
+{
+ ChangeData *chg = (ChangeData *)data;
+ if (chg->info->folder && chg->info->folder->processing_pending) {
+ debug_print("flags: trying later\n");
+ return TRUE; /* try again */
+ } else {
+ debug_print("flags: finally doing it\n");
+ switch(chg->op) {
+ case 0:
+ procmsg_msginfo_unset_flags(chg->info, chg->unset_flags, chg->unset_tmp_flags);
+ break;
+ case 1:
+ procmsg_msginfo_set_flags(chg->info, chg->set_flags, chg->set_tmp_flags);
+ break;
+ case 2:
+ procmsg_msginfo_change_flags(chg->info, chg->set_flags, chg->set_tmp_flags,
+ chg->unset_flags, chg->unset_tmp_flags);
+ break;
+ default:
+ g_warning("shouldn't happen\n");
+ }
+ g_free(chg);
+ }
+ return FALSE;
+}
+
static void msginfo_mark_as_read (SummaryView *summaryview, MsgInfo *msginfo,
GtkCTreeNode *row)
{
g_return_if_fail(row != NULL);
if (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)) {
- procmsg_msginfo_unset_flags
+ summary_msginfo_unset_flags
(msginfo, MSG_NEW | MSG_UNREAD, 0);
summary_set_row_marks(summaryview, row);
gtk_clist_thaw(GTK_CLIST(summaryview->ctree));
summaryview->copied--;
procmsg_msginfo_set_to_folder(msginfo, NULL);
- procmsg_msginfo_change_flags(msginfo, MSG_MARKED, 0, MSG_DELETED, MSG_MOVE | MSG_COPY);
+ summary_msginfo_change_flags(msginfo, MSG_MARKED, 0, MSG_DELETED, MSG_MOVE | MSG_COPY);
summary_set_row_marks(summaryview, row);
debug_print("Message %s/%d is marked\n", msginfo->folder->path, msginfo->msgnum);
}
changed = TRUE;
}
procmsg_msginfo_set_to_folder(msginfo, NULL);
- procmsg_msginfo_change_flags(msginfo, MSG_LOCKED, 0, MSG_DELETED, MSG_MOVE | MSG_COPY);
+ summary_msginfo_change_flags(msginfo, MSG_LOCKED, 0, MSG_DELETED, MSG_MOVE | MSG_COPY);
summary_set_row_marks(summaryview, row);
debug_print("Message %d is locked\n", msginfo->msgnum);
if (!MSG_IS_LOCKED(msginfo->flags))
return;
procmsg_msginfo_set_to_folder(msginfo, NULL);
- procmsg_msginfo_unset_flags(msginfo, MSG_LOCKED, 0);
+ summary_msginfo_unset_flags(msginfo, MSG_LOCKED, 0);
summary_set_row_marks(summaryview, row);
debug_print("Message %d is unlocked\n", msginfo->msgnum);
}
if(!(MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)))
return;
- procmsg_msginfo_unset_flags(msginfo, MSG_NEW | MSG_UNREAD, 0);
+ summary_msginfo_unset_flags(msginfo, MSG_NEW | MSG_UNREAD, 0);
summary_set_row_marks(summaryview, row);
debug_print("Message %d is marked as read\n",
msginfo->msgnum);
msginfo = gtk_ctree_node_get_row_data(ctree, row);
if (MSG_IS_DELETED(msginfo->flags)) {
procmsg_msginfo_set_to_folder(msginfo, NULL);
- procmsg_msginfo_unset_flags(msginfo, MSG_DELETED, 0);
+ summary_msginfo_unset_flags(msginfo, MSG_DELETED, 0);
summaryview->deleted--;
}
- procmsg_msginfo_set_flags(msginfo, MSG_UNREAD, 0);
+ summary_msginfo_set_flags(msginfo, MSG_UNREAD, 0);
debug_print("Message %d is marked as unread\n",
msginfo->msgnum);
}
if (!found) {
- alertpanel_error(_("You're not the author of the article\n"));
+ alertpanel_error(_("You're not the author of the article.\n"));
}
return found;
msginfo = gtk_ctree_node_get_row_data(ctree, row);
- if (!check_permission(summaryview, msginfo))
- return;
-
if (MSG_IS_LOCKED(msginfo->flags)) return;
if (MSG_IS_DELETED(msginfo->flags)) return;
summaryview->copied--;
procmsg_msginfo_set_to_folder(msginfo, NULL);
- procmsg_msginfo_change_flags(msginfo, MSG_DELETED, 0, MSG_MARKED, MSG_MOVE | MSG_COPY);
+ summary_msginfo_change_flags(msginfo, MSG_DELETED, 0, MSG_MARKED, MSG_MOVE | MSG_COPY);
summaryview->deleted++;
if (!prefs_common.immediate_exec &&
if (summary_is_locked(summaryview)) return;
- if (!summaryview->folder_item ||
- FOLDER_TYPE(summaryview->folder_item->folder) == F_NEWS) return;
+ if (!summaryview->folder_item) return;
aval = alertpanel(_("Delete message(s)"),
_("Do you really want to delete selected message(s)?"),
summaryview->copied--;
procmsg_msginfo_set_to_folder(msginfo, NULL);
- procmsg_msginfo_unset_flags(msginfo, MSG_MARKED | MSG_DELETED, MSG_MOVE | MSG_COPY);
+ summary_msginfo_unset_flags(msginfo, MSG_MARKED | MSG_DELETED, MSG_MOVE | MSG_COPY);
summary_set_row_marks(summaryview, row);
debug_print("Message %s/%d is unmarked\n",
summaryview->copied--;
}
if (!MSG_IS_MOVE(msginfo->flags)) {
- procmsg_msginfo_change_flags(msginfo, 0, MSG_MOVE, MSG_DELETED, MSG_COPY);
+ summary_msginfo_change_flags(msginfo, 0, MSG_MOVE, MSG_DELETED, MSG_COPY);
summaryview->moved++;
} else {
- procmsg_msginfo_unset_flags(msginfo, MSG_DELETED, MSG_COPY);
+ summary_msginfo_unset_flags(msginfo, MSG_DELETED, MSG_COPY);
}
if (!prefs_common.immediate_exec) {
}
if (!MSG_IS_COPY(msginfo->flags)) {
- procmsg_msginfo_change_flags(msginfo, 0, MSG_COPY, MSG_DELETED, MSG_MOVE);
+ summary_msginfo_change_flags(msginfo, 0, MSG_COPY, MSG_DELETED, MSG_MOVE);
summaryview->copied++;
} else {
- procmsg_msginfo_unset_flags(msginfo, MSG_DELETED, MSG_MOVE);
+ summary_msginfo_unset_flags(msginfo, MSG_DELETED, MSG_MOVE);
}
if (!prefs_common.immediate_exec) {
summary_set_row_marks(summaryview, row);
summaryview->mlist =
g_slist_prepend(summaryview->mlist, msginfo);
- procmsg_msginfo_unset_flags(msginfo, 0, MSG_COPY);
+ summary_msginfo_unset_flags(msginfo, 0, MSG_COPY);
summary_set_row_marks(summaryview, node);
}
}
msginfo = gtk_ctree_node_get_row_data(ctree, row);
- procmsg_msginfo_change_flags(msginfo, MSG_COLORLABEL_TO_FLAGS(labelcolor), 0,
+ summary_msginfo_change_flags(msginfo, MSG_COLORLABEL_TO_FLAGS(labelcolor), 0,
MSG_CLABEL_FLAG_MASK, 0);
}
{
GtkWidget *ctree;
GtkWidget *scrolledwin = summaryview->scrolledwin;
- GtkWidget *pixmap;
FolderItem *item;
guint selected_msgnum = summary_get_msgnum(summaryview, summaryview->selected);
guint displayed_msgnum = summary_get_msgnum(summaryview, summaryview->displayed);
summaryview->ctree = ctree = summary_ctree_create(summaryview);
summary_set_fonts(summaryview);
- pixmap = gtk_image_new_from_pixmap(clipxpm, clipxpmmask);
- gtk_clist_set_column_widget(GTK_CLIST(ctree),
- summaryview->col_pos[S_COL_MIME], pixmap);
- gtk_widget_show(pixmap);
+ summary_set_column_titles(summaryview);
gtk_scrolled_window_set_hadjustment(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_CLIST(ctree)->hadjustment);
gtk_scrolled_window_set_vadjustment(GTK_SCROLLED_WINDOW(scrolledwin),
BREAK_ON_MODIFIER_KEY();
summary_delete_trash(summaryview);
break;
+ case GDK_y:
+ case GDK_t:
+ case GDK_l:
+ case GDK_c:
+ if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) == 0) {
+ mimeview_pass_key_press_event(messageview->mimeview,
+ event);
+ break;
+ }
default:
break;
}
break;
case S_COL_LOCKED:
if (MSG_IS_LOCKED(msginfo->flags)) {
- procmsg_msginfo_unset_flags(msginfo, MSG_LOCKED, 0);
+ summary_msginfo_unset_flags(msginfo, MSG_LOCKED, 0);
summary_set_row_marks(summaryview, row);
}
else
g_hash_table_lookup_extended(mff->newsart, line->str, &key, &value)) {
debug_print(" <%s>", (gchar *)value);
if (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)) {
- procmsg_msginfo_change_flags(msginfo,
+ summary_msginfo_change_flags(msginfo,
mff->account->crosspost_col, 0, MSG_NEW | MSG_UNREAD, 0);
}
g_hash_table_remove(mff->newsart, key);
msginfo = gtk_ctree_node_get_row_data(ctree, row);
- procmsg_msginfo_change_flags(msginfo, MSG_IGNORE_THREAD, 0, MSG_NEW | MSG_UNREAD, 0);
+ summary_msginfo_change_flags(msginfo, MSG_IGNORE_THREAD, 0, MSG_NEW | MSG_UNREAD, 0);
summary_set_row_marks(summaryview, row);
debug_print("Message %d is marked as ignore thread\n",
msginfo = gtk_ctree_node_get_row_data(ctree, row);
- procmsg_msginfo_unset_flags(msginfo, MSG_IGNORE_THREAD, 0);
+ summary_msginfo_unset_flags(msginfo, MSG_IGNORE_THREAD, 0);
summary_set_row_marks(summaryview, row);
debug_print("Message %d is marked as unignore thread\n",