+2007-08-02 [paul] 2.10.0cvs84
+
+ * src/folderview.c
+ * src/mainwindow.c
+ * src/mainwindow.h
+ enable running folder Processing
+ rules on demand
+
2007-08-02 [paul] 2.10.0cvs83
* src/textview.c
( cvs diff -u -r 1.5.2.13 -r 1.5.2.14 src/setup.c; cvs diff -u -r 1.5.2.62 -r 1.5.2.63 src/gtk/gtkutils.c; ) > 2.10.0cvs81.patchset
( cvs diff -u -r 1.39.2.39 -r 1.39.2.40 src/mainwindow.h; cvs diff -u -r 1.43.2.80 -r 1.43.2.81 src/toolbar.c; cvs diff -u -r 1.1.14.1 -r 1.1.14.2 src/pixmaps/close.xpm; cvs diff -u -r 1.1.16.1 -r 1.1.16.2 src/pixmaps/jpilot.xpm; ) > 2.10.0cvs82.patchset
( cvs diff -u -r 1.96.2.179 -r 1.96.2.180 src/textview.c; ) > 2.10.0cvs83.patchset
+( cvs diff -u -r 1.207.2.170 -r 1.207.2.171 src/folderview.c; cvs diff -u -r 1.274.2.204 -r 1.274.2.205 src/mainwindow.c; cvs diff -u -r 1.39.2.40 -r 1.39.2.41 src/mainwindow.h; ) > 2.10.0cvs84.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=83
+EXTRA_VERSION=84
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
static void folderview_search_cb (FolderView *folderview,
guint action,
GtkWidget *widget);
+static void folderview_run_processing_cb(FolderView *folderview,
+ guint action,
+ GtkWidget *widget);
static void folderview_property_cb (FolderView *folderview,
guint action,
{
{N_("/Mark all re_ad"), NULL, mark_all_read_cb, 0, NULL},
{"/---", NULL, NULL, 0, "<Separator>"},
+ {N_("/Run processing rules"), NULL, folderview_run_processing_cb, 0, NULL},
{N_("/_Search folder..."), NULL, folderview_search_cb, 0, NULL},
{N_("/_Properties..."), NULL, folderview_property_cb, 0, NULL},
{N_("/Process_ing..."), NULL, folderview_processing_cb, 0, NULL},
SET_SENS("/Mark all read", item->unread_msgs >= 1);
SET_SENS("/Search folder...", item->total_msgs >= 1 &&
folderview->selected == folderview->opened);
+ SET_SENS("/Run processing rules", item->prefs->processing &&
+ item->total_msgs >= 1);
SET_SENS("/Properties...", TRUE);
SET_SENS("/Processing...", item->node->parent != NULL);
if (item == folder->trash || item == special_trash
summary_search(folderview->summaryview);
}
+static void folderview_run_processing_cb(FolderView *folderview, guint action,
+ GtkWidget *widget)
+{
+ GtkCTree *ctree = GTK_CTREE(folderview->ctree);
+ FolderItem *item;
+
+ if (!folderview->selected) return;
+
+ item = gtk_ctree_node_get_row_data(ctree, folderview->selected);
+ g_return_if_fail(item != NULL);
+ g_return_if_fail(item->folder != NULL);
+
+ folder_item_apply_processing(item);
+}
+
static void folderview_property_cb(FolderView *folderview, guint action,
GtkWidget *widget)
{
static void filter_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
+static void process_cb (MainWindow *mainwin,
+ guint action,
+ GtkWidget *widget);
static void execute_summary_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
NULL, filter_cb, 0, NULL},
{N_("/_Tools/Filter _selected messages"),
NULL, filter_cb, 1, NULL},
+ {N_("/_Tools/Run folder processing rules"),
+ NULL, process_cb, 0, NULL},
{N_("/_Tools/_Create filter rule"), NULL, NULL, 0, "<Branch>"},
{N_("/_Tools/_Create filter rule/_Automatically"),
NULL, create_filter_cb, FILTER_BY_AUTO, NULL},
if (any_folder_want_synchronise())
state |= M_WANT_SYNC;
+ if (item && item->prefs->processing && selection != SUMMARY_NONE)
+ state |= M_HAVE_PROCESSING;
+
for ( ; account_list != NULL; account_list = account_list->next) {
if (((PrefsAccount*)account_list->data)->protocol == A_NNTP) {
state |= M_HAVE_NEWS_ACCOUNT;
, M_TARGET_EXIST},
{"/Tools/Filter all messages in folder", M_MSG_EXIST|M_EXEC},
{"/Tools/Filter selected messages" , M_TARGET_EXIST|M_EXEC},
+ {"/Tools/Run folder processing rules" , M_HAVE_PROCESSING},
{"/Tools/Create filter rule" , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
{"/Tools/Create processing rule" , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
{"/Tools/List URLs..." , M_TARGET_EXIST},
summary_filter(mainwin->summaryview, (gboolean)action);
}
+static void process_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
+{
+ FolderItem *item = mainwin->summaryview->folder_item;
+ g_return_if_fail(item != NULL);
+
+ folder_item_apply_processing(item);
+}
+
static void execute_summary_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{
M_ACTIONS_EXIST = 1 << 17,
M_HAVE_QUEUED_MAILS = 1 << 18,
M_WANT_SYNC = 1 << 19,
- M_TAGS_EXIST = 1 << 20
+ M_TAGS_EXIST = 1 << 20,
+ M_HAVE_PROCESSING = 1 << 21
} SensitiveCond;
typedef enum