aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-07-23 11:49:22 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-07-23 11:49:22 +0800
commitad44453de22ab60267ddb33f8578d0840e57e228 (patch)
tree469001be765b60ff8720cb0984abfaabce3b50db
parentb06ecefc61581d7048df8b9bcd06896b75a459d0 (diff)
downloadgsoc2013-evolution-ad44453de22ab60267ddb33f8578d0840e57e228.tar
gsoc2013-evolution-ad44453de22ab60267ddb33f8578d0840e57e228.tar.gz
gsoc2013-evolution-ad44453de22ab60267ddb33f8578d0840e57e228.tar.bz2
gsoc2013-evolution-ad44453de22ab60267ddb33f8578d0840e57e228.tar.lz
gsoc2013-evolution-ad44453de22ab60267ddb33f8578d0840e57e228.tar.xz
gsoc2013-evolution-ad44453de22ab60267ddb33f8578d0840e57e228.tar.zst
gsoc2013-evolution-ad44453de22ab60267ddb33f8578d0840e57e228.zip
set the session on the formatter. See #61767.
2004-07-22 Not Zed <NotZed@Ximian.com> * em-utils.c (em_utils_part_to_html, em_utils_message_to_html): set the session on the formatter. See #61767. 2004-07-22 Not Zed <NotZed@Ximian.com> ** See bug #61747. * message-list.c (search_func): don't emit a message_selected here (god knows why we did?). Don't update cursor_uid either, just clear it. (message_list_select): select the path if we find it here, causing the cascade of selection action. svn path=/trunk/; revision=26710
-rw-r--r--mail/ChangeLog15
-rw-r--r--mail/em-folder-view.c1
-rw-r--r--mail/em-utils.c6
-rw-r--r--mail/message-list.c23
4 files changed, 33 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 0b03500f6e..a43937af6f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,18 @@
+2004-07-22 Not Zed <NotZed@Ximian.com>
+
+ * em-utils.c (em_utils_part_to_html, em_utils_message_to_html):
+ set the session on the formatter. See #61767.
+
+2004-07-22 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #61747.
+
+ * message-list.c (search_func): don't emit a message_selected here
+ (god knows why we did?). Don't update cursor_uid either, just
+ clear it.
+ (message_list_select): select the path if we find it here, causing
+ the cascade of selection action.
+
2004-07-19 Jeffrey Stedfast <fejj@novell.com>
* em-migrate.c (em_migrate_folder): Free uri and name
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 8eb83642f1..355398e781 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -1632,7 +1632,6 @@ emfv_enable_menus(EMFolderView *emfv)
disable_mask = ~0;
}
-
name = g_string_new("");
for (l = emfv->enable_map; l; l = l->next) {
EMFolderViewEnable *map = l->data;
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 1c9bcbdce6..1fea720579 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -66,6 +66,8 @@
static void emu_save_part_done (CamelMimePart *part, char *name, int done, void *data);
+extern struct _CamelSession *session;
+
#define d(x)
/**
@@ -1375,6 +1377,7 @@ em_utils_part_to_html(CamelMimePart *part)
camel_stream_mem_set_byte_array (mem, buf);
emfq = em_format_quote_new(NULL, (CamelStream *)mem, 0);
+ em_format_set_session((EMFormat *)emfq, session);
em_format_part((EMFormat *) emfq, (CamelStream *) mem, part);
g_object_unref (emfq);
@@ -1411,6 +1414,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
camel_stream_mem_set_byte_array (mem, buf);
emfq = em_format_quote_new(credits, (CamelStream *)mem, flags);
+ em_format_set_session((EMFormat *)emfq, session);
em_format_format((EMFormat *)emfq, NULL, NULL, message);
g_object_unref (emfq);
@@ -1520,8 +1524,6 @@ em_utils_folder_name_from_uri (const char *uri)
return folder_name;
}
-extern struct _CamelSession *session;
-
/* email: uri's are based on the account, with special cases for local
* stores, vfolder and local mail.
* e.g.
diff --git a/mail/message-list.c b/mail/message-list.c
index bbbce5bfaf..57047a857e 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -465,6 +465,7 @@ struct search_func_data {
MessageList *message_list;
guint32 flags;
guint32 mask;
+ ETreePath path;
};
static gboolean
@@ -478,12 +479,9 @@ search_func (ETreeModel *model, ETreePath path, struct search_func_data *data)
info = get_message_info (data->message_list, path);
if (info && (info->flags & data->mask) == data->flags) {
- if (data->message_list->cursor_uid) {
- g_free (data->message_list->cursor_uid);
- data->message_list->cursor_uid = g_strdup (camel_message_info_uid (info));
- }
- g_signal_emit (GTK_OBJECT (data->message_list), message_list_signals[MESSAGE_SELECTED], 0,
- camel_message_info_uid (info));
+ g_free(data->message_list->cursor_uid);
+ data->message_list->cursor_uid = NULL;
+ data->path = path;
return TRUE;
}
return FALSE;
@@ -538,7 +536,8 @@ message_list_select (MessageList *message_list,
data.message_list = message_list;
data.flags = flags;
data.mask = mask;
-
+ data.path = NULL;
+
if (direction == MESSAGE_LIST_SELECT_NEXT)
params |= E_TREE_FIND_NEXT_FORWARD;
else
@@ -547,7 +546,13 @@ message_list_select (MessageList *message_list,
if (wraparound)
params |= E_TREE_FIND_NEXT_WRAP;
- return e_tree_find_next (message_list->tree, params, (ETreePathFunc) search_func, &data);
+ if (e_tree_find_next (message_list->tree, params, (ETreePathFunc) search_func, &data)) {
+ ETreeSelectionModel *etsm = (ETreeSelectionModel *)e_tree_get_selection_model (message_list->tree);
+
+ e_tree_selection_model_select_single_path(etsm, data.path);
+ return TRUE;
+ } else
+ return FALSE;
}
@@ -2956,7 +2961,7 @@ ml_getselected_cb(ETreePath path, void *user_data)
if (e_tree_model_node_is_root (data->ml->model, path))
return;
-
+
uid = get_message_uid(data->ml, path);
g_assert(uid != NULL);
g_ptr_array_add(data->uids, g_strdup(uid));