+2006-06-05 [colin] 2.2.1cvs2
+
+ * src/prefs_folder_item.c
+ * src/folderview.c
+ Allow recursive setting of properties
+ for whole mailboxes
+ * src/matcher.c
+ Don't freeze on 'test' filtering rule
+
2006-06-05 [colin] 2.2.1cvs1
* configure.ac
( cvs diff -u -r 1.395.2.215 -r 1.395.2.216 src/summaryview.c; ) > 2.2.0cvs81.patchset
( cvs diff -u -r 1.1.2.9 -r 1.1.2.10 manual/glossary.xml; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 manual/account.xml; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 manual/fr/glossary.xml; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 manual/fr/account.xml; ) > 2.2.0cvs82.patchset
( cvs diff -u -r 1.654.2.1597 -r 1.654.2.1598 configure.ac; ) > 2.2.1cvs1.patchset
+( cvs diff -u -r 1.52.2.19 -r 1.52.2.20 src/prefs_folder_item.c; cvs diff -u -r 1.207.2.100 -r 1.207.2.101 src/folderview.c; cvs diff -u -r 1.75.2.23 -r 1.75.2.24 src/matcher.c; ) > 2.2.1cvs2.patchset
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=1
+EXTRA_VERSION=2
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
SET_SENS("/Mark all read", item->unread_msgs >= 1);
SET_SENS("/Search folder...", item->total_msgs >= 1 &&
folderview->selected == folderview->opened);
- SET_SENS("/Properties...", item->node->parent != NULL);
+ SET_SENS("/Properties...", TRUE);
SET_SENS("/Processing...", item->node->parent != NULL);
if (item == folder->trash || item == special_trash
|| folder_has_parent_of_type(item, F_TRASH)) {
g_return_if_fail(item != NULL);
g_return_if_fail(item->folder != NULL);
- if (folder_item_parent(item) == NULL)
- return;
-
prefs_folder_item_open(item);
}
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <glib.h>
#include <glib/gi18n.h>
#include <ctype.h>
#include <stdlib.h>
#include <errno.h>
+#ifdef USE_PTHREAD
+#include <pthread.h>
+#endif
+
#include "defs.h"
#include "utils.h"
#include "procheader.h"
return res;
}
+#ifdef USE_PTHREAD
+typedef struct _thread_data {
+ const gchar *cmd;
+ gboolean done;
+} thread_data;
+#endif
+
+#ifdef USE_PTHREAD
+void *matcher_test_thread(void *data)
+{
+ thread_data *td = (thread_data *)data;
+ int result = -1;
+
+ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
+ pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
+
+ result = system(td->cmd);
+ if (result) perror("system");
+ td->done = TRUE; /* let the caller thread join() */
+ return GINT_TO_POINTER(result);
+}
+#endif
+
/*!
*\brief Execute a command defined in the matcher structure
*
gchar *file;
gchar *cmd;
gint retval;
+#ifdef USE_PTHREAD
+ pthread_t pt;
+ thread_data *td = g_new0(thread_data, 1);
+ void *res = NULL;
+ time_t start_time = time(NULL);
+#endif
file = procmsg_get_message_file(info);
if (file == NULL)
if (cmd == NULL)
return FALSE;
+#if (defined USE_PTHREAD && defined __GLIBC__ && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)))
+ td->cmd = cmd;
+ td->done = FALSE;
+ if (pthread_create(&pt, PTHREAD_CREATE_JOINABLE,
+ matcher_test_thread, td) != 0)
+ retval = system(cmd);
+ else {
+ printf("waiting for test thread\n");
+ while(!td->done) {
+ /* don't let the interface freeze while waiting */
+ sylpheed_do_idle();
+ if (time(NULL) - start_time > 30) {
+ pthread_cancel(pt);
+ td->done = TRUE;
+ retval = -1;
+ }
+ }
+ pthread_join(pt, &res);
+ retval = GPOINTER_TO_INT(res);
+ printf(" test thread returned %d\n", retval);
+ }
+ g_free(td);
+#else
retval = system(cmd);
+#endif
debug_print("Command exit code: %d\n", retval);
g_free(cmd);
gchar *buf;
gboolean all = FALSE;
+ if (folder->path == NULL)
+ return;
+
g_return_if_fail(prefs != NULL);
if (page->item == folder)
GtkWidget *menuitem;
gboolean all = FALSE;
+ if (folder->path == NULL)
+ return;
+
if (page->item == folder)
all = TRUE;
register_compose_page();
}
- id = folder_item_get_identifier (item);
+ if (item->path)
+ id = folder_item_get_identifier (item);
+ else
+ id = g_strdup(item->name);
title = g_strdup_printf (_("Properties for folder %s"), id);
g_free (id);
prefswindow_open(title, prefs_pages, item,