From c0a255eb90769638d57ae4122932f75c46e4e531 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 11 Sep 2008 15:34:29 +0000 Subject: Merge revisions 36016:36303 from trunk. svn path=/branches/kill-bonobo/; revision=36307 --- mail/message-list.h | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index fe9f42f19f..b144708208 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -1,26 +1,25 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Authors: Jeffrey Stedfast + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * Authors: + * Jeffrey Stedfast + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ - #ifndef _MESSAGE_LIST_H_ #define _MESSAGE_LIST_H_ -- cgit v1.2.3 From b2cda1d0c6d44f53f71bad9e256f41188677dfba Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 1 Oct 2008 20:56:04 +0000 Subject: Merge revisions 36016:36533 from trunk. svn path=/branches/kill-bonobo/; revision=36534 --- mail/message-list.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index b144708208..cc58e1e798 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -60,6 +60,9 @@ enum { COL_MIXED_RECIPIENTS, COL_LABELS, + /* subject with junk removed */ + COL_SUBJECT_TRIMMED, + /* normalised strings */ COL_FROM_NORM, COL_SUBJECT_NORM, -- cgit v1.2.3 From 85b2913a380c69f14ae0254ad23b10fabfb33667 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 24 Oct 2008 23:52:05 +0000 Subject: Merge revisions 36534:36684 from trunk. svn path=/branches/kill-bonobo/; revision=36685 --- mail/message-list.h | 1 + 1 file changed, 1 insertion(+) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index cc58e1e798..47be897fd2 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -151,6 +151,7 @@ struct _MessageList { /* list of outstanding regeneration requests */ GList *regen; + GMutex *regen_lock; /* when writing to the regen, guard with this lock too */ char *pending_select_uid; /* set if we were busy regnerating while we had a select come in */ guint regen_timeout_id; void *regen_timeout_msg; -- cgit v1.2.3 From b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 19 Nov 2008 01:39:19 +0000 Subject: Progress update: - Tighter integration of GalViewInstance and EShellView. - EBinding. Stolen from ExoBinding. Lets you bind GObject properties together to automatically keep their values in sync. This is a godsend. Added to e-util, but might even deserve a place in libedataserver. - EShellSettings. This is the concept I blogged about. Already started ripping apart em-mailer-prefs.c. Others to follow. Any place where we're monitoring GConf keys is a target. - Incremental progress on the calender and mailer. Got EMFolderView somewhat working, but I think I'll be killing off EMFolderBrowser. svn path=/branches/kill-bonobo/; revision=36795 --- mail/message-list.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 47be897fd2..34e971482f 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -28,6 +28,8 @@ #include #include
+#include + #ifdef __cplusplus extern "C" { #pragma } -- cgit v1.2.3 From 14e8637d6b1a98b4ed6bedc70d0fca744b7b3e0f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 7 Feb 2009 20:04:52 +0000 Subject: Rewrite the mail label code from top to bottom. - Kill the e-util-labels API and read label information into a single-column GtkListStore. Use GConfBridge to automatically keep GConf synched with the list store. - The list store (a singleton instance) is stored in EShellSettings so it's available everywhere. - The list store serves as the model for EMailLabelTreeView, which itself is embedded in EMailLabelManager; a complete label management UI as seen in the preferences dialog. - EMailLabelDialog is used to add or edit a label. Avoid using a color button, instead embed a GtkColorSelection directly in the dialog so everything is in one window. Open issues: - The weird toggle/color/text menu items in the popup menu aren't there. For now they're just regular toggle items. I'll deal with it later. - Filter intergration is broken at the moment. svn path=/branches/kill-bonobo/; revision=37233 --- mail/message-list.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 34e971482f..0876d93d05 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -29,6 +29,7 @@ #include
#include +#include #ifdef __cplusplus extern "C" { @@ -87,11 +88,13 @@ enum { #define ML_HIDE_SAME (2147483646) typedef struct _MessageList MessageList; +typedef struct _MessageListClass MessageListClass; +typedef struct _MessageListPrivate MessageListPrivate; struct _MessageList { ETreeScrolled parent; - struct _MessageListPrivate *priv; + MessageListPrivate *priv; /* The table */ ETreeModel *model; @@ -167,14 +170,14 @@ struct _MessageList { struct _MailAsyncEvent *async_event; }; -typedef struct { +struct _MessageListClass { ETreeScrolledClass parent_class; /* signals - select a message */ void (*message_selected) (MessageList *ml, const char *uid); void (*message_list_built) (MessageList *ml); void (*message_list_scrolled) (MessageList *ml); -} MessageListClass; +}; typedef enum { MESSAGE_LIST_SELECT_NEXT = 0, @@ -184,7 +187,8 @@ typedef enum { } MessageListSelectDirection; GType message_list_get_type (void); -GtkWidget *message_list_new (void); +GtkWidget *message_list_new (EShellModule *shell_module); +EShellModule *message_list_get_shell_module (MessageList *message_list); void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const char *uri, gboolean outgoing); void message_list_freeze(MessageList *ml); -- cgit v1.2.3 From 84080821d62db3358fcaee4adfc24782ed7d4318 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 7 May 2009 08:06:09 -0400 Subject: Adapt addressbook to EShellBackend changes. Builds, but not tested. Use as a reference for other backends. --- mail/message-list.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 0876d93d05..bf48f40458 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -29,7 +29,7 @@ #include
#include -#include +#include #ifdef __cplusplus extern "C" { @@ -187,8 +187,8 @@ typedef enum { } MessageListSelectDirection; GType message_list_get_type (void); -GtkWidget *message_list_new (EShellModule *shell_module); -EShellModule *message_list_get_shell_module (MessageList *message_list); +GtkWidget *message_list_new (EShellBackend *shell_backend); +EShellBackend *message_list_get_shell_backend (MessageList *message_list); void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const char *uri, gboolean outgoing); void message_list_freeze(MessageList *ml); -- cgit v1.2.3 From a538f3f3100dbdbae1ea172ae3b8344e650d529d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 16 May 2009 12:11:55 -0400 Subject: Fix several types of pedantic compiler warnings. --- mail/message-list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index bf48f40458..c388f89f96 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -76,7 +76,7 @@ enum { /* Invisible columns */ COL_DELETED, COL_UNREAD, - COL_COLOUR, + COL_COLOUR }; #define MESSAGE_LIST_COLUMN_IS_ACTIVE(col) (col == COL_MESSAGE_STATUS || \ @@ -183,7 +183,7 @@ typedef enum { MESSAGE_LIST_SELECT_NEXT = 0, MESSAGE_LIST_SELECT_PREVIOUS = 1, MESSAGE_LIST_SELECT_DIRECTION = 1, /* direction mask */ - MESSAGE_LIST_SELECT_WRAP = 1<<1, /* option bit */ + MESSAGE_LIST_SELECT_WRAP = 1<<1 /* option bit */ } MessageListSelectDirection; GType message_list_get_type (void); -- cgit v1.2.3 From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- mail/message-list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 15dae0fcb7..4d0866fe20 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -10,7 +10,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Authors: -- cgit v1.2.3 From 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 27 May 2009 10:29:19 -0400 Subject: Prefer GLib basic types over C types. --- mail/message-list.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 4288568d4f..e902e9640b 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -104,7 +104,7 @@ struct _MessageList { /* The folder & matching uri */ CamelFolder *folder; - char *folder_uri; + gchar *folder_uri; GHashTable *uid_nodemap; /* uid (from info) -> tree node mapping */ @@ -114,15 +114,15 @@ struct _MessageList { /* IMPORTANT: You MUST have obtained the hide lock, to operate on this data */ GHashTable *hidden; struct _EMemPool *hidden_pool; - int hide_unhidden; /* total length, before hiding */ - int hide_before, hide_after; /* hide ranges of messages */ + gint hide_unhidden; /* total length, before hiding */ + gint hide_before, hide_after; /* hide ranges of messages */ /* Current search string, or %NULL */ - char *search; + gchar *search; /* which message uid should be left in the list even not in a search after rebuild; rebuild will clear the value to NULL */ - char *ensure_uid; + gchar *ensure_uid; /* are we regenerating the message_list because set_folder was just called? */ guint just_set_folder : 1; @@ -143,7 +143,7 @@ struct _MessageList { guint frozen:16; /* Where the ETree cursor is. */ - char *cursor_uid; + gchar *cursor_uid; /* whether the last selection was on a single row or none/multi */ gboolean last_sel_single; @@ -157,11 +157,11 @@ struct _MessageList { /* list of outstanding regeneration requests */ GList *regen; GMutex *regen_lock; /* when writing to the regen, guard with this lock too */ - char *pending_select_uid; /* set if we were busy regnerating while we had a select come in */ + gchar *pending_select_uid; /* set if we were busy regnerating while we had a select come in */ guint regen_timeout_id; - void *regen_timeout_msg; + gpointer regen_timeout_msg; - char *frozen_search; /* to save search took place while we were frozen */ + gchar *frozen_search; /* to save search took place while we were frozen */ /* the current camel folder thread tree, if any */ struct _CamelFolderThread *thread_tree; @@ -174,7 +174,7 @@ struct _MessageListClass { ETreeScrolledClass parent_class; /* signals - select a message */ - void (*message_selected) (MessageList *ml, const char *uid); + void (*message_selected) (MessageList *ml, const gchar *uid); void (*message_list_built) (MessageList *ml); void (*message_list_scrolled) (MessageList *ml); }; @@ -189,7 +189,7 @@ typedef enum { GType message_list_get_type (void); GtkWidget *message_list_new (EShellBackend *shell_backend); EShellBackend *message_list_get_shell_backend (MessageList *message_list); -void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const char *uri, gboolean outgoing); +void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const gchar *uri, gboolean outgoing); void message_list_freeze(MessageList *ml); void message_list_thaw(MessageList *ml); @@ -207,7 +207,7 @@ gboolean message_list_select (MessageList *message_list, gboolean message_list_can_select(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask); void message_list_select_uid (MessageList *message_list, - const char *uid); + const gchar *uid); void message_list_select_next_thread (MessageList *ml); @@ -222,11 +222,11 @@ void message_list_copy(MessageList *ml, gboolean cut); void message_list_paste (MessageList *ml); /* info */ -unsigned int message_list_length (MessageList *ml); -unsigned int message_list_hidden (MessageList *ml); +guint message_list_length (MessageList *ml); +guint message_list_hidden (MessageList *ml); /* hide specific messages */ -void message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper); +void message_list_hide_add (MessageList *ml, const gchar *expr, guint lower, guint upper); void message_list_hide_uids (MessageList *ml, GPtrArray *uids); void message_list_hide_clear (MessageList *ml); @@ -235,8 +235,8 @@ void message_list_set_threaded_expand_all (MessageList *ml); void message_list_set_threaded_collapse_all (MessageList *ml); void message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted); -void message_list_set_search (MessageList *ml, const char *search); -void message_list_ensure_message (MessageList *ml, const char *uid); +void message_list_set_search (MessageList *ml, const gchar *search); +void message_list_ensure_message (MessageList *ml, const gchar *uid); void message_list_save_state (MessageList *ml); -- cgit v1.2.3 From 14f8eee012382f04090ea9277e9567d5f32e8bf0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 28 May 2009 13:06:29 -0400 Subject: Whitespace cleanup. --- mail/message-list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index e902e9640b..47d3708b5e 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -56,7 +56,7 @@ enum { COL_FOLLOWUP_FLAG_STATUS, COL_FOLLOWUP_FLAG, COL_FOLLOWUP_DUE_BY, - COL_LOCATION, /* vfolder location? */ + COL_LOCATION, /* vfolder location? */ COL_SENDER, COL_RECIPIENTS, COL_MIXED_SENDER, -- cgit v1.2.3 From 433eac7844481b8ceda0bae8bf08f6bb623185b0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 1 Jun 2009 19:09:19 -0400 Subject: More code cleanup. --- mail/message-list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 47d3708b5e..6c5dcf60cb 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -240,7 +240,7 @@ void message_list_ensure_message (MessageList *ml, const gchar *uid); void message_list_save_state (MessageList *ml); -double message_list_get_scrollbar_position (MessageList *ml); +gdouble message_list_get_scrollbar_position (MessageList *ml); void message_list_set_scrollbar_position (MessageList *ml, double pos); #define MESSAGE_LIST_LOCK(m, l) g_mutex_lock(((MessageList *)m)->l) -- cgit v1.2.3 From 00d56cd32c5d0a7f49567d5241ba0d6fd80940bb Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 18 Jun 2009 10:50:51 -0400 Subject: Use G_BEGIN_DECLS / G_END_DECLS macros. --- mail/message-list.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 6c5dcf60cb..15ea286970 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -31,10 +31,7 @@ #include #include -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ +G_BEGIN_DECLS #define MESSAGE_LIST_TYPE (message_list_get_type ()) #define MESSAGE_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MESSAGE_LIST_TYPE, MessageList)) @@ -246,8 +243,6 @@ void message_list_set_scrollbar_position (MessageList *ml, double pos) #define MESSAGE_LIST_LOCK(m, l) g_mutex_lock(((MessageList *)m)->l) #define MESSAGE_LIST_UNLOCK(m, l) g_mutex_unlock(((MessageList *)m)->l) -#ifdef __cplusplus -} -#endif /* __cplusplus */ +G_END_DECLS #endif /* _MESSAGE_LIST_H_ */ -- cgit v1.2.3 From c0d998229d5a3d2b65445b9025de7b23112f4063 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 18 Jun 2009 15:26:21 -0400 Subject: Stop abusing forward declarations. --- mail/message-list.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 15ea286970..075c20afe3 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -24,6 +24,7 @@ #define _MESSAGE_LIST_H_ #include +#include #include
#include
@@ -161,7 +162,7 @@ struct _MessageList { gchar *frozen_search; /* to save search took place while we were frozen */ /* the current camel folder thread tree, if any */ - struct _CamelFolderThread *thread_tree; + CamelFolderThread *thread_tree; /* for message/folder chagned event handling */ struct _MailAsyncEvent *async_event; -- cgit v1.2.3