static GdkBitmap *forwardedxpmmask;
static GdkPixmap *ignorethreadxpm;
static GdkBitmap *ignorethreadxpmmask;
+static GdkPixmap *watchthreadxpm;
+static GdkBitmap *watchthreadxpmmask;
static GdkPixmap *lockedxpm;
static GdkBitmap *lockedxpmmask;
static GdkPixmap *spamxpm;
static GtkItemFactoryEntry summary_popup_entries[] =
{
{N_("/_Reply"), "<control>R", summary_reply_cb, COMPOSE_REPLY, NULL},
+#ifndef MAEMO
{N_("/Repl_y to"), NULL, NULL, 0, "<Branch>"},
{N_("/Repl_y to/_all"), "<shift><control>R", summary_reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
{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},
{"/---", NULL, NULL, 0, "<Separator>"},
+#endif
{N_("/_Forward"), "<control><alt>F", summary_reply_cb, COMPOSE_FORWARD_INLINE, NULL},
+#ifndef MAEMO
{N_("/For_ward as attachment"), NULL, summary_reply_cb, COMPOSE_FORWARD_AS_ATTACH, NULL},
{N_("/Redirect"), NULL, summary_reply_cb, COMPOSE_REDIRECT, NULL},
+#endif
{"/---", 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},
+#ifndef MAEMO
{N_("/_Delete..."), NULL, summary_delete, 0, NULL},
+#endif
{"/---", NULL, NULL, 0, "<Separator>"},
{N_("/_Mark"), NULL, NULL, 0, "<Branch>"},
{N_("/_Mark/_Mark"), NULL, summary_mark, 0, NULL},
{N_("/_Mark/Mark all read"), NULL, summary_mark_all_read, 0, NULL},
{N_("/_Mark/Ignore thread"), NULL, summary_ignore_thread, 0, NULL},
{N_("/_Mark/Unignore thread"), NULL, summary_unignore_thread, 0, NULL},
+ {N_("/_Mark/Watch thread"), NULL, summary_watch_thread, 0, NULL},
+ {N_("/_Mark/Unwatch thread"), NULL, summary_unwatch_thread, 0, NULL},
{N_("/_Mark/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Mark/Mark as _spam"), NULL, summary_mark_as_spam, 1, NULL},
{N_("/_Mark/Mark as _ham"), NULL, summary_mark_as_spam, 0, NULL},
{N_("/Ta_gs"), NULL, NULL, 0, NULL},
{"/---", NULL, NULL, 0, "<Separator>"},
+#ifndef MAEMO
{N_("/Add sender to address boo_k"),
NULL, summary_add_address_cb, 0, NULL},
+#endif
{N_("/Create f_ilter rule"), NULL, NULL, 0, "<Branch>"},
{N_("/Create f_ilter rule/_Automatically"),
NULL, summary_create_filter_cb, FILTER_BY_AUTO, NULL},
NULL, summary_create_filter_cb, FILTER_BY_TO, NULL},
{N_("/Create f_ilter rule/by _Subject"),
NULL, summary_create_filter_cb, FILTER_BY_SUBJECT, NULL},
+#ifndef MAEMO
{N_("/Create processing rule"), NULL, NULL, 0, "<Branch>"},
{N_("/Create processing rule/_Automatically"),
NULL, summary_create_processing_cb, FILTER_BY_AUTO, NULL},
NULL, summary_create_processing_cb, FILTER_BY_TO, NULL},
{N_("/Create processing rule/by _Subject"),
NULL, summary_create_processing_cb, FILTER_BY_SUBJECT, NULL},
+#endif
{"/---", NULL, NULL, 0, "<Separator>"},
{N_("/_View"), NULL, NULL, 0, "<Branch>"},
{N_("/_View/Open in new _window"),
"<control><alt>N", summary_open_msg, 0, NULL},
{N_("/_View/Message _source"), "<control>U", summary_view_source, 0, NULL},
+#ifndef MAEMO
{N_("/_View/All _headers"), "<control>H", summary_show_all_header_cb, 0, "<ToggleItem>"},
+#endif
{"/---", NULL, NULL, 0, "<Separator>"},
{N_("/_Save as..."), "<control>S", summary_save_as, 0, NULL},
+#ifndef MAEMO
{N_("/_Print..."), "<control>P", summary_print, 0, NULL},
+#endif
}; /* see also list in menu_connect_identical_items() in menu.c if this changes */
static const gchar *const col_label[N_SUMMARY_COLS] = {
gtk_widget_unref(summaryview->hbox_l);
gtk_widget_unref(summaryview->statlabel_msgs);
quicksearch_relayout(summaryview->quicksearch);
+ if (prefs_common.show_searchbar)
+ quicksearch_show(summaryview->quicksearch);
+ else
+ quicksearch_hide(summaryview->quicksearch);
}
static void summary_set_fonts(SummaryView *summaryview)
&lockedxpm, &lockedxpmmask);
stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_IGNORETHREAD,
&ignorethreadxpm, &ignorethreadxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_WATCHTHREAD,
+ &watchthreadxpm, &watchthreadxpmmask);
stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP_KEY,
&clipkeyxpm, &clipkeyxpmmask);
stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_KEY,
g_free(buf);
debug_print("empty folder (%p %s %p %d)\n\n",
item,
- item?item->path:"NULL",
+ (item && item->path)?item->path:"(null)",
item?folder_item_parent(item):0x0,
item?item->no_select:FALSE);
summary_set_hide_read_msgs_menu(summaryview, FALSE);
SensitiveCond cond;
} entry[] = {
{"/Reply" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+#ifndef MAEMO
{"/Reply to" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Reply to/all" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Reply to/sender" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Reply to/mailing list" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+#endif
{"/Forward" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+#ifndef MAEMO
{"/Forward as attachment" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Redirect" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+#endif
{"/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},
+#ifndef MAEMO
{"/Delete..." , M_TARGET_EXIST|M_ALLOW_DELETE},
+#endif
{"/Mark" , M_TARGET_EXIST},
{"/Mark/Mark" , M_TARGET_EXIST},
{"/Color label" , M_TARGET_EXIST},
{"/Tags" , M_TARGET_EXIST},
+#ifndef MAEMO
{"/Add sender to address book" , M_SINGLE_TARGET_EXIST},
+#endif
{"/Create filter rule" , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
+#ifndef MAEMO
{"/Create processing rule" , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
+#endif
{"/View" , M_SINGLE_TARGET_EXIST},
{"/View/Open in new window" , M_SINGLE_TARGET_EXIST},
{"/View/Message source" , M_SINGLE_TARGET_EXIST},
+#ifndef MAEMO
{"/View/All headers" , M_SINGLE_TARGET_EXIST},
+#endif
{"/Save as..." , M_TARGET_EXIST},
+#ifndef MAEMO
{"/Print..." , M_TARGET_EXIST},
+#endif
{NULL, 0}
};
summary_lock(summaryview);
+#ifndef MAEMO
menuitem = gtk_item_factory_get_widget(ifactory, "/View/All headers");
if (summaryview->messageview
&& summaryview->messageview->mimeview
gtk_check_menu_item_set_active
(GTK_CHECK_MENU_ITEM(menuitem),
summaryview->messageview->mimeview->textview->show_all_headers);
+#endif
summary_unlock(summaryview);
}
g_free(str);
}
+ summary_set_menu_sensitive(summaryview);
toolbar_main_set_sensitive(summaryview->mainwin);
}
hbox = gtk_hbox_new(FALSE, 4);
label = gtk_label_new(title);
+#ifdef MAEMO
+ gtk_widget_set_size_request(hbox, -1, 20);
+#endif
if (justify == GTK_JUSTIFY_RIGHT)
gtk_box_pack_end(GTK_BOX(hbox), label,
}
summary_set_column_titles(summaryview);
- summary_show(summaryview, summaryview->folder_item);
+ summary_relayout(summaryview);
+
+ if (summaryview->folder_item)
+ summary_show(summaryview, summaryview->folder_item);
}
void summary_sort(SummaryView *summaryview,
if (MSG_IS_IGNORE_THREAD(flags)) {
gtk_ctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
ignorethreadxpm, ignorethreadxpmmask);
+ } else if (MSG_IS_WATCH_THREAD(flags)) {
+ gtk_ctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
+ watchthreadxpm, watchthreadxpmmask);
} else if (MSG_IS_SPAM(flags)) {
gtk_ctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
spamxpm, spamxpmmask);
return;
}
+ if (to_folder->no_select) {
+ alertpanel_error(_("The destination folder can only be used to "
+ "store subfolders."));
+ return;
+ }
+
START_LONG_OPERATION(summaryview, FALSE);
for (cur = GTK_CLIST(summaryview->ctree)->selection;
return;
}
+ if (to_folder->no_select) {
+ alertpanel_error(_("The destination folder can only be used to "
+ "store subfolders."));
+ return;
+ }
+
START_LONG_OPERATION(summaryview, FALSE);
for (cur = GTK_CLIST(summaryview->ctree)->selection;
ctree = gtk_sctree_new_with_titles
(N_SUMMARY_COLS, col_pos[S_COL_SUBJECT], titles);
-#ifdef MAEMO
- gtk_clist_column_titles_hide(GTK_CLIST(ctree));
-#endif
+ if (prefs_common.show_col_headers == FALSE)
+ gtk_clist_column_titles_hide(GTK_CLIST(ctree));
gtk_clist_set_selection_mode(GTK_CLIST(ctree), GTK_SELECTION_EXTENDED);
gtk_clist_set_column_justification(GTK_CLIST(ctree), col_pos[S_COL_MARK],
case GDK_y:
case GDK_t:
case GDK_l:
+ case GDK_o:
case GDK_c:
case GDK_a:
if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) == 0) {
msginfo = gtk_ctree_node_get_row_data(ctree, row);
g_return_if_fail(msginfo);
+ summary_msginfo_unset_flags(msginfo, MSG_WATCH_THREAD, 0);
summary_msginfo_change_flags(msginfo, MSG_IGNORE_THREAD, 0, MSG_NEW | MSG_UNREAD, 0);
summary_set_row_marks(summaryview, row);
summary_ignore_thread(summaryview);
}
+static void summary_watch_thread_func(GtkCTree *ctree, GtkCTreeNode *row, gpointer data)
+{
+ SummaryView *summaryview = (SummaryView *) data;
+ MsgInfo *msginfo;
+
+ msginfo = gtk_ctree_node_get_row_data(ctree, row);
+ g_return_if_fail(msginfo);
+
+ summary_msginfo_change_flags(msginfo, MSG_WATCH_THREAD, 0, MSG_IGNORE_THREAD, 0);
+
+ summary_set_row_marks(summaryview, row);
+ debug_print("Message %d is marked as watch thread\n",
+ msginfo->msgnum);
+}
+
+void summary_watch_thread(SummaryView *summaryview)
+{
+ GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
+ GList *cur;
+ gboolean froze = FALSE;
+
+ START_LONG_OPERATION(summaryview, FALSE);
+ for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
+ gtk_ctree_pre_recursive(ctree, GTK_CTREE_NODE(cur->data),
+ GTK_CTREE_FUNC(summary_watch_thread_func),
+ summaryview);
+
+ END_LONG_OPERATION(summaryview);
+
+ summary_status_show(summaryview);
+}
+
+static void summary_unwatch_thread_func(GtkCTree *ctree, GtkCTreeNode *row, gpointer data)
+{
+ SummaryView *summaryview = (SummaryView *) data;
+ MsgInfo *msginfo;
+
+ msginfo = gtk_ctree_node_get_row_data(ctree, row);
+ g_return_if_fail(msginfo);
+
+ summary_msginfo_unset_flags(msginfo, MSG_WATCH_THREAD, 0);
+
+ summary_set_row_marks(summaryview, row);
+ debug_print("Message %d is marked as unwatch thread\n",
+ msginfo->msgnum);
+}
+
+void summary_unwatch_thread(SummaryView *summaryview)
+{
+ GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
+ GList *cur;
+ gboolean froze = FALSE;
+
+ START_LONG_OPERATION(summaryview, FALSE);
+ for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
+ gtk_ctree_pre_recursive(ctree, GTK_CTREE_NODE(cur->data),
+ GTK_CTREE_FUNC(summary_unwatch_thread_func),
+ summaryview);
+
+ END_LONG_OPERATION(summaryview);
+
+ summary_status_show(summaryview);
+}
+
+static void summary_check_watch_thread_func
+ (GtkCTree *ctree, GtkCTreeNode *row, gpointer data)
+{
+ MsgInfo *msginfo;
+ gint *found_watch = (gint *) data;
+
+ if (*found_watch) return;
+ else {
+ msginfo = gtk_ctree_node_get_row_data(ctree, row);
+ *found_watch = msginfo && MSG_IS_WATCH_THREAD(msginfo->flags);
+ }
+}
+
+void summary_toggle_watch_thread(SummaryView *summaryview)
+{
+ GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
+ GList *cur;
+ gint found_watch = 0;
+
+ for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
+ gtk_ctree_pre_recursive(ctree, GTK_CTREE_NODE(cur->data),
+ GTK_CTREE_FUNC(summary_check_watch_thread_func),
+ &found_watch);
+
+ if (found_watch)
+ summary_unwatch_thread(summaryview);
+ else
+ summary_watch_thread(summaryview);
+}
+
void summary_toggle_show_read_messages(SummaryView *summaryview)
{
FolderItemUpdateData source;
stock_pixmap_gdk(ctree, STOCK_PIXMAP_CLIP, &clipxpm, &clipxpmmask);
stock_pixmap_gdk(ctree, STOCK_PIXMAP_LOCKED, &lockedxpm, &lockedxpmmask);
stock_pixmap_gdk(ctree, STOCK_PIXMAP_IGNORETHREAD, &ignorethreadxpm, &ignorethreadxpmmask);
+ stock_pixmap_gdk(ctree, STOCK_PIXMAP_WATCHTHREAD, &watchthreadxpm, &watchthreadxpmmask);
stock_pixmap_gdk(ctree, STOCK_PIXMAP_CLIP_KEY, &clipkeyxpm, &clipkeyxpmmask);
stock_pixmap_gdk(ctree, STOCK_PIXMAP_KEY, &keyxpm, &keyxpmmask);
stock_pixmap_gdk(ctree, STOCK_PIXMAP_GPG_SIGNED, &gpgsignedxpm, &gpgsignedxpmmask);