Compare commits
14 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
576a9decd7 | ||
|
|
6c1e6f223e | ||
|
|
6f48425bbb | ||
|
|
a5f35dd361 | ||
|
|
3bf09cb291 | ||
|
|
ace236ea26 | ||
|
|
a9e66245df | ||
|
|
641ea8c59c | ||
|
|
22b40e832c | ||
|
|
11c8fef4c2 | ||
|
|
03539d1e51 | ||
|
|
769842dadf | ||
|
|
f9fa7a55fa | ||
|
|
74a88366ce |
14 changed files with 3183 additions and 419 deletions
70
.gitignore
vendored
70
.gitignore
vendored
|
|
@ -1 +1,69 @@
|
|||
/evolution-*.tar.xz
|
||||
evolution-2.31.5.tar.bz2
|
||||
/evolution-2.31.91.tar.bz2
|
||||
/evolution-2.31.92.tar.bz2
|
||||
/evolution-2.91.0.tar.bz2
|
||||
/evolution-2.91.1.tar.bz2
|
||||
/evolution-2.91.2.tar.bz2
|
||||
/evolution-2.91.3.tar.bz2
|
||||
/evolution-2.91.4.tar.bz2
|
||||
/evolution-2.91.5.tar.bz2
|
||||
/evolution-2.91.6.tar.bz2
|
||||
/evolution-2.91.6.1.tar.bz2
|
||||
/evolution-2.91.6.2.tar.bz2
|
||||
/evolution-2.91.90.tar.bz2
|
||||
/evolution-2.91.91.tar.bz2
|
||||
/evolution-2.91.92.tar.bz2
|
||||
/evolution-3.0.0.tar.bz2
|
||||
/evolution-3.1.1.tar.bz2
|
||||
/evolution-3.1.2.tar.bz2
|
||||
/evolution-3.1.3.tar.bz2
|
||||
/evolution-3.1.4.tar.bz2
|
||||
/evolution-3.1.5.tar.bz2
|
||||
/evolution-3.1.90.tar.xz
|
||||
/evolution-3.1.91.tar.xz
|
||||
/evolution-3.1.92.tar.xz
|
||||
/evolution-3.2.0.tar.xz
|
||||
/evolution-3.3.1.tar.xz
|
||||
/evolution-3.3.2.tar.xz
|
||||
/evolution-3.3.3.tar.xz
|
||||
/evolution-3.3.4.tar.xz
|
||||
/evolution-3.3.5.tar.xz
|
||||
/evolution-3.3.90.tar.xz
|
||||
/evolution-3.3.91.tar.xz
|
||||
/evolution-3.3.92.tar.xz
|
||||
/evolution-3.4.0.tar.xz
|
||||
/evolution-3.4.0.1.tar.xz
|
||||
/evolution-3.4.1.tar.xz
|
||||
/evolution-3.5.1.tar.xz
|
||||
/evolution-3.5.2.tar.xz
|
||||
/evolution-3.5.3.tar.xz
|
||||
/evolution-3.5.3.1.tar.xz
|
||||
/evolution-3.5.4.tar.xz
|
||||
/evolution-3.5.5.tar.xz
|
||||
/evolution-3.5.90.tar.xz
|
||||
/evolution-3.5.91.tar.xz
|
||||
/evolution-3.5.92.tar.xz
|
||||
/evolution-3.6.0.tar.xz
|
||||
/evolution-3.7.1.tar.xz
|
||||
/evolution-3.7.2.tar.xz
|
||||
/evolution-3.7.3.1.tar.xz
|
||||
/evolution-3.7.3.2.tar.xz
|
||||
/evolution-3.7.4.tar.xz
|
||||
/evolution-3.7.5.tar.xz
|
||||
/evolution-3.7.90.tar.xz
|
||||
/evolution-3.7.91.tar.xz
|
||||
/evolution-3.7.92.tar.xz
|
||||
/evolution-3.8.0.tar.xz
|
||||
/evolution-3.9.1.tar.xz
|
||||
/evolution-3.9.2.tar.xz
|
||||
/evolution-3.9.3.tar.xz
|
||||
/evolution-3.9.4.tar.xz
|
||||
/evolution-3.9.5.tar.xz
|
||||
/evolution-3.9.90.tar.xz
|
||||
/evolution-3.9.91.tar.xz
|
||||
/evolution-3.9.92.tar.xz
|
||||
/evolution-3.10.0.tar.xz
|
||||
/evolution-3.10.1.tar.xz
|
||||
/evolution-3.10.2.tar.xz
|
||||
/evolution-3.10.3.tar.xz
|
||||
/evolution-3.10.4.tar.xz
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
From 37a95e0e6b74fa9fe1692c788983142d8d4774d4 Mon Sep 17 00:00:00 2001
|
||||
From: Milan Crha <mcrha@redhat.com>
|
||||
Date: Mon, 10 Feb 2014 15:59:24 +0100
|
||||
Subject: [PATCH 2/7] Bug #724023 - Run EMailFormatter in the main/UI thread
|
||||
|
||||
Any GtkWidget creation or manipulation should be done exclusively
|
||||
from the main/UI thread, thus make sure it is done that way.
|
||||
Of course, evolution can freeze for a little time (depends on the message
|
||||
size), until its formatting is done. It's unnoticeable with usual messages.
|
||||
---
|
||||
em-format/e-mail-part-attachment-bar.c | 17 ++++++++++++-----
|
||||
mail/e-mail-request.c | 9 ++++++---
|
||||
2 files changed, 18 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/em-format/e-mail-part-attachment-bar.c b/em-format/e-mail-part-attachment-bar.c
|
||||
index 5cebd9b..57f49be 100644
|
||||
--- a/em-format/e-mail-part-attachment-bar.c
|
||||
+++ b/em-format/e-mail-part-attachment-bar.c
|
||||
@@ -60,12 +60,7 @@ e_mail_part_attachment_bar_class_init (EMailPartAttachmentBarClass *class)
|
||||
static void
|
||||
e_mail_part_attachment_bar_init (EMailPartAttachmentBar *part)
|
||||
{
|
||||
- GtkTreeModel *tree_model;
|
||||
-
|
||||
part->priv = E_MAIL_PART_ATTACHMENT_BAR_GET_PRIVATE (part);
|
||||
-
|
||||
- tree_model = e_attachment_store_new ();
|
||||
- part->priv->store = E_ATTACHMENT_STORE (tree_model);
|
||||
}
|
||||
|
||||
EMailPart *
|
||||
@@ -84,6 +79,18 @@ e_mail_part_attachment_bar_get_store (EMailPartAttachmentBar *part)
|
||||
{
|
||||
g_return_val_if_fail (E_IS_MAIL_PART_ATTACHMENT_BAR (part), NULL);
|
||||
|
||||
+ if (!part->priv->store) {
|
||||
+ GtkTreeModel *tree_model;
|
||||
+
|
||||
+ /* Create the store only on demand. The EMailParser runs in a dedicated
|
||||
+ thread, but the EAttachmentStore is a GtkWidget descendant, which should
|
||||
+ be manipulated only from the main/UI thread, thus postpone its creating
|
||||
+ until it's really needed, which might be during the EMailFormatter run,
|
||||
+ which runs from the main/UI thread. */
|
||||
+ tree_model = e_attachment_store_new ();
|
||||
+ part->priv->store = E_ATTACHMENT_STORE (tree_model);
|
||||
+ }
|
||||
+
|
||||
return part->priv->store;
|
||||
}
|
||||
|
||||
diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c
|
||||
index bfbedc3..615bce3 100644
|
||||
--- a/mail/e-mail-request.c
|
||||
+++ b/mail/e-mail-request.c
|
||||
@@ -365,9 +365,12 @@ mail_request_send_async (SoupRequest *request,
|
||||
simple, handle_contact_photo_request,
|
||||
G_PRIORITY_DEFAULT, cancellable);
|
||||
} else {
|
||||
- g_simple_async_result_run_in_thread (
|
||||
- simple, handle_mail_request,
|
||||
- G_PRIORITY_DEFAULT, cancellable);
|
||||
+ /* Process e-mail mail requests in this thread, which should be
|
||||
+ the main/UI thread, because any EMailFormatter can create
|
||||
+ GtkWidget-s, or manipulate with them, which should be always
|
||||
+ done in the main/UI thread. */
|
||||
+ handle_mail_request (simple, G_OBJECT (request), cancellable);
|
||||
+ g_simple_async_result_complete_in_idle (simple);
|
||||
}
|
||||
|
||||
g_object_unref (simple);
|
||||
--
|
||||
1.9.0
|
||||
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
From 9de8f573e9eba07a096c7f97f97bb5ac876278c8 Mon Sep 17 00:00:00 2001
|
||||
From: Milan Crha <mcrha@redhat.com>
|
||||
Date: Mon, 10 Feb 2014 17:57:28 +0100
|
||||
Subject: [PATCH 3/7] Bug #722041 - NNTP Messages are silently dropped from
|
||||
Outbox
|
||||
|
||||
---
|
||||
libemail-engine/mail-ops.c | 20 ++++++++------------
|
||||
1 file changed, 8 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c
|
||||
index 4f3dbd3..4db5dae 100644
|
||||
--- a/libemail-engine/mail-ops.c
|
||||
+++ b/libemail-engine/mail-ops.c
|
||||
@@ -682,22 +682,18 @@ mail_send_message (struct _send_queue_msg *m,
|
||||
info = camel_message_info_new (NULL);
|
||||
camel_message_info_set_flags (info, CAMEL_MESSAGE_SEEN, ~0);
|
||||
|
||||
- for (header = xev; header; header = header->next) {
|
||||
+ for (header = xev; header && !local_error; header = header->next) {
|
||||
gchar *uri;
|
||||
|
||||
if (strcmp (header->name, "X-Evolution-PostTo") != 0)
|
||||
continue;
|
||||
|
||||
- /* TODO: don't lose errors */
|
||||
-
|
||||
uri = g_strstrip (g_strdup (header->value));
|
||||
- /* FIXME Not passing a GCancellable or GError here. */
|
||||
folder = e_mail_session_uri_to_folder_sync (
|
||||
- m->session, uri, 0, NULL, NULL);
|
||||
+ m->session, uri, 0, cancellable, &local_error);
|
||||
if (folder != NULL) {
|
||||
- /* FIXME Not passing a GCancellable or GError here. */
|
||||
camel_folder_append_message_sync (
|
||||
- folder, message, info, NULL, NULL, NULL);
|
||||
+ folder, message, info, NULL, cancellable, &local_error);
|
||||
g_object_unref (folder);
|
||||
folder = NULL;
|
||||
}
|
||||
@@ -707,7 +703,7 @@ mail_send_message (struct _send_queue_msg *m,
|
||||
/* post process */
|
||||
mail_tool_restore_xevolution_headers (message, xev);
|
||||
|
||||
- if (driver) {
|
||||
+ if (local_error == NULL && driver) {
|
||||
camel_filter_driver_filter_message (
|
||||
driver, message, info, NULL, NULL,
|
||||
NULL, "", cancellable, &local_error);
|
||||
@@ -735,10 +731,9 @@ mail_send_message (struct _send_queue_msg *m,
|
||||
}
|
||||
}
|
||||
|
||||
- if (provider == NULL
|
||||
- || !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)) {
|
||||
+ if (local_error == NULL && (provider == NULL
|
||||
+ || !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER))) {
|
||||
CamelFolder *local_sent_folder;
|
||||
- GError *local_error = NULL;
|
||||
|
||||
local_sent_folder = e_mail_session_get_local_folder (
|
||||
m->session, E_MAIL_LOCAL_FOLDER_SENT);
|
||||
@@ -798,6 +793,7 @@ mail_send_message (struct _send_queue_msg *m,
|
||||
_("Failed to append to "
|
||||
"local 'Sent' folder: %s"),
|
||||
local_error->message);
|
||||
+ g_clear_error (&local_error);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -836,7 +832,7 @@ mail_send_message (struct _send_queue_msg *m,
|
||||
camel_folder_synchronize_sync (queue, FALSE, NULL, NULL);
|
||||
}
|
||||
|
||||
- if (err->len > 0) {
|
||||
+ if (local_error == NULL && err->len > 0) {
|
||||
/* set the culmulative exception report */
|
||||
g_set_error (
|
||||
&local_error, CAMEL_ERROR,
|
||||
--
|
||||
1.9.0
|
||||
|
||||
44
0003-Bug-722698-Crash-creating-a-new-folder.patch
Normal file
44
0003-Bug-722698-Crash-creating-a-new-folder.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
From 5e4b28e2fae285fa632ab189707489e0df8d79aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
|
||||
Date: Tue, 21 Jan 2014 15:48:54 +0100
|
||||
Subject: [PATCH 5/7] Bug #722698 - Crash creating a new folder
|
||||
|
||||
---
|
||||
mail/em-folder-tree.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
|
||||
index b15041a..cd7f67e 100644
|
||||
--- a/mail/em-folder-tree.c
|
||||
+++ b/mail/em-folder-tree.c
|
||||
@@ -1108,15 +1108,27 @@ folder_tree_dispose (GObject *object)
|
||||
{
|
||||
EMFolderTreePrivate *priv;
|
||||
GtkTreeModel *model;
|
||||
+ GtkTreeSelection *selection;
|
||||
|
||||
priv = EM_FOLDER_TREE_GET_PRIVATE (object);
|
||||
model = gtk_tree_view_get_model (GTK_TREE_VIEW (object));
|
||||
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (object));
|
||||
|
||||
if (priv->loaded_row_id != 0) {
|
||||
g_signal_handler_disconnect (model, priv->loaded_row_id);
|
||||
priv->loaded_row_id = 0;
|
||||
}
|
||||
|
||||
+ if (priv->loading_row_id != 0) {
|
||||
+ g_signal_handler_disconnect (model, priv->loading_row_id);
|
||||
+ priv->loading_row_id = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (priv->selection_changed_handler_id != 0) {
|
||||
+ g_signal_handler_disconnect (selection, priv->selection_changed_handler_id);
|
||||
+ priv->selection_changed_handler_id = 0;
|
||||
+ }
|
||||
+
|
||||
if (priv->autoscroll_id != 0) {
|
||||
g_source_remove (priv->autoscroll_id);
|
||||
priv->autoscroll_id = 0;
|
||||
--
|
||||
1.9.0
|
||||
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
diff -up evolution-3.48.1 evolution-3.48
|
||||
diff -up evolution-3.48.1/docs/evolution.1 evolution-3.48.1/docs/evolution
|
||||
diff -up evolution-3.48.1/src/modules/backup-restore/evolution-backup-tool.c.1 evolution-3.48.1/src/modules/backup-restore/evolution-backup-tool.c
|
||||
--- evolution-3.48.1/src/modules/backup-restore/evolution-backup-tool.c.1 2023-11-27 13:12:25.099463743 -0500
|
||||
+++ evolution-3.48.1/src/modules/backup-restore/evolution-backup-tool.c 2023-11-27 13:14:38.640243434 -0500
|
||||
@@ -674,7 +674,7 @@ get_source_manager_reload_command (void)
|
||||
g_string_free (tmp, TRUE);
|
||||
tmp = NULL;
|
||||
|
||||
- base_filename = g_strdup (EDS_SOURCES_DBUS_SERVICE_NAME);
|
||||
+ base_filename = g_ascii_strdown (EDS_SOURCES_DBUS_SERVICE_NAME, -1);
|
||||
|
||||
if (!base_filename || !*base_filename) {
|
||||
g_free (base_filename);
|
||||
@@ -690,14 +690,16 @@ get_source_manager_reload_command (void)
|
||||
|
||||
while (!tmp) {
|
||||
const gchar *name;
|
||||
+ gchar *name_down;
|
||||
|
||||
name = g_dir_read_name (dir);
|
||||
+ name_down = g_ascii_strdown (name, -1);
|
||||
|
||||
if (!name)
|
||||
break;
|
||||
|
||||
- if (g_ascii_strncasecmp (name, base_filename, base_filename_len) == 0 &&
|
||||
- g_ascii_strncasecmp (name + strlen (name) - 8, ".service", 8) == 0) {
|
||||
+ if (strstr (name_down, base_filename) != NULL &&
|
||||
+ strncmp (name_down + strlen (name) - 8, ".service", 8) == 0) {
|
||||
gchar *filename;
|
||||
|
||||
filename = g_strconcat ("$DBUSDATADIR", G_DIR_SEPARATOR_S, name, NULL);
|
||||
@@ -724,6 +726,8 @@ get_source_manager_reload_command (void)
|
||||
g_free (str);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ g_free (name_down);
|
||||
}
|
||||
|
||||
g_free (base_filename);
|
||||
21
evolution-1.4.4-ldap-x86_64-hack.patch
Normal file
21
evolution-1.4.4-ldap-x86_64-hack.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -up evolution-2.31.1/configure.ldaphack evolution-2.31.1/configure
|
||||
--- evolution-2.31.1/configure.ldaphack 2010-05-03 12:43:34.000000000 +0200
|
||||
+++ evolution-2.31.1/configure 2010-05-03 19:22:55.000000000 +0200
|
||||
@@ -15797,7 +15797,7 @@ if test "${ac_cv_lib_ldap_ldap_open+set}
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lldap $LDAP_LDFLAGS $LDAP_LIBS $LIBS"
|
||||
+LIBS="-lldap -lresolv $LDAP_LDFLAGS $LDAP_LIBS $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -16129,7 +16129,7 @@ if test "${ac_cv_lib_ldap_ldap_open+set}
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lldap $LDAP_LDFLAGS $LDAP_LIBS $LIBS"
|
||||
+LIBS="-lldap -lresolv $LDAP_LDFLAGS $LDAP_LIBS $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
21
evolution-2.30.1-help-contents.patch
Normal file
21
evolution-2.30.1-help-contents.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -up evolution-3.10.0/shell/e-shell-window-actions.c.help-contents evolution-3.10.0/shell/e-shell-window-actions.c
|
||||
--- evolution-3.10.0/shell/e-shell-window-actions.c.help-contents 2013-09-07 18:34:59.000000000 +0200
|
||||
+++ evolution-3.10.0/shell/e-shell-window-actions.c 2013-10-10 08:51:03.863987108 +0200
|
||||
@@ -1414,6 +1414,17 @@ e_shell_window_actions_init (EShellWindo
|
||||
if (path == NULL)
|
||||
gtk_action_set_visible (ACTION (SUBMIT_BUG), FALSE);
|
||||
g_free (path);
|
||||
+
|
||||
+ /* Viewing user documentation requires the evolution-help
|
||||
+ * Fedora package. Look for one of the files it installs. */
|
||||
+ path = g_build_filename (
|
||||
+ EVOLUTION_DATADIR, "help", "C",
|
||||
+ PACKAGE, "index.page", NULL);
|
||||
+ if (!g_file_test (path, G_FILE_TEST_IS_REGULAR)) {
|
||||
+ gtk_action_set_visible (ACTION (CONTENTS), FALSE);
|
||||
+ gtk_action_set_sensitive (ACTION (CONTENTS), FALSE);
|
||||
+ }
|
||||
+ g_free (path);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
19
evolution-3.10.4-alarm-snooze-crash.patch
Normal file
19
evolution-3.10.4-alarm-snooze-crash.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff -up evolution-3.10.4/calendar/alarm-notify/alarm-queue.c.alarm-snooze-crash evolution-3.10.4/calendar/alarm-notify/alarm-queue.c
|
||||
--- evolution-3.10.4/calendar/alarm-notify/alarm-queue.c.alarm-snooze-crash 2013-12-07 15:15:01.000000000 +0100
|
||||
+++ evolution-3.10.4/calendar/alarm-notify/alarm-queue.c 2014-07-30 08:24:33.579630783 +0200
|
||||
@@ -1352,7 +1352,6 @@ notify_dialog_cb (AlarmNotifyResult resu
|
||||
debug (("Creating a snooze"));
|
||||
create_snooze (tray_data->cqa, tray_data->alarm_id, snooze_mins);
|
||||
tray_data->snooze_set = TRUE;
|
||||
- tray_list_remove_data (tray_data);
|
||||
if (alarm_notifications_dialog) {
|
||||
GtkTreeSelection *selection =
|
||||
gtk_tree_view_get_selection (
|
||||
@@ -1376,6 +1375,7 @@ notify_dialog_cb (AlarmNotifyResult resu
|
||||
}
|
||||
|
||||
}
|
||||
+ tray_list_remove_data (tray_data);
|
||||
|
||||
break;
|
||||
|
||||
178
evolution-3.10.4-large-message-render-hung.patch
Normal file
178
evolution-3.10.4-large-message-render-hung.patch
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
diff -up evolution-3.10.4/modules/text-highlight/e-mail-formatter-text-highlight.c.large-message-render-hung evolution-3.10.4/modules/text-highlight/e-mail-formatter-text-highlight.c
|
||||
--- evolution-3.10.4/modules/text-highlight/e-mail-formatter-text-highlight.c.large-message-render-hung 2013-12-07 15:14:12.000000000 +0100
|
||||
+++ evolution-3.10.4/modules/text-highlight/e-mail-formatter-text-highlight.c 2014-09-12 08:24:26.418217142 +0200
|
||||
@@ -41,6 +41,15 @@ typedef EMailFormatterExtensionClass EMa
|
||||
typedef EExtension EMailFormatterTextHighlightLoader;
|
||||
typedef EExtensionClass EMailFormatterTextHighlightLoaderClass;
|
||||
|
||||
+typedef struct _TextHighlightClosure TextHighlightClosure;
|
||||
+
|
||||
+struct _TextHighlightClosure {
|
||||
+ CamelStream *read_stream;
|
||||
+ CamelStream *output_stream;
|
||||
+ GCancellable *cancellable;
|
||||
+ GError *error;
|
||||
+};
|
||||
+
|
||||
GType e_mail_formatter_text_highlight_get_type (void);
|
||||
|
||||
G_DEFINE_DYNAMIC_TYPE (
|
||||
@@ -110,6 +119,103 @@ get_syntax (EMailPart *part,
|
||||
return syntax;
|
||||
}
|
||||
|
||||
+static gpointer
|
||||
+text_hightlight_read_data_thread (gpointer user_data)
|
||||
+{
|
||||
+ TextHighlightClosure *closure = user_data;
|
||||
+ gchar buffer[10240];
|
||||
+
|
||||
+ g_return_val_if_fail (closure != NULL, NULL);
|
||||
+
|
||||
+ while (!camel_stream_eos (closure->read_stream) &&
|
||||
+ !g_cancellable_set_error_if_cancelled (closure->cancellable, &closure->error)) {
|
||||
+ gssize read;
|
||||
+ gsize wrote = 0;
|
||||
+
|
||||
+ read = camel_stream_read (closure->read_stream, buffer, 10240, closure->cancellable, &closure->error);
|
||||
+ if (read < 0 || closure->error)
|
||||
+ break;
|
||||
+
|
||||
+ wrote = camel_stream_write (closure->output_stream, buffer, read, closure->cancellable, &closure->error);
|
||||
+ if (wrote == -1 || (gssize) wrote != read || closure->error)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+text_highlight_feed_data (CamelStream *output_stream,
|
||||
+ CamelDataWrapper *data_wrapper,
|
||||
+ gint pipe_stdin,
|
||||
+ gint pipe_stdout,
|
||||
+ GCancellable *cancellable,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ TextHighlightClosure closure;
|
||||
+ CamelContentType *content_type;
|
||||
+ CamelStream *write_stream;
|
||||
+ gboolean success = TRUE;
|
||||
+ GThread *thread;
|
||||
+
|
||||
+ closure.read_stream = camel_stream_fs_new_with_fd (pipe_stdout);
|
||||
+ closure.output_stream = output_stream;
|
||||
+ closure.cancellable = cancellable;
|
||||
+ closure.error = NULL;
|
||||
+
|
||||
+ write_stream = camel_stream_fs_new_with_fd (pipe_stdin);
|
||||
+
|
||||
+ thread = g_thread_new (NULL, text_hightlight_read_data_thread, &closure);
|
||||
+
|
||||
+ content_type = camel_data_wrapper_get_mime_type_field (data_wrapper);
|
||||
+ if (content_type) {
|
||||
+ const gchar *charset = camel_content_type_param (content_type, "charset");
|
||||
+
|
||||
+ /* Convert to UTF-8 charset, if needed, which the 'highlight' expects;
|
||||
+ it can cope with non-UTF-8 letters, thus no need for a content UTF-8-validation */
|
||||
+ if (charset && g_ascii_strcasecmp (charset, "utf-8") != 0) {
|
||||
+ CamelMimeFilter *filter;
|
||||
+
|
||||
+ filter = camel_mime_filter_charset_new (charset, "UTF-8");
|
||||
+ if (filter != NULL) {
|
||||
+ CamelStream *filtered = camel_stream_filter_new (write_stream);
|
||||
+
|
||||
+ if (filtered) {
|
||||
+ camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered), filter);
|
||||
+ g_object_unref (write_stream);
|
||||
+ write_stream = filtered;
|
||||
+ }
|
||||
+
|
||||
+ g_object_unref (filter);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (camel_data_wrapper_decode_to_stream_sync (data_wrapper, write_stream, cancellable, error) < 0) {
|
||||
+ g_cancellable_cancel (cancellable);
|
||||
+ success = FALSE;
|
||||
+ } else {
|
||||
+ /* Close the stream, thus the highlight knows no more data will come */
|
||||
+ g_clear_object (&write_stream);
|
||||
+ }
|
||||
+
|
||||
+ g_thread_join (thread);
|
||||
+
|
||||
+ g_clear_object (&closure.read_stream);
|
||||
+ g_clear_object (&write_stream);
|
||||
+
|
||||
+ if (closure.error) {
|
||||
+ if (error && !*error)
|
||||
+ g_propagate_error (error, closure.error);
|
||||
+ else
|
||||
+ g_clear_error (&closure.error);
|
||||
+
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return success;
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
emfe_text_highlight_format (EMailFormatterExtension *extension,
|
||||
EMailFormatter *formatter,
|
||||
@@ -213,35 +319,27 @@ emfe_text_highlight_format (EMailFormatt
|
||||
&pid, &pipe_stdin, &pipe_stdout, NULL, NULL);
|
||||
|
||||
if (success) {
|
||||
- CamelStream *read;
|
||||
- CamelStream *write;
|
||||
- CamelStream *utf8;
|
||||
- GByteArray *ba;
|
||||
- gchar *tmp;
|
||||
-
|
||||
- write = camel_stream_fs_new_with_fd (pipe_stdin);
|
||||
- read = camel_stream_fs_new_with_fd (pipe_stdout);
|
||||
-
|
||||
- /* Decode the content of mime part to the 'utf8' stream */
|
||||
- utf8 = camel_stream_mem_new ();
|
||||
- camel_data_wrapper_decode_to_stream_sync (
|
||||
- dw, utf8, cancellable, NULL);
|
||||
-
|
||||
- /* Convert the binary data do someting displayable */
|
||||
- ba = camel_stream_mem_get_byte_array (CAMEL_STREAM_MEM (utf8));
|
||||
- tmp = e_util_utf8_data_make_valid ((gchar *) ba->data, ba->len);
|
||||
-
|
||||
- /* Send the sanitized data to the highlighter */
|
||||
- camel_stream_write_string (write, tmp, cancellable, NULL);
|
||||
- g_free (tmp);
|
||||
- g_object_unref (utf8);
|
||||
- g_object_unref (write);
|
||||
+ GError *local_error = NULL;
|
||||
|
||||
- g_spawn_close_pid (pid);
|
||||
+ success = text_highlight_feed_data (
|
||||
+ stream, dw,
|
||||
+ pipe_stdin, pipe_stdout,
|
||||
+ cancellable, &local_error);
|
||||
+
|
||||
+ if (g_error_matches (
|
||||
+ local_error, G_IO_ERROR,
|
||||
+ G_IO_ERROR_CANCELLED)) {
|
||||
+ /* Do nothing. */
|
||||
+
|
||||
+ } else if (local_error != NULL) {
|
||||
+ g_warning (
|
||||
+ "%s: %s", G_STRFUNC,
|
||||
+ local_error->message);
|
||||
+ }
|
||||
+
|
||||
+ g_clear_error (&local_error);
|
||||
|
||||
- g_seekable_seek (G_SEEKABLE (read), 0, G_SEEK_SET, cancellable, NULL);
|
||||
- camel_stream_write_to_stream (read, stream, cancellable, NULL);
|
||||
- g_object_unref (read);
|
||||
+ g_spawn_close_pid (pid);
|
||||
} else {
|
||||
/* We can't call e_mail_formatter_format_as on text/plain,
|
||||
* because text-highlight is registered as an handler for
|
||||
3006
evolution.spec
3006
evolution.spec
File diff suppressed because it is too large
Load diff
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# see https://gitlab.gnome.org/GNOME/glib/issues/1737
|
||||
# previous versions used milliseconds instead of seconds as the timeout argument",
|
||||
(`pkg-config --atleast-version 2.60.1 gio-2.0` || `pkg-config --atleast-version 2.61.0 gio-2.0`) && TIMEOUTMULT= || TIMEOUTMULT=000
|
||||
|
||||
sed -e "s|\@SOURCES_SERVICE\@|$(pkg-config --variable=sourcesdbusservicename evolution-data-server-1.2)|" \
|
||||
-e "s|\@ADDRESSBOOK_SERVICE\@|$(pkg-config --variable=addressbookdbusservicename evolution-data-server-1.2)|" \
|
||||
-e "s|\@CALENDAR_SERVICE\@|$(pkg-config --variable=calendardbusservicename evolution-data-server-1.2)|" \
|
||||
-e "s|\@TIMEOUTMULT\@|${TIMEOUTMULT}|"
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "--quit" -o "$1" = "--force-shutdown" ]; then
|
||||
/app/bin/evolution.bin "$@"
|
||||
else
|
||||
export BOGOFILTER_DIR="${XDG_DATA_HOME}/bogofilter/"
|
||||
export GIO_USE_NETWORK_MONITOR=base
|
||||
gsettings reset org.gnome.evolution-data-server network-monitor-gio-name
|
||||
|
||||
LINES=$(gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep @SOURCES_SERVICE@ | wc -l)
|
||||
if [ "${LINES}" = "0" ]; then
|
||||
/app/libexec/evolution-source-registry &
|
||||
gdbus wait --session --timeout=1@TIMEOUTMULT@ @SOURCES_SERVICE@
|
||||
fi
|
||||
|
||||
LINES=$(gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep @ADDRESSBOOK_SERVICE@ | wc -l)
|
||||
if [ "${LINES}" = "0" ]; then
|
||||
/app/libexec/evolution-addressbook-factory -r &
|
||||
gdbus wait --session --timeout=1@TIMEOUTMULT@ @ADDRESSBOOK_SERVICE@
|
||||
fi
|
||||
|
||||
LINES=$(gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep @CALENDAR_SERVICE@ | wc -l)
|
||||
if [ "${LINES}" = "0" ]; then
|
||||
/app/libexec/evolution-calendar-factory -r &
|
||||
gdbus wait --session --timeout=1@TIMEOUTMULT@ @CALENDAR_SERVICE@
|
||||
fi
|
||||
|
||||
/app/bin/evolution.bin "$@"
|
||||
fi
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
runpath:
|
||||
allowed_paths:
|
||||
- /usr/lib/evolution
|
||||
- /usr/lib64/evolution
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (evolution-3.59.1.tar.xz) = 26d6d4dfcdbc3d89f88d9e24096c7ff910d221119def75d7f80a397f682be96860726832c7c62b46769ce9cfcc15e5844cbcc016facc9b21b4eb9bbb2c17360d
|
||||
f19aea3477f72c5afa51f4b3e4a8adf5 evolution-3.10.4.tar.xz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue