import evolution-3.40.4-9.el9

i9c-beta changed/i9c-beta/evolution-3.40.4-9.el9
MSVSphere Packaging Team 2 years ago
commit e79c91e1a1

@ -0,0 +1,2 @@
2ad33472d280d83737884a0e60a9236793653111 SOURCES/emoji.data
2b480d7dd297d84c1b1321f5c90bd0e35d566433 SOURCES/evolution-3.40.4.tar.xz

2
.gitignore vendored

@ -0,0 +1,2 @@
SOURCES/emoji.data
SOURCES/evolution-3.40.4.tar.xz

@ -0,0 +1,68 @@
From 9bbb9289477c8a61a641b0b67cec367629f1e73a Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Thu, 10 Feb 2022 11:59:36 +0100
Subject: [PATCH] ECompEditor: Timezone can be reset on component save
The libical 3.0.14 contains a change, which unsets non-UTC timezones
in date/time values. That uncovered a bug in the Evolution code, which
expects the timezone will be preserved on re-read from the component,
but it's not always possible. This is corrected by re-setting the timezone
on the used ICalTime value.
---
src/calendar/gui/e-comp-editor-property-part.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/calendar/gui/e-comp-editor-property-part.c b/src/calendar/gui/e-comp-editor-property-part.c
index 6bed833b12..6ce699a2e6 100644
--- a/src/calendar/gui/e-comp-editor-property-part.c
+++ b/src/calendar/gui/e-comp-editor-property-part.c
@@ -913,8 +913,15 @@ ecepp_datetime_fill_component (ECompEditorPropertyPart *property_part,
g_object_unref (prop);
}
} else {
+ ICalTimezone *zone;
+
value = e_comp_editor_property_part_datetime_get_value (part_datetime);
+ zone = value && !i_cal_time_is_null_time (value) ? i_cal_time_get_timezone (value) : NULL;
+
+ if (zone)
+ g_object_ref (zone);
+
if (prop) {
/* Remove the VALUE parameter, to correspond to the actual value being set */
i_cal_property_remove_parameter_by_kind (prop, I_CAL_VALUE_PARAMETER);
@@ -925,6 +932,11 @@ ecepp_datetime_fill_component (ECompEditorPropertyPart *property_part,
g_clear_object (&value);
value = klass->i_cal_get_func (prop);
+ /* The timezone can be dropped since libical 3.0.14, thus restore it
+ before updating the TZID parameter */
+ if (zone && value && !i_cal_time_is_null_time (value) && !i_cal_time_is_date (value))
+ i_cal_time_set_timezone (value, zone);
+
cal_comp_util_update_tzid_parameter (prop, value);
} else {
prop = klass->i_cal_new_func (value);
@@ -933,12 +945,18 @@ ecepp_datetime_fill_component (ECompEditorPropertyPart *property_part,
g_clear_object (&value);
value = klass->i_cal_get_func (prop);
+ /* The timezone can be dropped since libical 3.0.14, thus restore it
+ before updating the TZID parameter */
+ if (zone && value && !i_cal_time_is_null_time (value) && !i_cal_time_is_date (value))
+ i_cal_time_set_timezone (value, zone);
+
cal_comp_util_update_tzid_parameter (prop, value);
i_cal_component_add_property (component, prop);
}
g_clear_object (&value);
g_clear_object (&prop);
+ g_clear_object (&zone);
}
}
--
2.33.1

@ -0,0 +1,56 @@
From e75c4faa36a9eb17b88128e45f9e5d91628149f9 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 4 Oct 2021 17:18:35 +0200
Subject: I#1646 - Emoji picker empty
Embed emoji.data as expected by the copy of the gtk+' emoji chooser dialog.
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1646
diff --git a/data/org.gnome.Evolution.gresource.xml b/data/org.gnome.Evolution.gresource.xml
new file mode 100644
index 0000000000..783ed153b8
--- /dev/null
+++ b/data/org.gnome.Evolution.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<gresources>
+ <gresource prefix="org.gnome.Evolution">
+ <file>emoji.data</file>
+ </gresource>
+</gresources>
diff --git a/src/e-util/CMakeLists.txt b/src/e-util/CMakeLists.txt
index 03b60d8e4b..6f63f29858 100644
--- a/src/e-util/CMakeLists.txt
+++ b/src/e-util/CMakeLists.txt
@@ -30,6 +30,8 @@ if(WIN32)
)
endif(WIN32)
+glib_compile_resources(${CMAKE_SOURCE_DIR}/data/ ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.gresource org_gnome_evolution ../../data/org.gnome.Evolution.gresource.xml ${CMAKE_SOURCE_DIR}/data/emoji.data)
+
# Main libevolution-util
set(DEPENDENCIES
@@ -309,6 +311,8 @@ set(SOURCES
${PLATFORM_SOURCES}
${CMAKE_CURRENT_BINARY_DIR}/e-marshal.c
${CMAKE_CURRENT_BINARY_DIR}/e-util-enumtypes.c
+ ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.gresource.c
+ ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.gresource.h
)
set(HEADERS
diff --git a/src/e-util/e-gtkemojichooser.c b/src/e-util/e-gtkemojichooser.c
index ba4d15ecee..7d8aae3039 100644
--- a/src/e-util/e-gtkemojichooser.c
+++ b/src/e-util/e-gtkemojichooser.c
@@ -444,7 +444,7 @@ populate_emoji_chooser (gpointer data)
if (!chooser->data)
{
- bytes = g_resources_lookup_data ("/org/gtk/libgtk/emoji/emoji.data", 0, NULL);
+ bytes = g_resources_lookup_data ("/org.gnome.Evolution/emoji.data", 0, NULL);
chooser->data = g_variant_ref_sink (g_variant_new_from_bytes (G_VARIANT_TYPE ("a(auss)"), bytes, TRUE));
}

@ -0,0 +1,468 @@
diff -up evolution-3.40.4/data/webkit/e-web-view.js.6 evolution-3.40.4/data/webkit/e-web-view.js
--- evolution-3.40.4/data/webkit/e-web-view.js.6 2023-01-03 18:41:01.198700722 +0100
+++ evolution-3.40.4/data/webkit/e-web-view.js 2023-01-03 18:41:01.215700736 +0100
@@ -730,6 +730,38 @@ Evo.EnsureMainDocumentInitialized = func
Evo.initializeAndPostContentLoaded(null);
}
+Evo.mailDisplayUpdateIFramesHeightRecursive = function(doc)
+{
+ if (!doc)
+ return;
+
+ var ii, iframes;
+
+ iframes = doc.getElementsByTagName("iframe");
+
+ /* Update from bottom to top */
+ for (ii = 0; ii < iframes.length; ii++) {
+ Evo.mailDisplayUpdateIFramesHeightRecursive(iframes[ii].contentDocument);
+ }
+
+ if (!doc.scrollingElement || !doc.defaultView || !doc.defaultView.frameElement)
+ return;
+
+ if (doc.defaultView.frameElement.height == doc.scrollingElement.scrollHeight)
+ doc.defaultView.frameElement.height = 10;
+ doc.defaultView.frameElement.height = doc.scrollingElement.scrollHeight + 2 + (doc.scrollingElement.scrollWidth > doc.scrollingElement.clientWidth ? 20 : 0);
+}
+
+Evo.MailDisplayUpdateIFramesHeight = function()
+{
+ var scrolly = document.defaultView ? document.defaultView.scrollY : -1;
+
+ Evo.mailDisplayUpdateIFramesHeightRecursive(document);
+
+ if (scrolly != -1 && document.defaultView.scrollY != scrolly)
+ document.defaultView.scrollTo(0, scrolly);
+}
+
if (this instanceof Window && this.document) {
this.document.onload = function() { Evo.initializeAndPostContentLoaded(this); };
@@ -815,9 +847,8 @@ Evo.mailDisplayResizeContentToPreviewWid
local_width -= 2; /* 1 + 1 frame borders */
} else if (!iframes.length) {
/* Message main body */
- local_width -= 8; /* 8 + 8 margins of body without iframes */
- if (level > 1)
- local_width -= 8;
+ local_width -= level * 20; /* 10 + 10 margins of body without iframes */
+ local_width -= 4;
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", "body", "width: " + local_width + "px;");
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", ".part-container", "width: " + local_width + "px;");
@@ -827,7 +858,7 @@ Evo.mailDisplayResizeContentToPreviewWid
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", "body",
"width: " + local_width + "px;");
- local_width -= 2; /* 1 + 1 frame borders */
+ local_width -= 4; /* 2 + 2 frame borders */
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", ".part-container-nostyle iframe",
"width: " + local_width + "px;");
@@ -839,19 +870,15 @@ Evo.mailDisplayResizeContentToPreviewWid
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", ".part-container iframe",
"width: " + (local_width - 10) + "px;");
} else {
- local_width -= 20; /* 10 + 10 margins of body with iframes */
- local_width -= 8; /* attachment margin */
- local_width -= 2; /* 1 + 1 frame borders */
+ local_width -= (level - 1) * 20; /* 10 + 10 margins of body with iframes */
+ local_width -= 4; /* 2 + 2 frame borders */
+ local_width -= 10; /* attachment margin */
- /* We need to subtract another 10 pixels from the iframe width to
- * have the iframe's borders on the correct place. We can't subtract
- * it from local_width as we don't want to propagate this change
- * further. */
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", ".part-container-nostyle iframe",
- "width: " + (local_width - 10) + "px;");
+ "width: " + local_width + "px;");
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", "body > .part-container-nostyle iframe",
- "width: " + (local_width - 10) + "px;");
+ "width: " + local_width + "px;");
}
/* Add rules to every sub document */
@@ -862,7 +889,7 @@ Evo.mailDisplayResizeContentToPreviewWid
var tmp_local_width = local_width;
if (level == 0) {
- tmp_local_width -= 8; /* attachment's margin */
+ tmp_local_width -= 10; /* attachment's margin */
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", ".attachment-wrapper iframe:not([src*=\"__formatas=\"])",
"width: " + tmp_local_width + "px;");
@@ -871,7 +898,7 @@ Evo.mailDisplayResizeContentToPreviewWid
"width: " + tmp_local_width + "px;");
Evo.addRuleIntoStyleSheetDocument(doc, "-e-mail-formatter-style-sheet", "body > .part-container-nostyle iframe",
- "width: " + local_width + "px;");
+ "width: " + tmp_local_width + "px;");
}
this.set_iframe_and_body_width (iframes[ii].contentDocument, tmp_local_width, original_width, level + 1);
@@ -884,6 +911,7 @@ Evo.mailDisplayResizeContentToPreviewWid
width -= 20; /* 10 + 10 margins of body */
traversar.set_iframe_and_body_width(document, width, width, 0);
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
Evo.mailDisplayUpdateMagicSpacebarState = function()
@@ -1249,6 +1277,8 @@ Evo.MailDisplayShowAttachment = function
window.webkit.messageHandlers.contentLoaded.postMessage(iframe_id);
Evo.mailDisplayUpdateMagicSpacebarState();
}
+ } else if (elem.ownerDocument.defaultView.frameElement) {
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
}
@@ -1343,8 +1373,10 @@ EvoItip.SetElementInnerHTML = function(i
{
var elem = Evo.FindElement(iframe_id, element_id);
- if (elem)
+ if (elem) {
elem.innerHTML = html_content;
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
+ }
}
EvoItip.SetShowCheckbox = function(iframe_id, element_id, show, update_second)
@@ -1370,6 +1402,8 @@ EvoItip.SetShowCheckbox = function(ifram
if (elem) {
elem.hidden = !show;
}
+
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
}
@@ -1383,6 +1417,8 @@ EvoItip.SetAreaText = function(iframe_id
if (row.lastElementChild) {
row.lastElementChild.innerHTML = text;
}
+
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
}
@@ -1400,6 +1436,8 @@ EvoItip.UpdateTimes = function(iframe_id
if (elem.lastElementChild) {
elem.lastElementChild.innerHTML = label;
}
+
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
}
@@ -1427,6 +1465,8 @@ EvoItip.AppendInfoRow = function(iframe_
cell = row.insertCell(-1);
cell.innerHTML = message;
+
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
EvoItip.RemoveInfoRow = function(iframe_id, row_id)
@@ -1435,6 +1475,7 @@ EvoItip.RemoveInfoRow = function(iframe_
if (row && row.parentNode) {
row.parentNode.removeChild(row);
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
}
@@ -1446,6 +1487,8 @@ EvoItip.RemoveChildNodes = function(ifra
while (elem.lastChild) {
elem.removeChild(elem.lastChild);
}
+
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
}
@@ -1498,6 +1541,8 @@ EvoItip.HideButtons = function(iframe_id
if (button)
button.hidden = true;
}
+
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
}
diff -up evolution-3.40.4/data/webkit/webview.css.6 evolution-3.40.4/data/webkit/webview.css
--- evolution-3.40.4/data/webkit/webview.css.6 2021-08-13 11:50:35.000000000 +0200
+++ evolution-3.40.4/data/webkit/webview.css 2023-01-03 18:41:01.214700735 +0100
@@ -12,8 +12,8 @@ img {
}
body {
- /* Use margin so that children can safely use width=100% */
- margin: 5px 10px 5px 10px;
+ /* Use padding so that children can safely use width=100% */
+ padding: 8px;
}
body, div, p, td {
@@ -38,21 +38,21 @@ img#__evo-contact-photo {
img.navigable {
cursor: pointer;
- margin-right: 4px;
+ padding-right: 4px;
}
.attachments {
background: #FFF;
border: 1px solid silver;
- margin: 10px 10px 10px 10px;
+ padding: 10px 10px 10px 10px;
border-left: 0;
border-right: 0;
border-bottom: 0;
}
.attachment {
- margin-left: 8px;
- margin-right: 0px;
+ padding-left: 8px;
+ padding-right: 0px;
}
.attachment td {
@@ -66,21 +66,21 @@ iframe:not([id$=".itip"]) {
.part-container {
height: 100%;
- margin-top: 2px;
- margin-bottom: 2px;
+ padding: 0px;
}
.part-container-nostyle iframe {
- margin-right: 10px;
+ margin: 0px;
+ padding-right: 0px;
}
.part-container-inner-margin {
- margin: 8px;
+ padding: 0px;
}
object { /* GtkWidgets */
- margin-top: 2px;
- margin-bottom: 2px;
+ padding-top: 2px;
+ padding-bottom: 2px;
}
.__evo-highlight {
@@ -166,7 +166,7 @@ th.rtl {
/***** PRINTING *******/
.printing-header {
- margin-bottom: 20px;
+ padding-bottom: 20px;
}
.printing-header h1,
@@ -186,7 +186,7 @@ th.rtl {
/******* ITIP *********/
.itip.icon {
float: left;
- margin-right: 5px;
+ padding-right: 5px;
}
.itip.content {
@@ -195,7 +195,7 @@ th.rtl {
}
.itip.description {
- margin: 5px;
+ padding: 5px;
}
.itip tr {
@@ -219,7 +219,7 @@ th.rtl {
}
#table_row_buttons img {
- margin-right: 5px;
+ padding-right: 5px;
vertical-align: middle;
}
diff -up evolution-3.40.4/src/em-format/e-mail-formatter-text-plain.c.6 evolution-3.40.4/src/em-format/e-mail-formatter-text-plain.c
--- evolution-3.40.4/src/em-format/e-mail-formatter-text-plain.c.6 2021-08-13 11:50:35.000000000 +0200
+++ evolution-3.40.4/src/em-format/e-mail-formatter-text-plain.c 2023-01-03 18:41:01.214700735 +0100
@@ -111,7 +111,7 @@ emfe_text_plain_format (EMailFormatterEx
string =
"<div class=\"part-container pre "
"-e-web-view-background-color -e-web-view-text-color\" "
- "style=\"border: none; padding: 8px; margin: 0;\">";
+ "style=\"border: none; padding: 0; margin: 0;\">";
g_output_stream_write_all (
stream, string, strlen (string),
diff -up evolution-3.40.4/src/mail/e-mail-display.c.6 evolution-3.40.4/src/mail/e-mail-display.c
--- evolution-3.40.4/src/mail/e-mail-display.c.6 2021-08-13 11:50:35.000000000 +0200
+++ evolution-3.40.4/src/mail/e-mail-display.c 2023-01-03 18:41:01.215700736 +0100
@@ -83,6 +83,7 @@ struct _EMailDisplayPrivate {
GSettings *settings;
guint scheduled_reload;
+ guint iframes_height_update_id;
GHashTable *old_settings;
@@ -537,6 +538,43 @@ initialize_web_view_colors (EMailDisplay
e_web_view_get_cancellable (E_WEB_VIEW (display)));
}
+static gboolean
+mail_display_can_use_frame_flattening (void)
+{
+ guint wk_major, wk_minor;
+
+ wk_major = webkit_get_major_version ();
+ wk_minor = webkit_get_minor_version ();
+
+ /* The 2.38 is the last version, which supports frame-flattening;
+ prefer it over the manual and expensive calculations. */
+ return (wk_major < 2) || (wk_major == 2 && wk_minor <= 38);
+}
+
+static gboolean
+mail_display_iframes_height_update_cb (gpointer user_data)
+{
+ EMailDisplay *mail_display = user_data;
+
+ mail_display->priv->iframes_height_update_id = 0;
+
+ e_web_view_jsc_run_script (WEBKIT_WEB_VIEW (mail_display), e_web_view_get_cancellable (E_WEB_VIEW (mail_display)),
+ "Evo.MailDisplayUpdateIFramesHeight();");
+
+ return G_SOURCE_REMOVE;
+}
+
+static void
+mail_display_schedule_iframes_height_update (EMailDisplay *mail_display)
+{
+ if (mail_display_can_use_frame_flattening ())
+ return;
+
+ if (mail_display->priv->iframes_height_update_id)
+ g_source_remove (mail_display->priv->iframes_height_update_id);
+ mail_display->priv->iframes_height_update_id = g_timeout_add (100, mail_display_iframes_height_update_cb, mail_display);
+}
+
static void
mail_display_change_one_attachment_visibility (EMailDisplay *display,
EAttachment *attachment,
@@ -1353,6 +1391,8 @@ mail_display_content_loaded_cb (EWebView
gtk_widget_grab_focus (widget);
}
}
+
+ mail_display_schedule_iframes_height_update (mail_display);
}
static void
@@ -1475,6 +1515,11 @@ mail_display_dispose (GObject *object)
priv->scheduled_reload = 0;
}
+ if (priv->iframes_height_update_id > 0) {
+ g_source_remove (priv->iframes_height_update_id);
+ priv->iframes_height_update_id = 0;
+ }
+
if (priv->settings != NULL) {
g_signal_handlers_disconnect_matched (
priv->settings, G_SIGNAL_MATCH_DATA,
@@ -1600,6 +1645,18 @@ mail_display_magic_spacebar_state_change
}
static void
+mail_display_schedule_iframes_height_update_cb (WebKitUserContentManager *manager,
+ WebKitJavascriptResult *js_result,
+ gpointer user_data)
+{
+ EMailDisplay *mail_display = user_data;
+
+ g_return_if_fail (mail_display != NULL);
+
+ mail_display_schedule_iframes_height_update (mail_display);
+}
+
+static void
mail_display_constructed (GObject *object)
{
EContentRequest *content_request;
@@ -1611,9 +1668,11 @@ mail_display_constructed (GObject *objec
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_mail_display_parent_class)->constructed (object);
- g_object_set (webkit_web_view_get_settings (WEBKIT_WEB_VIEW (object)),
- "enable-frame-flattening", TRUE,
- NULL);
+ if (mail_display_can_use_frame_flattening ()) {
+ g_object_set (webkit_web_view_get_settings (WEBKIT_WEB_VIEW (object)),
+ "enable-frame-flattening", TRUE,
+ NULL);
+ }
display = E_MAIL_DISPLAY (object);
web_view = E_WEB_VIEW (object);
@@ -1661,8 +1720,12 @@ mail_display_constructed (GObject *objec
g_signal_connect_object (manager, "script-message-received::mailDisplayMagicSpacebarStateChanged",
G_CALLBACK (mail_display_magic_spacebar_state_changed_cb), display, 0);
+ g_signal_connect_object (manager, "script-message-received::scheduleIFramesHeightUpdate",
+ G_CALLBACK (mail_display_schedule_iframes_height_update_cb), display, 0);
+
webkit_user_content_manager_register_script_message_handler (manager, "mailDisplayHeadersCollapsed");
webkit_user_content_manager_register_script_message_handler (manager, "mailDisplayMagicSpacebarStateChanged");
+ webkit_user_content_manager_register_script_message_handler (manager, "scheduleIFramesHeightUpdate");
e_extensible_load_extensions (E_EXTENSIBLE (object));
}
diff -up evolution-3.40.4/src/modules/text-highlight/e-mail-formatter-text-highlight.c.6 evolution-3.40.4/src/modules/text-highlight/e-mail-formatter-text-highlight.c
--- evolution-3.40.4/src/modules/text-highlight/e-mail-formatter-text-highlight.c.6 2021-08-13 11:50:35.000000000 +0200
+++ evolution-3.40.4/src/modules/text-highlight/e-mail-formatter-text-highlight.c 2023-01-03 18:41:01.215700736 +0100
@@ -135,16 +135,26 @@ text_hightlight_read_data_thread (gpoint
{
TextHighlightClosure *closure = user_data;
gint nbuffer = 10240;
+ gssize read;
+ gsize wrote = 0;
gchar *buffer;
g_return_val_if_fail (closure != NULL, NULL);
buffer = g_new (gchar, nbuffer);
+ strcpy (buffer, "<style>body{margin:0; padding:8px;}</style>");
+ read = strlen (buffer);
+
+ if (!g_output_stream_write_all (closure->output_stream, buffer, read, &wrote, closure->cancellable, &closure->error) ||
+ (gssize) wrote != read || closure->error) {
+ g_free (buffer);
+ return NULL;
+ }
+
while (!camel_stream_eos (closure->read_stream) &&
!g_cancellable_set_error_if_cancelled (closure->cancellable, &closure->error)) {
- gssize read;
- gsize wrote = 0;
+ wrote = 0;
read = camel_stream_read (closure->read_stream, buffer, nbuffer, closure->cancellable, &closure->error);
if (read < 0 || closure->error)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,104 @@
diff -up evolution-3.40.4/src/shell/e-shell-window.c.7 evolution-3.40.4/src/shell/e-shell-window.c
--- evolution-3.40.4/src/shell/e-shell-window.c.7 2021-08-13 11:50:35.000000000 +0200
+++ evolution-3.40.4/src/shell/e-shell-window.c 2022-09-26 09:33:45.615069941 +0200
@@ -47,6 +47,7 @@ enum {
enum {
CLOSE_ALERT,
SHELL_VIEW_CREATED,
+ UPDATE_NEW_MENU,
LAST_SIGNAL
};
@@ -120,6 +121,17 @@ shell_window_toolbar_update_new_menu (Gt
gtk_menu_tool_button_set_menu (menu_tool_button, menu);
}
+static void
+shell_window_toolbar_update_new_menu_sig (EShellWindow *shell_window,
+ GtkMenuToolButton *menu_tool_button)
+{
+ GtkWidget *menu;
+
+ /* Update the "New" menu tool button submenu. */
+ menu = e_shell_window_create_new_menu (shell_window);
+ gtk_menu_tool_button_set_menu (menu_tool_button, menu);
+}
+
static gboolean
shell_window_active_view_to_prefer_item (GBinding *binding,
const GValue *source_value,
@@ -160,6 +172,8 @@ shell_window_set_notebook_page (EShellWi
g_return_if_fail (page_num >= 0);
gtk_notebook_set_current_page (notebook, page_num);
+
+ g_signal_emit (shell_window, signals[UPDATE_NEW_MENU], 0, NULL);
}
static void
@@ -463,8 +477,8 @@ shell_window_construct_menubar (EShellWi
main_menu, "visible",
G_BINDING_SYNC_CREATE);
- e_signal_connect_notify (
- shell_window, "notify::active-view",
+ g_signal_connect (
+ shell_window, "update-new-menu",
G_CALLBACK (shell_window_menubar_update_new_menu), NULL);
return main_menu;
@@ -544,6 +558,11 @@ shell_window_construct_toolbar (EShellWi
G_CALLBACK (shell_window_toolbar_update_new_menu),
shell_window);
+ g_signal_connect_object (
+ shell_window, "update-new-menu",
+ G_CALLBACK (shell_window_toolbar_update_new_menu_sig),
+ item, 0);
+
gtk_box_pack_start (GTK_BOX (box), toolbar, TRUE, TRUE, 0);
toolbar = e_shell_window_get_managed_widget (
@@ -1133,6 +1152,24 @@ e_shell_window_class_init (EShellWindowC
G_TYPE_NONE, 1,
E_TYPE_SHELL_VIEW);
+ /*
+ * EShellWindow::update-new-menu
+ * @shell_window: the #EShellWindow
+ *
+ * Emitted when the 'New' menu should be updated.
+ *
+ * Since: 3.44.5
+ */
+ signals[UPDATE_NEW_MENU] = g_signal_new (
+ "update-new-menu",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0,
+ G_TYPE_NONE);
+
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (
binding_set, GDK_KEY_Escape, 0, "close-alert", 0);
@@ -2048,6 +2085,8 @@ e_shell_window_register_new_item_actions
G_OBJECT (action),
"primary", GINT_TO_POINTER (TRUE));
}
+
+ g_signal_emit (shell_window, signals[UPDATE_NEW_MENU], 0, NULL);
}
/**
@@ -2125,6 +2164,8 @@ e_shell_window_register_new_source_actio
G_OBJECT (action),
"backend-name", (gpointer) backend_name);
}
+
+ g_signal_emit (shell_window, signals[UPDATE_NEW_MENU], 0, NULL);
}
/**

@ -0,0 +1,10 @@
#!/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}|"

@ -0,0 +1,30 @@
#!/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
export WEBKIT_FORCE_SANDBOX=0
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

@ -0,0 +1,51 @@
From ac15857f14eecd83a3a1950588a2f1edb9cb70de Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Fri, 18 Mar 2022 09:45:20 +0100
Subject: [PATCH] I#1835 - Mail: Preview uses wrong colors for HTML mail with
dark theme
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1835
---
data/webkit/e-web-view.js | 12 ++++++++++--
src/em-format/e-mail-formatter-text-html.c | 2 +-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/data/webkit/e-web-view.js b/data/webkit/e-web-view.js
index 7f47fe4b26..a8f99c4668 100644
--- a/data/webkit/e-web-view.js
+++ b/data/webkit/e-web-view.js
@@ -695,8 +695,16 @@ Evo.initialize = function(elem)
if (doc.documentElement.style.getPropertyValue("color") == "" ||
doc.documentElement.style.getPropertyValue("color") == "text") {
- doc.documentElement.style.setProperty("color", "inherit");
- doc.documentElement.style.setProperty("background-color", "inherit");
+ if (doc.defaultView && doc.defaultView.frameElement && !doc.defaultView.frameElement.hasAttribute("x-e-unset-colors") &&
+ doc.defaultView.frameElement.ownerDocument &&
+ doc.defaultView.frameElement.ownerDocument.defaultView &&
+ doc.defaultView.frameElement.ownerDocument.defaultView.window) {
+ var style = doc.defaultView.frameElement.ownerDocument.defaultView.window.getComputedStyle(doc.defaultView.frameElement);
+ if (style) {
+ doc.documentElement.style.setProperty("color", style.color);
+ doc.documentElement.style.setProperty("background-color", style.backgroundColor);
+ }
+ }
}
elems = doc.querySelectorAll("input, textarea, select, button, label");
diff --git a/src/em-format/e-mail-formatter-text-html.c b/src/em-format/e-mail-formatter-text-html.c
index 708c29a5e4..8a938212ff 100644
--- a/src/em-format/e-mail-formatter-text-html.c
+++ b/src/em-format/e-mail-formatter-text-html.c
@@ -369,7 +369,7 @@ emfe_text_html_format (EMailFormatterExtension *extension,
e_mail_part_get_id (part),
e_mail_part_get_id (part),
e_mail_part_get_frame_security_style (part),
- g_settings_get_boolean (settings, "preview-unset-html-colors") ? "x-e-unset-colors=\"1\"" : "style=\"background-color: #ffffff;\"");
+ g_settings_get_boolean (settings, "preview-unset-html-colors") ? "x-e-unset-colors=\"1\"" : "style=\"background-color:white; color:black;\"");
g_output_stream_write_all (
stream, str, strlen (str),
--
GitLab

@ -0,0 +1,27 @@
From eb62ccaa28bbbca7668913ce7d8056a6d75f9b05 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Thu, 21 Apr 2022 16:59:34 +0200
Subject: [PATCH] Disable hardware acceleration for WebKitGTK
This should help with crashes related to hardware acceleration
on some machines, as being discussed at:
https://bugs.webkit.org/show_bug.cgi?id=239429
---
src/e-util/e-web-view.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/e-util/e-web-view.c b/src/e-util/e-web-view.c
index 9ab13b69cc..68f86e8c59 100644
--- a/src/e-util/e-web-view.c
+++ b/src/e-util/e-web-view.c
@@ -3617,6 +3617,7 @@ e_web_view_get_default_webkit_settings (void)
"enable-plugins", FALSE,
"enable-smooth-scrolling", FALSE,
"media-playback-allows-inline", FALSE,
+ "hardware-acceleration-policy", WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER,
NULL);
e_web_view_utils_apply_minimum_font_size (settings);
--
GitLab

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save