aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-03-01 08:58:16 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-03-01 08:58:16 +0800
commitf01589262ca132b980bb067e5aa6fbaee8fd3579 (patch)
treeb0cfe93753569c33cad150331342025fd98bcd76 /mail/mail-mt.c
parentefa31cf176b236410e88a11b33bbfec5160e2c81 (diff)
downloadgsoc2013-evolution-f01589262ca132b980bb067e5aa6fbaee8fd3579.tar
gsoc2013-evolution-f01589262ca132b980bb067e5aa6fbaee8fd3579.tar.gz
gsoc2013-evolution-f01589262ca132b980bb067e5aa6fbaee8fd3579.tar.bz2
gsoc2013-evolution-f01589262ca132b980bb067e5aa6fbaee8fd3579.tar.lz
gsoc2013-evolution-f01589262ca132b980bb067e5aa6fbaee8fd3579.tar.xz
gsoc2013-evolution-f01589262ca132b980bb067e5aa6fbaee8fd3579.tar.zst
gsoc2013-evolution-f01589262ca132b980bb067e5aa6fbaee8fd3579.zip
Fixes for changes to search bar. (search_save): Removed. (search_full):
2001-03-01 Not Zed <NotZed@Ximian.com> * folder-browser.c (folder_browser_search_menu_activated): Fixes for changes to search bar. (search_save): Removed. (search_full): Removed. (search_full_clicked): Removed. (folder_browser_search_option_items[]): Removed. (folder_browser_search_query_changed): Changed for search bar changes. (folder_browser_clear_search): Removed. * mail-vfolder.c (vfolder_clone_rule): New function to clone a filter/search rule into a matching vfolder rule. * mail-send-recv.c (mail_receive_uri): Setup a timeout for status updates. (build_dialogue): Setup timeout id for status updates. (operation_status_timeout): New function to set the status via a timeout. (receive_done): Remove the timeout handler if we need to. (operation_status): (receive_status): Just update the info, and let the timeout handler update the gui. (do_free_status): (do_show_status): Removed gui thread status message processing. 2001-02-28 Not Zed <NotZed@Ximian.com> * folder-browser.c (folder_browser_config_search): New function to configure the FilterRule for the search mechanism. 2001-02-27 Not Zed <NotZed@Ximian.com> * folder-browser.c (folder_browser_gui_init): Setup the search bar as a filterbar. (got_folder): Set the whole search bar sensitive or not based on the search capability of the folder. * folder-browser.h: Changed to use efilterbar instead of esearchbar. svn path=/trunk/; revision=8438
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r--mail/mail-mt.c70
1 files changed, 67 insertions, 3 deletions
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 991d1cf33e..ee84b6649d 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -20,6 +20,7 @@
#include <libgnomeui/gnome-dialog.h>
#include <gtk/gtkprogress.h>
+/*#define MALLOC_CHECK*/
#define d(x)
static void set_view_data(const char *current_message, int busy);
@@ -69,6 +70,8 @@ void *mail_msg_new(mail_msg_op_t *ops, EMsgPort *reply_port, size_t size)
g_hash_table_insert(mail_msg_active, (void *)msg->seq, msg);
+ d(printf("New message %p\n", msg));
+
MAIL_MT_UNLOCK(mail_msg_lock);
return msg;
@@ -83,10 +86,41 @@ static void destroy_widgets(CamelObject *o, void *event_data, void *data)
gtk_widget_destroy((GtkWidget *)event_data);
}
+#ifdef MALLOC_CHECK
+#include <mcheck.h>
+
+static void
+checkmem(void *p)
+{
+ if (p) {
+ int status = mprobe(p);
+
+ switch (status) {
+ case MCHECK_HEAD:
+ printf("Memory underrun at %p\n", p);
+ abort();
+ case MCHECK_TAIL:
+ printf("Memory overrun at %p\n", p);
+ abort();
+ case MCHECK_FREE:
+ printf("Double free %p\n", p);
+ abort();
+ }
+ }
+}
+#endif
+
void mail_msg_free(void *msg)
{
struct _mail_msg *m = msg;
+#ifdef MALLOC_CHECK
+ checkmem(m);
+ checkmem(m->cancel);
+ checkmem(m->priv);
+#endif
+ d(printf("Free message %p\n", msg));
+
if (m->ops->destroy_msg)
m->ops->destroy_msg(m);
@@ -126,6 +160,12 @@ void mail_msg_check_error(void *msg)
char *text;
GnomeDialog *gd;
+#ifdef MALLOC_CHECK
+ checkmem(m);
+ checkmem(m->cancel);
+ checkmem(m->priv);
+#endif
+
if (!camel_exception_is_set(&m->ex)
|| m->ex.id == CAMEL_EXCEPTION_USER_CANCEL)
return;
@@ -201,6 +241,13 @@ mail_msgport_replied(GIOChannel *source, GIOCondition cond, void *d)
mail_msg_t *m;
while (( m = (mail_msg_t *)e_msgport_get(port))) {
+
+#ifdef MALLOC_CHECK
+ checkmem(m);
+ checkmem(m->cancel);
+ checkmem(m->priv);
+#endif
+
if (m->ops->reply_msg)
m->ops->reply_msg(m);
mail_msg_check_error(m);
@@ -219,6 +266,11 @@ mail_msgport_received(GIOChannel *source, GIOCondition cond, void *d)
mail_msg_t *m;
while (( m = (mail_msg_t *)e_msgport_get(port))) {
+#ifdef MALLOC_CHECK
+ checkmem(m);
+ checkmem(m->cancel);
+ checkmem(m->priv);
+#endif
if (m->ops->describe_msg) {
char *text = m->ops->describe_msg(m, FALSE);
mail_status_start(text);
@@ -245,6 +297,12 @@ mail_msg_destroy(EThread *e, EMsg *msg, void *data)
{
mail_msg_t *m = (mail_msg_t *)msg;
+#ifdef MALLOC_CHECK
+ checkmem(m);
+ checkmem(m->cancel);
+ checkmem(m->priv);
+#endif
+
if (m->ops->describe_msg)
mail_status_end();
mail_msg_free(m);
@@ -255,6 +313,12 @@ mail_msg_received(EThread *e, EMsg *msg, void *data)
{
mail_msg_t *m = (mail_msg_t *)msg;
+#ifdef MALLOC_CHECK
+ checkmem(m);
+ checkmem(m->cancel);
+ checkmem(m->priv);
+#endif
+
if (m->ops->describe_msg) {
char *text = m->ops->describe_msg(m, FALSE);
d(printf("message received at thread\n"));
@@ -809,7 +873,7 @@ mail_operation_status(struct _CamelOperation *op, const char *what, int pc, void
{
struct _op_status_msg *m;
- printf("got operation statys: %s %d%%\n", what, pc);
+ d(printf("got operation statys: %s %d%%\n", what, pc));
m = mail_msg_new(&op_status_op, NULL, sizeof(*m));
m->op = op;
@@ -882,10 +946,10 @@ set_view_data(const char *current_message, int busy)
if (shell_view_interface != CORBA_OBJECT_NIL) {
if ((current_message == NULL || current_message[0] == 0) && ! busy) {
- printf("clearing msg\n");
+ d(printf("clearing msg\n"));
GNOME_Evolution_ShellView_unsetMessage (shell_view_interface, &ev);
} else {
- printf("setting msg %s\n", current_message ? current_message : "(null)");
+ d(printf("setting msg %s\n", current_message ? current_message : "(null)"));
GNOME_Evolution_ShellView_setMessage (shell_view_interface,
current_message?current_message:"",
busy,