Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

29 changed files with 2178 additions and 2791 deletions

View File

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

3
.gitignore vendored
View File

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

View File

@ -1,44 +0,0 @@
diff -up evolution-data-server-3.28.5/cmake/modules/PrintableOptions.cmake.cmake-variable-name-comparison evolution-data-server-3.28.5/cmake/modules/PrintableOptions.cmake
--- evolution-data-server-3.28.5/cmake/modules/PrintableOptions.cmake.cmake-variable-name-comparison 2021-06-16 16:45:58.554763738 +0200
+++ evolution-data-server-3.28.5/cmake/modules/PrintableOptions.cmake 2021-06-16 16:47:13.343021509 +0200
@@ -19,32 +19,32 @@
# prints all the build options previously added with the above functions
macro(add_printable_variable_bare _name)
- if(_name STREQUAL "")
+ if("${_name}" STREQUAL "")
message(FATAL_ERROR "variable name cannot be empty")
- endif(_name STREQUAL "")
+ endif("${_name}" STREQUAL "")
list(APPEND _printable_options ${_name})
endmacro()
macro(add_printable_option _name _description _default_value)
- if(_name STREQUAL "")
+ if("${_name}" STREQUAL "")
message(FATAL_ERROR "option name cannot be empty")
- endif(_name STREQUAL "")
+ endif("${_name}" STREQUAL "")
option(${_name} ${_description} ${_default_value})
add_printable_variable_bare(${_name})
endmacro()
macro(add_printable_variable _name _description _default_value)
- if(_name STREQUAL "")
+ if("${_name}" STREQUAL "")
message(FATAL_ERROR "variable name cannot be empty")
- endif(_name STREQUAL "")
+ endif("${_name}" STREQUAL "")
set(${_name} ${_default_value} CACHE STRING ${_description})
add_printable_variable_bare(${_name})
endmacro()
macro(add_printable_variable_path _name _description _default_value)
- if(_name STREQUAL "")
+ if("${_name}" STREQUAL "")
message(FATAL_ERROR "path variable name cannot be empty")
- endif(_name STREQUAL "")
+ endif("${_name}" STREQUAL "")
set(${_name} ${_default_value} CACHE PATH ${_description})
add_printable_variable_bare(${_name})
endmacro()

View File

@ -1,37 +0,0 @@
diff --git a/src/e-util/e-collection-account-wizard.c b/src/e-util/e-collection-account-wizard.c
index 49b1ac4a96..84ccd3fd53 100644
--- a/src/e-util/e-collection-account-wizard.c
+++ b/src/e-util/e-collection-account-wizard.c
@@ -1858,8 +1858,6 @@ collection_account_wizard_dispose (GObject *object)
wizard->priv->store_passwords = NULL;
}
- g_warn_if_fail (wizard->priv->running_result == NULL);
-
if (wizard->priv->running_result) {
e_simple_async_result_complete_idle (wizard->priv->running_result);
g_clear_object (&wizard->priv->running_result);
diff --git a/src/e-util/e-config-lookup.c b/src/e-util/e-config-lookup.c
index d0eff38ef2..3b68fa6876 100644
--- a/src/e-util/e-config-lookup.c
+++ b/src/e-util/e-config-lookup.c
@@ -277,6 +277,11 @@ config_lookup_dispose (GObject *object)
e_config_lookup_cancel_all (config_lookup);
+ if (config_lookup->priv->pool) {
+ g_thread_pool_free (config_lookup->priv->pool, TRUE, TRUE);
+ config_lookup->priv->pool = NULL;
+ }
+
g_mutex_lock (&config_lookup->priv->property_lock);
g_clear_object (&config_lookup->priv->run_cancellable);
@@ -305,7 +310,6 @@ config_lookup_finalize (GObject *object)
EConfigLookup *config_lookup = E_CONFIG_LOOKUP (object);
g_slist_free_full (config_lookup->priv->results, g_object_unref);
- g_thread_pool_free (config_lookup->priv->pool, TRUE, FALSE);
g_mutex_clear (&config_lookup->priv->property_lock);
/* Chain up to parent's method. */

View File

@ -1,17 +0,0 @@
diff -up evolution-3.28.5/src/addressbook/gui/widgets/eab-contact-merging.c.contacts-prefer-orig-value evolution-3.28.5/src/addressbook/gui/widgets/eab-contact-merging.c
--- evolution-3.28.5/src/addressbook/gui/widgets/eab-contact-merging.c.contacts-prefer-orig-value 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/addressbook/gui/widgets/eab-contact-merging.c 2022-09-15 08:19:23.228037822 +0200
@@ -512,7 +512,12 @@ mergeit (EContactMergingLookup *lookup)
G_CALLBACK (dropdown_changed), data);
g_object_set_data_full (G_OBJECT (dropdown), "eab-contact-merging::dropdown-data", data, g_free);
- if (field == E_CONTACT_NICKNAME || field == E_CONTACT_GIVEN_NAME || field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_FULL_NAME)
+ /* Only prefer the original value when it's filled */
+ if (string1 && *string1 && (
+ field == E_CONTACT_NICKNAME ||
+ field == E_CONTACT_GIVEN_NAME ||
+ field == E_CONTACT_FAMILY_NAME ||
+ field == E_CONTACT_FULL_NAME))
gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 1);
else
gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);

View File

@ -1,314 +0,0 @@
diff -up evolution-3.28.5/src/calendar/gui/e-comp-editor.c.crash-empty-attendee evolution-3.28.5/src/calendar/gui/e-comp-editor.c
--- evolution-3.28.5/src/calendar/gui/e-comp-editor.c.crash-empty-attendee 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/calendar/gui/e-comp-editor.c 2020-05-15 12:24:47.067773299 +0200
@@ -112,10 +112,10 @@ ece_restore_focus (ECompEditor *comp_edi
g_return_if_fail (E_IS_COMP_EDITOR (comp_editor));
if (comp_editor->priv->restore_focus) {
- gtk_widget_grab_focus (comp_editor->priv->restore_focus);
-
if (GTK_IS_ENTRY (comp_editor->priv->restore_focus))
- gtk_editable_set_position (GTK_EDITABLE (comp_editor->priv->restore_focus), 0);
+ gtk_entry_grab_focus_without_selecting (GTK_ENTRY (comp_editor->priv->restore_focus));
+ else
+ gtk_widget_grab_focus (comp_editor->priv->restore_focus);
comp_editor->priv->restore_focus = NULL;
}
@@ -2610,6 +2610,7 @@ e_comp_editor_fill_component (ECompEdito
icalcomponent *component)
{
ECompEditorClass *comp_editor_class;
+ GtkWidget *focused_widget;
gboolean is_valid;
g_return_val_if_fail (E_IS_COMP_EDITOR (comp_editor), FALSE);
@@ -2619,8 +2620,34 @@ e_comp_editor_fill_component (ECompEdito
g_return_val_if_fail (comp_editor_class != NULL, FALSE);
g_return_val_if_fail (comp_editor_class->fill_component != NULL, FALSE);
+ focused_widget = gtk_window_get_focus (GTK_WINDOW (comp_editor));
+ if (focused_widget) {
+ GtkWidget *parent, *ce_widget = GTK_WIDGET (comp_editor);
+
+ /* When a cell-renderer is focused and editing the cell content,
+ then unfocus it may mean to free the currently focused widget,
+ thus get the GtkTreeView in such cases. */
+ parent = focused_widget;
+ while (parent = gtk_widget_get_parent (parent), parent && parent != ce_widget) {
+ if (GTK_IS_TREE_VIEW (parent)) {
+ focused_widget = parent;
+ break;
+ }
+ }
+
+ /* Save any pending changes */
+ gtk_window_set_focus (GTK_WINDOW (comp_editor), NULL);
+ }
+
is_valid = comp_editor_class->fill_component (comp_editor, component);
+ if (focused_widget) {
+ if (GTK_IS_ENTRY (focused_widget))
+ gtk_entry_grab_focus_without_selecting (GTK_ENTRY (focused_widget));
+ else
+ gtk_widget_grab_focus (focused_widget);
+ }
+
if (is_valid && comp_editor->priv->validation_alert) {
e_alert_response (comp_editor->priv->validation_alert, GTK_RESPONSE_CLOSE);
g_clear_object (&comp_editor->priv->validation_alert);
diff -up evolution-3.28.5/src/calendar/gui/e-comp-editor-event.c.crash-empty-attendee evolution-3.28.5/src/calendar/gui/e-comp-editor-event.c
--- evolution-3.28.5/src/calendar/gui/e-comp-editor-event.c.crash-empty-attendee 2020-05-15 12:23:49.488776711 +0200
+++ evolution-3.28.5/src/calendar/gui/e-comp-editor-event.c 2020-05-15 12:24:47.064773299 +0200
@@ -67,14 +67,14 @@ ece_event_update_times (ECompEditorEvent
EDateEdit *date_edit,
gboolean change_end_datetime)
{
- GtkWidget *widget;
guint flags;
g_return_if_fail (E_IS_COMP_EDITOR_EVENT (event_editor));
g_return_if_fail (E_IS_DATE_EDIT (date_edit));
- widget = e_date_edit_get_entry (date_edit);
- if (widget && gtk_widget_has_focus (widget))
+ if (e_date_edit_has_focus (date_edit) ||
+ !e_date_edit_date_is_valid (date_edit) ||
+ !e_date_edit_time_is_valid (date_edit))
return;
if (!e_comp_editor_get_updating (E_COMP_EDITOR (event_editor))) {
diff -up evolution-3.28.5/src/calendar/gui/e-comp-editor-property-part.c.crash-empty-attendee evolution-3.28.5/src/calendar/gui/e-comp-editor-property-part.c
--- evolution-3.28.5/src/calendar/gui/e-comp-editor-property-part.c.crash-empty-attendee 2020-05-15 12:24:06.520775702 +0200
+++ evolution-3.28.5/src/calendar/gui/e-comp-editor-property-part.c 2020-05-15 12:30:44.589752111 +0200
@@ -589,6 +589,23 @@ struct _ECompEditorPropertyPartDatetimeP
G_DEFINE_ABSTRACT_TYPE (ECompEditorPropertyPartDatetime, e_comp_editor_property_part_datetime, E_TYPE_COMP_EDITOR_PROPERTY_PART)
static void
+ecepp_datetime_changed_cb (ECompEditorPropertyPart *property_part)
+{
+ GtkWidget *edit_widget;
+
+ g_return_if_fail (E_IS_COMP_EDITOR_PROPERTY_PART_DATETIME (property_part));
+
+ edit_widget = e_comp_editor_property_part_get_edit_widget (property_part);
+
+ if (!edit_widget || e_date_edit_has_focus (E_DATE_EDIT (edit_widget)) ||
+ !e_date_edit_date_is_valid (E_DATE_EDIT (edit_widget)) ||
+ !e_date_edit_time_is_valid (E_DATE_EDIT (edit_widget)))
+ return;
+
+ e_comp_editor_property_part_emit_changed (property_part);
+}
+
+static void
ecepp_datetime_create_widgets (ECompEditorPropertyPart *property_part,
GtkWidget **out_label_widget,
GtkWidget **out_edit_widget)
@@ -616,9 +633,9 @@ ecepp_datetime_create_widgets (ECompEdit
gtk_widget_show (*out_edit_widget);
g_signal_connect_swapped (*out_edit_widget, "changed",
- G_CALLBACK (e_comp_editor_property_part_emit_changed), property_part);
+ G_CALLBACK (ecepp_datetime_changed_cb), property_part);
g_signal_connect_swapped (*out_edit_widget, "notify::show-time",
- G_CALLBACK (e_comp_editor_property_part_emit_changed), property_part);
+ G_CALLBACK (ecepp_datetime_changed_cb), property_part);
}
static void
diff -up evolution-3.28.5/src/e-util/e-dateedit.c.crash-empty-attendee evolution-3.28.5/src/e-util/e-dateedit.c
--- evolution-3.28.5/src/e-util/e-dateedit.c.crash-empty-attendee 2020-05-15 12:22:47.352780394 +0200
+++ evolution-3.28.5/src/e-util/e-dateedit.c 2020-05-15 12:24:47.068773299 +0200
@@ -527,6 +527,13 @@ e_date_edit_new (void)
}
static void
+on_time_entry_changed_cb (GtkEditable *editable,
+ EDateEdit *dedit)
+{
+ e_date_edit_check_time_changed (dedit);
+}
+
+static void
create_children (EDateEdit *dedit)
{
EDateEditPrivate *priv;
@@ -636,6 +643,9 @@ create_children (EDateEdit *dedit)
g_signal_connect_after (
child, "focus_out_event",
G_CALLBACK (on_time_entry_focus_out), dedit);
+ g_signal_connect (
+ child, "changed",
+ G_CALLBACK (on_time_entry_changed_cb), dedit);
g_signal_connect_after (
priv->time_combo, "changed",
G_CALLBACK (on_date_edit_time_selected), dedit);
@@ -2000,7 +2010,6 @@ on_date_entry_focus_out (GtkEntry *entry
EDateEdit *dedit)
{
struct tm tmp_tm;
- GtkWidget *msg_dialog;
tmp_tm.tm_year = 0;
tmp_tm.tm_mon = 0;
@@ -2009,21 +2018,9 @@ on_date_entry_focus_out (GtkEntry *entry
e_date_edit_check_date_changed (dedit);
if (!e_date_edit_date_is_valid (dedit)) {
- msg_dialog = gtk_message_dialog_new (
- NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- "%s", _("Invalid Date Value"));
- gtk_dialog_run (GTK_DIALOG (msg_dialog));
- gtk_widget_destroy (msg_dialog);
- e_date_edit_get_date (
- dedit, &tmp_tm.tm_year,
- &tmp_tm.tm_mon, &tmp_tm.tm_mday);
- e_date_edit_set_date (
- dedit, tmp_tm.tm_year,
- tmp_tm.tm_mon, tmp_tm.tm_mday);
- gtk_widget_grab_focus (GTK_WIDGET (entry));
+ gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-warning");
+ gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY, _("Invalid Date Value"));
+ gtk_entry_grab_focus_without_selecting (entry);
return FALSE;
} else if (e_date_edit_get_date (
dedit, &tmp_tm.tm_year, &tmp_tm.tm_mon, &tmp_tm.tm_mday)) {
@@ -2041,6 +2038,10 @@ on_date_entry_focus_out (GtkEntry *entry
dedit->priv->date_set_to_none = TRUE;
e_date_edit_update_date_entry (dedit);
}
+
+ gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
+ gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
+
return FALSE;
}
@@ -2049,23 +2050,17 @@ on_time_entry_focus_out (GtkEntry *entry
GdkEventFocus *event,
EDateEdit *dedit)
{
- GtkWidget *msg_dialog;
-
e_date_edit_check_time_changed (dedit);
if (!e_date_edit_time_is_valid (dedit)) {
- msg_dialog = gtk_message_dialog_new (
- NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- "%s", _("Invalid Time Value"));
- gtk_dialog_run (GTK_DIALOG (msg_dialog));
- gtk_widget_destroy (msg_dialog);
- e_date_edit_set_time (dedit,e_date_edit_get_time (dedit));
- gtk_widget_grab_focus (GTK_WIDGET (entry));
- return FALSE;
+ gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_PRIMARY, "dialog-warning");
+ gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, _("Invalid Time Value"));
+ gtk_entry_grab_focus_without_selecting (entry);
+ } else {
+ gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_PRIMARY, NULL);
+ gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, NULL);
}
+
return FALSE;
}
@@ -2363,7 +2358,7 @@ e_date_edit_check_time_changed (EDateEdi
tmp_tm.tm_min);
if (time_changed) {
- e_date_edit_update_time_entry (dedit);
+ /* Do not call e_date_edit_update_time_entry (dedit); let the user correct the value */
g_signal_emit (dedit, signals[CHANGED], 0);
}
}
@@ -2467,6 +2462,20 @@ e_date_edit_set_date_internal (EDateEdit
}
}
+ if (date_changed) {
+ GtkEntry *entry;
+
+ entry = GTK_ENTRY (dedit->priv->date_entry);
+
+ if (priv->date_is_valid) {
+ gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
+ gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY, NULL);
+ } else {
+ gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, "dialog-warning");
+ gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY, _("Invalid Date Value"));
+ }
+ }
+
return date_changed;
}
@@ -2510,6 +2519,20 @@ e_date_edit_set_time_internal (EDateEdit
}
}
+ if (time_changed) {
+ GtkEntry *entry;
+
+ entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (dedit->priv->time_combo)));
+
+ if (priv->time_is_valid) {
+ gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_PRIMARY, NULL);
+ gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, NULL);
+ } else {
+ gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_PRIMARY, "dialog-warning");
+ gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, _("Invalid Time Value"));
+ }
+ }
+
return time_changed;
}
@@ -2561,3 +2584,13 @@ e_date_edit_get_entry (EDateEdit *dedit)
return GTK_WIDGET (dedit->priv->date_entry);
}
+
+gboolean
+e_date_edit_has_focus (EDateEdit *dedit)
+{
+ g_return_val_if_fail (E_IS_DATE_EDIT (dedit), FALSE);
+
+ return gtk_widget_has_focus (GTK_WIDGET (dedit)) ||
+ (dedit->priv->date_entry && gtk_widget_has_focus (dedit->priv->date_entry)) ||
+ (dedit->priv->time_combo && gtk_widget_has_focus (dedit->priv->time_combo));
+}
diff -up evolution-3.28.5/src/e-util/e-dateedit.h.crash-empty-attendee evolution-3.28.5/src/e-util/e-dateedit.h
--- evolution-3.28.5/src/e-util/e-dateedit.h.crash-empty-attendee 2020-05-15 12:24:41.256773643 +0200
+++ evolution-3.28.5/src/e-util/e-dateedit.h 2020-05-15 12:24:47.068773299 +0200
@@ -211,6 +211,8 @@ void e_date_edit_set_get_time_callback
GtkWidget * e_date_edit_get_entry (EDateEdit *dedit);
+gboolean e_date_edit_has_focus (EDateEdit *dedit);
+
G_END_DECLS
#endif /* E_DATE_EDIT_H */
diff -up evolution-3.28.5/src/modules/calendar/e-cal-shell-content.c.crash-empty-attendee evolution-3.28.5/src/modules/calendar/e-cal-shell-content.c
--- evolution-3.28.5/src/modules/calendar/e-cal-shell-content.c.crash-empty-attendee 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/modules/calendar/e-cal-shell-content.c 2020-05-15 12:21:11.487786075 +0200
@@ -847,9 +847,9 @@ cal_shell_content_get_attendee_prop (ica
while (prop != NULL) {
const gchar *attendee;
- attendee = icalproperty_get_attendee (prop);
+ attendee = itip_strip_mailto (icalproperty_get_attendee (prop));
- if (g_str_equal (itip_strip_mailto (attendee), address))
+ if (attendee && g_ascii_strcasecmp (attendee, address) == 0)
return prop;
prop = icalcomponent_get_next_property (

View File

@ -1,383 +0,0 @@
diff -up evolution-3.28.5/src/em-format/e-mail-formatter-utils.c.cve-2018-15587-reposition-signature-bar evolution-3.28.5/src/em-format/e-mail-formatter-utils.c
--- evolution-3.28.5/src/em-format/e-mail-formatter-utils.c.cve-2018-15587-reposition-signature-bar 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-formatter-utils.c 2019-10-24 16:21:32.730944332 +0200
@@ -549,71 +549,136 @@ e_mail_formatter_format_security_header
EMailPart *part,
guint32 flags)
{
- const gchar* part_id;
- gchar* part_id_prefix;
- GString* tmp;
+ struct _validity_flags {
+ guint32 flags;
+ const gchar *description_complete;
+ const gchar *description_partial;
+ } validity_flags[] = {
+ { E_MAIL_PART_VALIDITY_PGP | E_MAIL_PART_VALIDITY_SIGNED, N_("GPG signed"), N_("partially GPG signed") },
+ { E_MAIL_PART_VALIDITY_PGP | E_MAIL_PART_VALIDITY_ENCRYPTED, N_("GPG encrypted"), N_("partially GPG encrypted") },
+ { E_MAIL_PART_VALIDITY_SMIME | E_MAIL_PART_VALIDITY_SIGNED, N_("S/MIME signed"), N_("partially S/MIME signed") },
+ { E_MAIL_PART_VALIDITY_SMIME | E_MAIL_PART_VALIDITY_ENCRYPTED, N_("S/MIME encrypted"), N_("partially S/MIME encrypted") }
+ };
+ const gchar *part_id;
+ gchar *part_id_prefix;
GQueue queue = G_QUEUE_INIT;
GList *head, *link;
+ guint32 check_valid_flags = 0;
+ gint part_id_prefix_len;
+ gboolean is_partial = FALSE;
+ guint ii;
g_return_if_fail (E_IS_MAIL_PART_HEADERS (part));
/* Get prefix of this PURI */
part_id = e_mail_part_get_id (part);
part_id_prefix = g_strndup (part_id, g_strrstr (part_id, ".") - part_id);
-
- /* Add encryption/signature header */
- tmp = g_string_new ("");
+ part_id_prefix_len = strlen (part_id_prefix);
e_mail_part_list_queue_parts (context->part_list, NULL, &queue);
head = g_queue_peek_head_link (&queue);
- /* Find first secured part. */
- for (link = head; link != NULL; link = g_list_next(link)) {
+ /* Ignore the main message, the headers and the end parts */
+ #define should_skip_part(_id) \
+ (g_strcmp0 (_id, part_id_prefix) == 0 || \
+ (_id && g_str_has_suffix (_id, ".rfc822.end")) || \
+ (_id && strlen (_id) == part_id_prefix_len + 8 /* strlen (".headers") */ && \
+ g_strcmp0 (_id + part_id_prefix_len, ".headers") == 0))
+
+ /* Check parts for this ID. */
+ for (link = head; link != NULL; link = g_list_next (link)) {
EMailPart *mail_part = link->data;
+ const gchar *id = e_mail_part_get_id (mail_part);
- if (!e_mail_part_has_validity (mail_part))
+ if (!e_mail_part_id_has_prefix (mail_part, part_id_prefix))
continue;
- if (!e_mail_part_id_has_prefix (mail_part, part_id_prefix))
+ if (should_skip_part (id))
continue;
- if (e_mail_part_get_validity (mail_part, E_MAIL_PART_VALIDITY_PGP | E_MAIL_PART_VALIDITY_SIGNED)) {
- g_string_append (tmp, _("GPG signed"));
+ if (!e_mail_part_has_validity (mail_part)) {
+ /* A part without validity, thus it's partially signed/encrypted */
+ is_partial = TRUE;
+ } else {
+ guint32 validies = 0;
+ for (ii = 0; ii < G_N_ELEMENTS (validity_flags); ii++) {
+ if (e_mail_part_get_validity (mail_part, validity_flags[ii].flags))
+ validies |= validity_flags[ii].flags;
+ }
+ check_valid_flags |= validies;
}
- if (e_mail_part_get_validity (mail_part, E_MAIL_PART_VALIDITY_PGP | E_MAIL_PART_VALIDITY_ENCRYPTED)) {
- if (tmp->len > 0)
- g_string_append (tmp, ", ");
- g_string_append (tmp, _("GPG encrypted"));
- }
+ /* Do not traverse sub-messages */
+ if (g_str_has_suffix (e_mail_part_get_id (mail_part), ".rfc822") &&
+ !g_str_equal (e_mail_part_get_id (mail_part), part_id_prefix))
+ link = e_mail_formatter_find_rfc822_end_iter (link);
+ }
- if (e_mail_part_get_validity (mail_part, E_MAIL_PART_VALIDITY_SMIME | E_MAIL_PART_VALIDITY_SIGNED)) {
- if (tmp->len > 0)
- g_string_append (tmp, ", ");
- g_string_append (tmp, _("S/MIME signed"));
+ if (check_valid_flags) {
+ GString *tmp;
+
+ if (!is_partial) {
+ for (link = head; link != NULL && !is_partial; link = g_list_next (link)) {
+ EMailPart *mail_part = link->data;
+ const gchar *id = e_mail_part_get_id (mail_part);
+
+ if (!e_mail_part_id_has_prefix (mail_part, part_id_prefix))
+ continue;
+
+ if (should_skip_part (id))
+ continue;
+
+ if (!e_mail_part_has_validity (mail_part)) {
+ /* A part without validity, thus it's partially signed/encrypted */
+ is_partial = TRUE;
+ break;
+ }
+
+ is_partial = !e_mail_part_get_validity (mail_part, check_valid_flags);
+
+ /* Do not traverse sub-messages */
+ if (g_str_has_suffix (e_mail_part_get_id (mail_part), ".rfc822") &&
+ !g_str_equal (e_mail_part_get_id (mail_part), part_id_prefix))
+ link = e_mail_formatter_find_rfc822_end_iter (link);
+ }
}
- if (e_mail_part_get_validity (mail_part, E_MAIL_PART_VALIDITY_SMIME | E_MAIL_PART_VALIDITY_ENCRYPTED)) {
- if (tmp->len > 0)
- g_string_append (tmp, ", ");
- g_string_append (tmp, _("S/MIME encrypted"));
+ /* Add encryption/signature header */
+ tmp = g_string_new ("");
+
+ for (link = head; link; link = g_list_next (link)) {
+ EMailPart *mail_part = link->data;
+ const gchar *id = e_mail_part_get_id (mail_part);
+
+ if (!e_mail_part_has_validity (mail_part) ||
+ !e_mail_part_id_has_prefix (mail_part, part_id_prefix))
+ continue;
+
+ if (should_skip_part (id))
+ continue;
+
+ for (ii = 0; ii < G_N_ELEMENTS (validity_flags); ii++) {
+ if (e_mail_part_get_validity (mail_part, validity_flags[ii].flags)) {
+ if (tmp->len > 0)
+ g_string_append (tmp, ", ");
+ g_string_append (tmp, is_partial ? _(validity_flags[ii].description_partial) : _(validity_flags[ii].description_complete));
+ }
+ }
+
+ break;
}
- break;
- }
+ if (tmp->len > 0)
+ e_mail_formatter_format_header (formatter, buffer, _("Security"), tmp->str, flags, "UTF-8");
- if (tmp->len > 0) {
- e_mail_formatter_format_header (
- formatter, buffer,
- _("Security"), tmp->str,
- flags,
- "UTF-8");
+ g_string_free (tmp, TRUE);
}
+ #undef should_skip_part
+
while (!g_queue_is_empty (&queue))
g_object_unref (g_queue_pop_head (&queue));
- g_string_free (tmp, TRUE);
g_free (part_id_prefix);
}
diff -up evolution-3.28.5/src/em-format/e-mail-parser-application-smime.c.cve-2018-15587-reposition-signature-bar evolution-3.28.5/src/em-format/e-mail-parser-application-smime.c
--- evolution-3.28.5/src/em-format/e-mail-parser-application-smime.c.cve-2018-15587-reposition-signature-bar 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-parser-application-smime.c 2019-10-24 16:21:32.730944332 +0200
@@ -22,6 +22,7 @@
#include <e-util/e-util.h>
+#include "e-mail-formatter-utils.h"
#include "e-mail-parser-extension.h"
#include "e-mail-part-utils.h"
@@ -104,6 +105,10 @@ empe_app_smime_parse (EMailParserExtensi
mail_part, valid,
E_MAIL_PART_VALIDITY_ENCRYPTED |
E_MAIL_PART_VALIDITY_SMIME);
+
+ /* Do not traverse sub-messages */
+ if (g_str_has_suffix (e_mail_part_get_id (mail_part), ".rfc822"))
+ link = e_mail_formatter_find_rfc822_end_iter (link);
}
e_queue_transfer (&work_queue, out_mail_parts);
diff -up evolution-3.28.5/src/em-format/e-mail-parser.c.cve-2018-15587-reposition-signature-bar evolution-3.28.5/src/em-format/e-mail-parser.c
--- evolution-3.28.5/src/em-format/e-mail-parser.c.cve-2018-15587-reposition-signature-bar 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-parser.c 2019-10-24 16:21:32.729944332 +0200
@@ -79,6 +79,67 @@ GType e_mail_parser_application_smime_ge
static gpointer parent_class;
static void
+mail_parser_move_security_before_headers (GQueue *part_queue)
+{
+ GList *link, *last_headers = NULL;
+ GSList *headers_stack = NULL;
+
+ link = g_queue_peek_head_link (part_queue);
+ while (link) {
+ EMailPart *part = link->data;
+ const gchar *id;
+
+ if (!part) {
+ link = g_list_next (link);
+ continue;
+ }
+
+ id = e_mail_part_get_id (part);
+ if (!id) {
+ link = g_list_next (link);
+ continue;
+ }
+
+ if (g_str_has_suffix (id, ".rfc822")) {
+ headers_stack = g_slist_prepend (headers_stack, last_headers);
+ last_headers = NULL;
+ } else if (g_str_has_suffix (id, ".rfc822.end")) {
+ g_warn_if_fail (headers_stack != NULL);
+
+ if (headers_stack) {
+ last_headers = headers_stack->data;
+ headers_stack = g_slist_remove (headers_stack, last_headers);
+ } else {
+ last_headers = NULL;
+ }
+ }
+
+ if (g_strcmp0 (e_mail_part_get_mime_type (part), "application/vnd.evolution.headers") == 0) {
+ last_headers = link;
+ link = g_list_next (link);
+ } else if (g_strcmp0 (e_mail_part_get_mime_type (part), "application/vnd.evolution.secure-button") == 0) {
+ g_warn_if_fail (last_headers != NULL);
+
+ if (last_headers) {
+ GList *next = g_list_next (link);
+
+ g_warn_if_fail (g_queue_remove (part_queue, part));
+ g_queue_insert_before (part_queue, last_headers, part);
+
+ link = next;
+ } else {
+ link = g_list_next (link);
+ }
+ } else {
+ link = g_list_next (link);
+ }
+ }
+
+ g_warn_if_fail (headers_stack == NULL);
+ g_slist_free (headers_stack);
+}
+
+static void
mail_parser_run (EMailParser *parser,
EMailPartList *part_list,
GCancellable *cancellable)
@@ -132,6 +193,8 @@ mail_parser_run (EMailParser *parser,
break;
}
+ mail_parser_move_security_before_headers (&mail_part_queue);
+
while (!g_queue_is_empty (&mail_part_queue)) {
mail_part = g_queue_pop_head (&mail_part_queue);
e_mail_part_list_add_part (part_list, mail_part);
diff -up evolution-3.28.5/src/em-format/e-mail-parser-inlinepgp-encrypted.c.cve-2018-15587-reposition-signature-bar evolution-3.28.5/src/em-format/e-mail-parser-inlinepgp-encrypted.c
--- evolution-3.28.5/src/em-format/e-mail-parser-inlinepgp-encrypted.c.cve-2018-15587-reposition-signature-bar 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-parser-inlinepgp-encrypted.c 2019-10-24 16:21:32.730944332 +0200
@@ -22,6 +22,7 @@
#include <e-util/e-util.h>
+#include "e-mail-formatter-utils.h"
#include "e-mail-parser-extension.h"
#include "e-mail-part-utils.h"
@@ -135,6 +136,10 @@ empe_inlinepgp_encrypted_parse (EMailPar
mail_part, valid,
E_MAIL_PART_VALIDITY_ENCRYPTED |
E_MAIL_PART_VALIDITY_PGP);
+
+ /* Do not traverse sub-messages */
+ if (g_str_has_suffix (e_mail_part_get_id (mail_part), ".rfc822"))
+ link = e_mail_formatter_find_rfc822_end_iter (link);
}
e_queue_transfer (&work_queue, out_mail_parts);
diff -up evolution-3.28.5/src/em-format/e-mail-parser-inlinepgp-signed.c.cve-2018-15587-reposition-signature-bar evolution-3.28.5/src/em-format/e-mail-parser-inlinepgp-signed.c
--- evolution-3.28.5/src/em-format/e-mail-parser-inlinepgp-signed.c.cve-2018-15587-reposition-signature-bar 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-parser-inlinepgp-signed.c 2019-10-24 16:21:32.731944332 +0200
@@ -22,6 +22,7 @@
#include <e-util/e-util.h>
+#include "e-mail-formatter-utils.h"
#include "e-mail-parser-extension.h"
#include "e-mail-part-utils.h"
@@ -142,6 +143,10 @@ empe_inlinepgp_signed_parse (EMailParser
mail_part, valid,
E_MAIL_PART_VALIDITY_SIGNED |
E_MAIL_PART_VALIDITY_PGP);
+
+ /* Do not traverse sub-messages */
+ if (g_str_has_suffix (e_mail_part_get_id (mail_part), ".rfc822"))
+ link = e_mail_formatter_find_rfc822_end_iter (link);
}
e_queue_transfer (&work_queue, out_mail_parts);
diff -up evolution-3.28.5/src/em-format/e-mail-parser-multipart-encrypted.c.cve-2018-15587-reposition-signature-bar evolution-3.28.5/src/em-format/e-mail-parser-multipart-encrypted.c
--- evolution-3.28.5/src/em-format/e-mail-parser-multipart-encrypted.c.cve-2018-15587-reposition-signature-bar 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-parser-multipart-encrypted.c 2019-10-24 16:21:32.731944332 +0200
@@ -21,6 +21,7 @@
#include <libedataserver/libedataserver.h>
+#include "e-mail-formatter-utils.h"
#include "e-mail-parser-extension.h"
#include "e-mail-part-utils.h"
@@ -126,6 +127,10 @@ empe_mp_encrypted_parse (EMailParserExte
mail_part, valid,
E_MAIL_PART_VALIDITY_ENCRYPTED |
E_MAIL_PART_VALIDITY_PGP);
+
+ /* Do not traverse sub-messages */
+ if (g_str_has_suffix (e_mail_part_get_id (mail_part), ".rfc822"))
+ link = e_mail_formatter_find_rfc822_end_iter (link);
}
e_queue_transfer (&work_queue, out_mail_parts);
diff -up evolution-3.28.5/src/em-format/e-mail-parser-multipart-signed.c.cve-2018-15587-reposition-signature-bar evolution-3.28.5/src/em-format/e-mail-parser-multipart-signed.c
--- evolution-3.28.5/src/em-format/e-mail-parser-multipart-signed.c.cve-2018-15587-reposition-signature-bar 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-parser-multipart-signed.c 2019-10-24 16:21:32.731944332 +0200
@@ -21,6 +21,7 @@
#include <libedataserver/libedataserver.h>
+#include "e-mail-formatter-utils.h"
#include "e-mail-parser-extension.h"
#include "e-mail-part-utils.h"
@@ -170,6 +171,10 @@ empe_mp_signed_parse (EMailParserExtensi
e_mail_part_update_validity (
mail_part, valid,
validity_type | E_MAIL_PART_VALIDITY_SIGNED);
+
+ /* Do not traverse sub-messages */
+ if (g_str_has_suffix (e_mail_part_get_id (mail_part), ".rfc822"))
+ link = e_mail_formatter_find_rfc822_end_iter (link);
}
e_queue_transfer (&work_queue, out_mail_parts);
diff -up evolution-3.28.5/src/em-format/e-mail-part.c.cve-2018-15587-reposition-signature-bar evolution-3.28.5/src/em-format/e-mail-part.c
--- evolution-3.28.5/src/em-format/e-mail-part.c.cve-2018-15587-reposition-signature-bar 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-part.c 2019-10-24 16:21:32.731944332 +0200
@@ -662,6 +662,15 @@ e_mail_part_update_validity (EMailPart *
mask = E_MAIL_PART_VALIDITY_PGP | E_MAIL_PART_VALIDITY_SMIME;
+ /* Auto-add flags when the related part is present */
+ if (!(validity_type & E_MAIL_PART_VALIDITY_SIGNED) &&
+ validity->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)
+ validity_type |= E_MAIL_PART_VALIDITY_SIGNED;
+
+ if (!(validity_type & E_MAIL_PART_VALIDITY_ENCRYPTED) &&
+ validity->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE)
+ validity_type |= E_MAIL_PART_VALIDITY_ENCRYPTED;
+
pair = mail_part_find_validity_pair (part, validity_type & mask);
if (pair != NULL) {
pair->validity_type |= validity_type;

View File

@ -1,46 +0,0 @@
diff -up evolution-3.28.5/src/modules/calendar/e-cal-base-shell-sidebar.c.deselect-task-memo-list evolution-3.28.5/src/modules/calendar/e-cal-base-shell-sidebar.c
--- evolution-3.28.5/src/modules/calendar/e-cal-base-shell-sidebar.c.deselect-task-memo-list 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/modules/calendar/e-cal-base-shell-sidebar.c 2018-10-01 12:20:09.864492453 +0200
@@ -296,6 +296,7 @@ typedef struct _OpenClientData {
ECalBaseShellSidebar *sidebar;
ESource *source;
EClient *client;
+ gboolean was_cancelled;
} OpenClientData;
static void
@@ -304,9 +305,14 @@ open_client_data_free (gpointer pdata)
OpenClientData *data = pdata;
if (data) {
+ /* To free the cancellable in the 'value' pair, which is useless now */
+ g_hash_table_insert (data->sidebar->priv->selected_uids,
+ g_strdup (e_source_get_uid (data->source)),
+ NULL);
+
if (data->client) {
g_signal_emit (data->sidebar, signals[CLIENT_OPENED], 0, data->client);
- } else {
+ } else if (!data->was_cancelled) {
ESourceSelector *selector = e_cal_base_shell_sidebar_get_selector (data->sidebar);
e_source_selector_unselect_source (selector, data->source);
}
@@ -333,6 +339,7 @@ e_cal_base_shell_sidebar_open_client_thr
selector = E_CLIENT_SELECTOR (e_cal_base_shell_sidebar_get_selector (data->sidebar));
data->client = e_client_selector_get_client_sync (
selector, data->source, TRUE, (guint32) -1, cancellable, &local_error);
+ data->was_cancelled = g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
e_util_propagate_open_source_job_error (job_data, data->extension_name, local_error, error);
}
@@ -350,6 +357,10 @@ e_cal_base_shell_sidebar_ensure_source_o
g_return_if_fail (E_IS_CAL_BASE_SHELL_SIDEBAR (sidebar));
g_return_if_fail (E_IS_SOURCE (source));
+ /* Skip it when it's already opening or opened */
+ if (g_hash_table_contains (sidebar->priv->selected_uids, e_source_get_uid (source)))
+ return;
+
shell_view = e_shell_sidebar_get_shell_view (E_SHELL_SIDEBAR (sidebar));
switch (e_cal_base_shell_view_get_source_type (shell_view)) {

View File

@ -1,156 +0,0 @@
diff -up evolution-3.28.5/src/e-util/e-calendar-item.c.ecalendaritem-settings evolution-3.28.5/src/e-util/e-calendar-item.c
--- evolution-3.28.5/src/e-util/e-calendar-item.c.ecalendaritem-settings 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/e-util/e-calendar-item.c 2020-09-30 15:16:45.798634705 +0200
@@ -45,6 +45,7 @@ static const gint e_calendar_item_days_i
e_calendar_item_days_in_month[month] + (((month) == 1 \
&& ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))) ? 1 : 0)
+static void e_calendar_item_constructed (GObject *object);
static void e_calendar_item_dispose (GObject *object);
static void e_calendar_item_get_property (GObject *object,
guint property_id,
@@ -264,6 +265,7 @@ e_calendar_item_class_init (ECalendarIte
GnomeCanvasItemClass *item_class;
object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = e_calendar_item_constructed;
object_class->dispose = e_calendar_item_dispose;
object_class->get_property = e_calendar_item_get_property;
object_class->set_property = e_calendar_item_set_property;
@@ -637,6 +639,16 @@ e_calendar_item_init (ECalendarItem *cal
}
static void
+e_calendar_item_constructed (GObject *object)
+{
+ ECalendarItem *calitem = E_CALENDAR_ITEM (object);
+
+ G_OBJECT_CLASS (e_calendar_item_parent_class)->constructed (object);
+
+ e_extensible_load_extensions (E_EXTENSIBLE (calitem));
+}
+
+static void
e_calendar_item_dispose (GObject *object)
{
ECalendarItem *calitem;
@@ -787,28 +799,32 @@ e_calendar_item_set_property (GObject *o
dvalue = g_value_get_double (value);
if (calitem->x1 != dvalue) {
calitem->x1 = dvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_Y1:
dvalue = g_value_get_double (value);
if (calitem->y1 != dvalue) {
calitem->y1 = dvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_X2:
dvalue = g_value_get_double (value);
if (calitem->x2 != dvalue) {
calitem->x2 = dvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_Y2:
dvalue = g_value_get_double (value);
if (calitem->y2 != dvalue) {
calitem->y2 = dvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_FONT_DESC:
@@ -816,21 +832,24 @@ e_calendar_item_set_property (GObject *o
if (calitem->font_desc)
pango_font_description_free (calitem->font_desc);
calitem->font_desc = pango_font_description_copy (font_desc);
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
return;
case PROP_WEEK_NUMBER_FONT_DESC:
font_desc = g_value_get_boxed (value);
if (calitem->week_number_font_desc)
pango_font_description_free (calitem->week_number_font_desc);
calitem->week_number_font_desc = pango_font_description_copy (font_desc);
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
return;
case PROP_MINIMUM_ROWS:
ivalue = g_value_get_int (value);
ivalue = MAX (1, ivalue);
if (calitem->min_rows != ivalue) {
calitem->min_rows = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_MINIMUM_COLUMNS:
@@ -838,35 +857,40 @@ e_calendar_item_set_property (GObject *o
ivalue = MAX (1, ivalue);
if (calitem->min_cols != ivalue) {
calitem->min_cols = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_MAXIMUM_ROWS:
ivalue = g_value_get_int (value);
if (calitem->max_rows != ivalue) {
calitem->max_rows = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_MAXIMUM_COLUMNS:
ivalue = g_value_get_int (value);
if (calitem->max_cols != ivalue) {
calitem->max_cols = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_WEEK_START_DAY:
ivalue = g_value_get_enum (value);
if (calitem->week_start_day != ivalue) {
calitem->week_start_day = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_SHOW_WEEK_NUMBERS:
bvalue = g_value_get_boolean (value);
if (calitem->show_week_numbers != bvalue) {
calitem->show_week_numbers = bvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_KEEP_WDAYS_ON_WEEKNUM_CLICK:
@@ -908,8 +932,6 @@ e_calendar_item_realize (GnomeCanvasItem
calitem = E_CALENDAR_ITEM (item);
e_calendar_item_style_updated (GTK_WIDGET (item->canvas), calitem);
-
- e_extensible_load_extensions (E_EXTENSIBLE (calitem));
}
static void

View File

@ -1,66 +0,0 @@
diff -up evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c.extra-new-line-before-url evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c
--- evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c.extra-new-line-before-url 2018-09-03 15:40:14.491506323 +0200
+++ evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c 2018-09-03 15:40:14.494506323 +0200
@@ -1319,6 +1319,44 @@ test_issue_86 (TestFixture *fixture)
g_free (converted);
}
+static void
+test_issue_103 (TestFixture *fixture)
+{
+ #define LONG_URL "https://www.example.com/123456789012345678901234567890123456789012345678901234567890"
+ #define SHORTER_URL "https://www.example.com/1234567890123456789012345678901234567890"
+ #define SHORT_URL "https://www.example.com/"
+
+ if (!test_utils_run_simple_test (fixture,
+ "mode:plain\n"
+ "type:before\\n"
+ LONG_URL "\\n"
+ "after\\n"
+ "prefix text " SHORTER_URL " suffix\\n"
+ "prefix " SHORT_URL " suffix\\n"
+ "end\n",
+ HTML_PREFIX "<div style=\"width: 71ch;\">before</div>"
+ "<div style=\"width: 71ch;\"><a href=\"" LONG_URL "\">" LONG_URL "</a></div>"
+ "<div style=\"width: 71ch;\">after</div>"
+ "<div style=\"width: 71ch;\">prefix text <a href=\"" SHORTER_URL "\">" SHORTER_URL "</a> suffix</div>"
+ "<div style=\"width: 71ch;\">prefix <a href=\"" SHORT_URL "\">" SHORT_URL "</a> suffix</div>"
+ "<div style=\"width: 71ch;\">end</div>"
+ HTML_SUFFIX,
+ "before\n"
+ LONG_URL "\n"
+ "after\n"
+ "prefix text \n"
+ SHORTER_URL " suffix\n"
+ "prefix " SHORT_URL " suffix\n"
+ "end")) {
+ g_test_fail ();
+ return;
+ }
+
+ #undef SHORT_URL
+ #undef SHORTER_URL
+ #undef LONG_URL
+}
+
void
test_add_html_editor_bug_tests (void)
{
@@ -1349,4 +1387,5 @@ test_add_html_editor_bug_tests (void)
test_utils_add_test ("/bug/788829", test_bug_788829);
test_utils_add_test ("/bug/750636", test_bug_750636);
test_utils_add_test ("/issue/86", test_issue_86);
+ test_utils_add_test ("/issue/103", test_issue_103);
}
diff -up evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c.extra-new-line-before-url evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
--- evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c.extra-new-line-before-url 2018-09-03 15:40:14.493506323 +0200
+++ evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 2018-09-03 15:40:14.496506323 +0200
@@ -14089,7 +14089,7 @@ wrap_lines (EEditorPage *editor_page,
next_sibling = webkit_dom_node_get_next_sibling (node);
/* If the anchor doesn't fit on the line, add it to a separate line. */
- if ((line_length + anchor_length) > length_to_wrap) {
+ if (line_length > 0 && (line_length + anchor_length) > length_to_wrap) {
/* Put <BR> before the anchor, thus it starts on a new line */
element = webkit_dom_document_create_element (document, "BR", NULL);
element_add_class (element, "-x-evo-wrap-br");

View File

@ -1,583 +0,0 @@
diff -up evolution-3.28.5/data/webview.css.frame-flattenning evolution-3.28.5/data/webview.css
--- evolution-3.28.5/data/webview.css.frame-flattenning 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/data/webview.css 2023-01-04 09:25:06.252929132 +0100
@@ -8,8 +8,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;
}
th {
@@ -30,21 +30,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 {
@@ -58,21 +58,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: 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 {
@@ -139,7 +139,7 @@ th.rtl {
/***** PRINTING *******/
.printing-header {
- margin-bottom: 20px;
+ padding-bottom: 20px;
}
.printing-header h1,
@@ -159,7 +159,7 @@ th.rtl {
/******* ITIP *********/
.itip.icon {
float: left;
- margin-right: 5px;
+ padding-right: 5px;
}
.itip.content {
@@ -168,7 +168,7 @@ th.rtl {
}
.itip.description {
- margin: 5px;
+ padding: 5px;
}
.itip tr {
@@ -192,7 +192,7 @@ th.rtl {
}
#table_row_buttons img {
- margin-right: 5px;
+ padding-right: 5px;
vertical-align: middle;
}
diff -up evolution-3.28.5/src/em-format/e-mail-formatter-text-plain.c.frame-flattenning evolution-3.28.5/src/em-format/e-mail-formatter-text-plain.c
--- evolution-3.28.5/src/em-format/e-mail-formatter-text-plain.c.frame-flattenning 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/em-format/e-mail-formatter-text-plain.c 2023-01-04 09:25:06.252929132 +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: 0px; margin: 0;\">";
g_output_stream_write_all (
stream, string, strlen (string),
diff -up evolution-3.28.5/src/mail/e-mail-display.c.frame-flattenning evolution-3.28.5/src/mail/e-mail-display.c
--- evolution-3.28.5/src/mail/e-mail-display.c.frame-flattenning 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/mail/e-mail-display.c 2023-01-04 09:25:06.252929132 +0100
@@ -1529,6 +1529,19 @@ mail_display_set_fonts (EWebView *web_vi
mail_display_get_font_settings (display->priv->settings, monospace, variable);
}
+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 void
mail_display_web_view_initialize (WebKitWebView *web_view)
{
@@ -1536,9 +1549,11 @@ mail_display_web_view_initialize (WebKit
webkit_settings = webkit_web_view_get_settings (web_view);
- g_object_set (webkit_settings,
- "enable-frame-flattening", TRUE,
- NULL);
+ if (mail_display_can_use_frame_flattening ()) {
+ g_object_set (webkit_settings,
+ "enable-frame-flattening", TRUE,
+ NULL);
+ }
}
static void
diff -up evolution-3.28.5/src/modules/itip-formatter/web-extension/module-itip-formatter-web-extension.c.frame-flattenning evolution-3.28.5/src/modules/itip-formatter/web-extension/module-itip-formatter-web-extension.c
--- evolution-3.28.5/src/modules/itip-formatter/web-extension/module-itip-formatter-web-extension.c.frame-flattenning 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/modules/itip-formatter/web-extension/module-itip-formatter-web-extension.c 2023-01-04 09:25:06.253929132 +0100
@@ -259,7 +259,7 @@ handle_method_call (GDBusConnection *con
gpointer user_data)
{
WebKitWebExtension *web_extension = WEBKIT_WEB_EXTENSION (user_data);
- WebKitDOMDocument *document;
+ WebKitDOMDocument *document = NULL, *top_document = NULL;
const gchar *part_id = NULL;
guint64 page_id;
@@ -281,11 +281,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s)", &page_id, &part_id, &button_id);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
module_itip_formatter_dom_utils_show_button (document, button_id);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "EnableButton") == 0) {
@@ -306,11 +307,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s&s)", &page_id, &part_id, &element_id, &inner_html);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
e_dom_utils_element_set_inner_html (document, element_id, inner_html);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "RemoveElement") == 0) {
@@ -318,11 +320,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s)", &page_id, &part_id, &element_id);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
e_dom_utils_remove_element (document, element_id);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "ElementRemoveChildNodes") == 0) {
@@ -330,11 +333,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s)", &page_id, &part_id, &element_id);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
e_dom_utils_element_remove_child_nodes (document, element_id);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "HideElement") == 0) {
@@ -343,11 +347,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&sb)", &page_id, &part_id, &element_id, &hide);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
e_dom_utils_hide_element (document, element_id, hide);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "ElementIsHidden") == 0) {
@@ -395,11 +400,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&sbb)", &page_id, &part_id, &id, &show, &update_second);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
module_itip_formatter_dom_utils_show_checkbox (document, id, show, update_second);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "SetButtonsSensitive") == 0) {
@@ -419,11 +425,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s&s)", &page_id, &part_id, &id, &text);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
module_itip_formatter_dom_utils_set_area_text (document, id, text);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "ElementSetAccessKey") == 0) {
@@ -443,11 +450,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s)", &page_id, &part_id, &element_id);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
module_itip_formatter_dom_utils_element_hide_child_nodes (document, element_id);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "EnableSelect") == 0) {
@@ -509,11 +517,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s&s&s)", &page_id, &part_id, &element_id, &header, &label);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
module_itip_formatter_dom_utils_update_times (document, element_id, header, label);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "AppendInfoItemRow") == 0) {
@@ -521,11 +530,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s&s&s&s)", &page_id, &part_id, &table_id, &row_id, &icon_name, &message);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
module_itip_formatter_dom_utils_append_info_item_row (document, table_id, row_id, icon_name, message);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "EnableTextArea") == 0) {
@@ -546,11 +556,12 @@ handle_method_call (GDBusConnection *con
g_variant_get (parameters, "(t&s&s&s)", &page_id, &part_id, &area_id, &value);
- document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
- if (document)
- document = find_webkit_document_for_partid_or_return_dbus_error (invocation, document, part_id);
+ top_document = get_webkit_document_or_return_dbus_error (invocation, web_extension, page_id);
+ if (top_document)
+ document = find_webkit_document_for_partid_or_return_dbus_error (invocation, top_document, part_id);
if (document) {
module_itip_formatter_dom_utils_text_area_set_value (document, area_id, value);
+ e_dom_update_iframe_height (top_document);
g_dbus_method_invocation_return_value (invocation, NULL);
}
} else if (g_strcmp0 (method_name, "TextAreaGetValue") == 0) {
diff -up evolution-3.28.5/src/modules/text-highlight/e-mail-formatter-text-highlight.c.frame-flattenning evolution-3.28.5/src/modules/text-highlight/e-mail-formatter-text-highlight.c
--- evolution-3.28.5/src/modules/text-highlight/e-mail-formatter-text-highlight.c.frame-flattenning 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/modules/text-highlight/e-mail-formatter-text-highlight.c 2023-01-04 09:25:06.252929132 +0100
@@ -122,16 +122,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)
diff -up evolution-3.28.5/src/web-extensions/e-dom-utils.c.frame-flattenning evolution-3.28.5/src/web-extensions/e-dom-utils.c
--- evolution-3.28.5/src/web-extensions/e-dom-utils.c.frame-flattenning 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/web-extensions/e-dom-utils.c 2023-01-04 09:25:06.253929132 +0100
@@ -837,9 +837,8 @@ set_iframe_and_body_width (WebKitDOMDocu
gchar *style;
/* 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;
style = g_strdup_printf ("width: %" G_GINT64_FORMAT "px;", local_width);
e_dom_utils_add_css_rule_into_style_sheet_in_document (
@@ -867,7 +866,7 @@ set_iframe_and_body_width (WebKitDOMDocu
style);
g_free (style);
- local_width -= 2; /* 1 + 1 frame borders */
+ local_width -= 4; /* 2 + 2 frame borders */
style = g_strdup_printf ("width: %" G_GINT64_FORMAT "px;", local_width);
e_dom_utils_add_css_rule_into_style_sheet_in_document (
@@ -891,15 +890,11 @@ set_iframe_and_body_width (WebKitDOMDocu
} else {
gchar *style;
- 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. */
- style = g_strdup_printf ("width: %" G_GINT64_FORMAT "px;", local_width - 10);
+ style = g_strdup_printf ("width: %" G_GINT64_FORMAT "px;", local_width);
e_dom_utils_add_css_rule_into_style_sheet_in_document (
document,
"-e-mail-formatter-style-sheet",
@@ -933,7 +928,7 @@ set_iframe_and_body_width (WebKitDOMDocu
if (level == 0) {
gchar *style = NULL;
- tmp_local_width -= 8; /* attachment's margin */
+ tmp_local_width -= 10; /* attachment's margin */
style = g_strdup_printf ("width: %" G_GINT64_FORMAT "px;", tmp_local_width);
e_dom_utils_add_css_rule_into_style_sheet_in_document (
@@ -947,9 +942,7 @@ set_iframe_and_body_width (WebKitDOMDocu
"-e-mail-formatter-style-sheet",
".attachment-wrapper iframe[src*=\"__formatas=txt\"]",
style);
- g_free (style);
- style = g_strdup_printf ("width: %" G_GINT64_FORMAT "px;", local_width);
e_dom_utils_add_css_rule_into_style_sheet_in_document (
document,
"-e-mail-formatter-style-sheet",
@@ -992,8 +985,10 @@ dom_window_resize_cb (WebKitDOMDOMWindow
document = webkit_dom_dom_window_get_document (dom_window);
- if (document)
+ if (document) {
e_dom_resize_document_content_to_preview_width (document);
+ e_dom_update_iframe_height (document);
+ }
}
static gboolean
@@ -1106,6 +1101,7 @@ e_dom_utils_e_mail_display_bind_dom (Web
e_dom_wrap_long_anchors (document);
e_dom_resize_document_content_to_preview_width (document);
+ e_dom_update_iframe_height (document);
}
void
@@ -1160,6 +1156,99 @@ e_dom_utils_e_mail_display_unstyle_block
g_clear_object (&collection);
}
+static void
+e_dom_update_iframe_height_recursive (WebKitDOMDocument *document)
+{
+ WebKitDOMHTMLCollection *frames = NULL;
+ WebKitDOMElement *scrolling_elem;
+ gulong ii, length;
+
+ frames = webkit_dom_document_get_elements_by_tag_name_as_html_collection (document, "iframe");
+ length = webkit_dom_html_collection_get_length (frames);
+ for (ii = 0; ii < length; ii++) {
+ WebKitDOMHTMLIFrameElement *iframe;
+ WebKitDOMDocument *content_document;
+
+ iframe = WEBKIT_DOM_HTML_IFRAME_ELEMENT (webkit_dom_html_collection_item (frames, ii));
+
+ content_document = webkit_dom_html_iframe_element_get_content_document (iframe);
+ if (!content_document)
+ continue;
+
+ e_dom_update_iframe_height_recursive (content_document);
+ }
+
+ scrolling_elem = webkit_dom_document_get_scrolling_element (document);
+ if (scrolling_elem) {
+ WebKitDOMDOMWindow *default_view;
+
+ default_view = webkit_dom_document_get_default_view (document);
+ if (default_view) {
+ WebKitDOMElement *frame_elem;
+
+ frame_elem = webkit_dom_dom_window_get_frame_element (default_view);
+ if (frame_elem) {
+ WebKitDOMHTMLIFrameElement *iframe = WEBKIT_DOM_HTML_IFRAME_ELEMENT (frame_elem);
+ glong scroll_height;
+ gchar *height;
+
+ scroll_height = webkit_dom_element_get_scroll_height (scrolling_elem);
+ height = webkit_dom_html_iframe_element_get_height (iframe);
+ if (!height || scroll_height == (glong) g_ascii_strtoll (height, NULL, 10))
+ webkit_dom_html_iframe_element_set_height (iframe, "10");
+ g_free (height);
+
+ scroll_height = webkit_dom_element_get_scroll_height (scrolling_elem);
+ height = g_strdup_printf ("%" G_GINT64_FORMAT, (gint64) (scroll_height + 2 +
+ (webkit_dom_element_get_scroll_width (scrolling_elem) > webkit_dom_element_get_client_width (scrolling_elem) ? 20 : 0)));
+ webkit_dom_html_iframe_element_set_height (iframe, height);
+ g_free (height);
+ }
+ }
+
+ g_clear_object (&default_view);
+ }
+
+ g_clear_object (&frames);
+}
+
+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);
+}
+
+void
+e_dom_update_iframe_height (WebKitDOMDocument *document)
+{
+ WebKitDOMDOMWindow *default_view;
+
+ if (mail_display_can_use_frame_flattening ())
+ return;
+
+ default_view = webkit_dom_document_get_default_view (document);
+ if (default_view) {
+ glong scroll_x, scroll_y;
+
+ scroll_x = webkit_dom_dom_window_get_scroll_x (default_view);
+ scroll_y = webkit_dom_dom_window_get_scroll_y (default_view);
+
+ e_dom_update_iframe_height_recursive (document);
+
+ if (scroll_y != webkit_dom_dom_window_get_scroll_y (default_view))
+ webkit_dom_dom_window_scroll_to (default_view, scroll_x, scroll_y);
+ }
+
+ g_clear_object (&default_view);
+}
+
void
e_dom_utils_eab_contact_formatter_bind_dom (WebKitDOMDocument *document)
{
diff -up evolution-3.28.5/src/web-extensions/e-dom-utils.h.frame-flattenning evolution-3.28.5/src/web-extensions/e-dom-utils.h
--- evolution-3.28.5/src/web-extensions/e-dom-utils.h.frame-flattenning 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/web-extensions/e-dom-utils.h 2023-01-04 09:25:06.253929132 +0100
@@ -69,6 +69,7 @@ void e_dom_utils_e_mail_display_bind_do
GDBusConnection *connection);
void e_dom_utils_e_mail_display_unstyle_blockquotes
(WebKitDOMDocument *document);
+void e_dom_update_iframe_height (WebKitDOMDocument *document);
WebKitDOMElement *
e_dom_utils_find_element_by_selector
(WebKitDOMDocument *document,
diff -up evolution-3.28.5/src/web-extensions/e-web-extension.c.frame-flattenning evolution-3.28.5/src/web-extensions/e-web-extension.c
--- evolution-3.28.5/src/web-extensions/e-web-extension.c.frame-flattenning 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/web-extensions/e-web-extension.c 2023-01-04 09:25:06.253929132 +0100
@@ -613,8 +613,10 @@ handle_method_call (GDBusConnection *con
e_dom_utils_hide_element (document, element_id, hidden);
- if (expand_inner_data)
+ if (expand_inner_data) {
e_dom_resize_document_content_to_preview_width (document);
+ e_dom_update_iframe_height (document);
+ }
}
g_dbus_method_invocation_return_value (invocation, NULL);

View File

@ -1,200 +0,0 @@
From d928258bb4f3e21973089183463c4dab11558b73 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Wed, 18 Sep 2019 14:12:44 +0200
Subject: I#624 - GalA11yETableItem: Incorrect implementation of
AtkObjectClass::ref_child()
Closes https://gitlab.gnome.org/GNOME/evolution/issues/624
diff --git a/src/e-util/gal-a11y-e-table-item.c b/src/e-util/gal-a11y-e-table-item.c
index cf06fb3f4f..be302ed09d 100644
--- a/src/e-util/gal-a11y-e-table-item.c
+++ b/src/e-util/gal-a11y-e-table-item.c
@@ -61,6 +61,7 @@ struct _GalA11yETableItemPrivate {
ESelectionModel *selection;
AtkStateSet *state_set;
GtkWidget *widget;
+ GHashTable *a11y_column_headers; /* ETableCol * ~> GalA11yETableColumnHeader * */
};
static gboolean gal_a11y_e_table_item_ref_selection (GalA11yETableItem *a11y,
@@ -124,6 +125,11 @@ item_finalized (gpointer user_data,
if (priv->selection)
gal_a11y_e_table_item_unref_selection (a11y);
+ if (priv->columns) {
+ free_columns (priv->columns);
+ priv->columns = NULL;
+ }
+
g_object_unref (a11y);
}
@@ -273,11 +279,60 @@ eti_a11y_reset_focus_object (GalA11yETableItem *a11y,
g_signal_emit_by_name (a11y, "active-descendant-changed", cell);
}
+static void eti_column_header_a11y_gone (gpointer user_data, GObject *a11y_col_header);
+
+static void
+eti_table_column_gone (gpointer user_data,
+ GObject *col)
+{
+ GalA11yETableItem *a11y = user_data;
+ GalA11yETableItemPrivate *priv;
+ GalA11yETableColumnHeader *a11y_col_header;
+
+ g_return_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (a11y));
+
+ priv = GET_PRIVATE (a11y);
+
+ a11y_col_header = g_hash_table_lookup (priv->a11y_column_headers, col);
+ g_hash_table_remove (priv->a11y_column_headers, col);
+
+ if (a11y_col_header)
+ g_object_weak_unref (G_OBJECT (a11y_col_header), eti_column_header_a11y_gone, a11y);
+}
+
+static void
+eti_column_header_a11y_gone (gpointer user_data,
+ GObject *a11y_col_header)
+{
+ GalA11yETableItem *a11y = user_data;
+ GalA11yETableItemPrivate *priv;
+ GHashTableIter iter;
+ gpointer key, value;
+
+ g_return_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (a11y));
+
+ priv = GET_PRIVATE (a11y);
+
+ g_hash_table_iter_init (&iter, priv->a11y_column_headers);
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
+ ETableCol *col = key;
+ GalA11yETableColumnHeader *stored_a11y_col_header = value;
+
+ if (((GObject *) stored_a11y_col_header) == a11y_col_header) {
+ g_object_weak_unref (G_OBJECT (col), eti_table_column_gone, a11y);
+ g_hash_table_remove (priv->a11y_column_headers, col);
+ break;
+ }
+ }
+}
+
static void
eti_dispose (GObject *object)
{
GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (object);
GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
+ GHashTableIter iter;
+ gpointer key, value;
if (priv->columns) {
free_columns (priv->columns);
@@ -289,10 +344,35 @@ eti_dispose (GObject *object)
priv->item = NULL;
}
+ g_clear_object (&priv->state_set);
+
+ g_hash_table_iter_init (&iter, priv->a11y_column_headers);
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
+ ETableCol *col = key;
+ GalA11yETableColumnHeader *a11y_col_header = value;
+
+ g_object_weak_unref (G_OBJECT (col), eti_table_column_gone, a11y);
+ g_object_weak_unref (G_OBJECT (a11y_col_header), eti_column_header_a11y_gone, a11y);
+ }
+
+ g_hash_table_remove_all (priv->a11y_column_headers);
+
if (parent_class->dispose)
parent_class->dispose (object);
}
+static void
+eti_finalize (GObject *object)
+{
+ GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (object);
+ GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
+
+ g_hash_table_destroy (priv->a11y_column_headers);
+
+ if (parent_class->finalize)
+ parent_class->finalize (object);
+}
+
/* Static functions */
static gint
eti_get_n_children (AtkObject *accessible)
@@ -318,12 +398,24 @@ eti_ref_child (AtkObject *accessible,
return NULL;
if (index < item->cols) {
+ GalA11yETableItemPrivate *priv = GET_PRIVATE (accessible);
ETableCol *ecol;
AtkObject *child;
ecol = e_table_header_get_column (item->header, index);
- child = gal_a11y_e_table_column_header_new (ecol, item, accessible);
- return child;
+ child = g_hash_table_lookup (priv->a11y_column_headers, ecol);
+
+ if (!child) {
+ child = gal_a11y_e_table_column_header_new (ecol, item, accessible);
+ if (child) {
+ g_hash_table_insert (priv->a11y_column_headers, ecol, child);
+
+ g_object_weak_ref (G_OBJECT (ecol), eti_table_column_gone, accessible);
+ g_object_weak_ref (G_OBJECT (child), eti_column_header_a11y_gone, accessible);
+ }
+ }
+
+ return child ? g_object_ref (child) : NULL;
}
index -= item->cols;
@@ -966,6 +1058,7 @@ eti_header_structure_changed (ETableHeader *eth,
g_free (state);
g_free (reorder);
g_free (prev_state);
+ free_columns (cols);
return;
}
@@ -1051,6 +1144,7 @@ eti_class_init (GalA11yETableItemClass *class)
parent_class = g_type_class_ref (PARENT_TYPE);
object_class->dispose = eti_dispose;
+ object_class->finalize = eti_finalize;
atk_object_class->get_n_children = eti_get_n_children;
atk_object_class->ref_child = eti_ref_child;
@@ -1069,6 +1163,7 @@ eti_init (GalA11yETableItem *a11y)
priv->selection_row_changed_id = 0;
priv->cursor_changed_id = 0;
priv->selection = NULL;
+ priv->a11y_column_headers = g_hash_table_new (g_direct_hash, g_direct_equal);
}
/* atk selection */
@@ -1189,14 +1284,17 @@ gal_a11y_e_table_item_new (ETableItem *item)
accessible = ATK_OBJECT (a11y);
- GET_PRIVATE (a11y)->item = item;
/* Initialize cell data. */
GET_PRIVATE (a11y)->cols = item->cols;
GET_PRIVATE (a11y)->rows = item->rows >= 0 ? item->rows : 0;
GET_PRIVATE (a11y)->columns = e_table_header_get_columns (item->header);
- if (GET_PRIVATE (a11y)->columns == NULL)
+ if (GET_PRIVATE (a11y)->columns == NULL) {
+ g_clear_object (&a11y);
return NULL;
+ }
+
+ GET_PRIVATE (a11y)->item = item;
g_signal_connect (
item, "selection_model_removed",

View File

@ -1,36 +0,0 @@
From fe293e9f75ef3a7fec90e9b11f9c5935ae98445c Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 17 Sep 2018 22:46:40 +0200
Subject: [PATCH] I#129 - Use unversioned URL to help.gnome.org
Closes https://gitlab.gnome.org/GNOME/evolution/issues/129
---
src/e-util/e-misc-utils.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/e-util/e-misc-utils.c b/src/e-util/e-misc-utils.c
index c6f4e105b3..3801337fc2 100644
--- a/src/e-util/e-misc-utils.c
+++ b/src/e-util/e-misc-utils.c
@@ -319,7 +319,9 @@ e_display_help (GtkWindow *parent,
uri = g_string_new ("help:" PACKAGE);
} else {
uri = g_string_new ("https://help.gnome.org/users/" PACKAGE "/");
- g_string_append_printf (uri, "%d.%d", EDS_MAJOR_VERSION, EDS_MINOR_VERSION);
+ /* Use '/stable/' until https://bugzilla.gnome.org/show_bug.cgi?id=785522 is fixed */
+ g_string_append (uri, "stable/");
+ /* g_string_append_printf (uri, "%d.%d", EDS_MAJOR_VERSION, EDS_MINOR_VERSION); */
}
timestamp = gtk_get_current_event_time ();
@@ -327,7 +329,6 @@ e_display_help (GtkWindow *parent,
if (parent != NULL)
screen = gtk_widget_get_screen (GTK_WIDGET (parent));
-
if (link_id != NULL) {
g_string_append (uri, "/");
g_string_append (uri, link_id);
--
2.21.0

View File

@ -1,42 +0,0 @@
From f315ca6a601e77220323bff4ac7782b54c862a0c Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 30 Oct 2018 15:50:58 +0100
Subject: [PATCH] Make sure intltool-merge cache is created only once
Similar to https://gitlab.gnome.org/GNOME/evolution/issues/196
when intltool-merge is called in parallel, it could either rewrite
the ongoing attempt to build it or use an incomplete data, which
results in broken output files (.desktop, .metainfo and so on).
This change ensures the intltool-merge cache is created only once
and any other requests which would use it will wait until it's created.
---
cmake/modules/FindIntltool.cmake | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/cmake/modules/FindIntltool.cmake b/cmake/modules/FindIntltool.cmake
index 2cda2549eb..8e223e9d7f 100644
--- a/cmake/modules/FindIntltool.cmake
+++ b/cmake/modules/FindIntltool.cmake
@@ -176,9 +176,18 @@ macro(intltool_merge _in_filename _out_filename)
DEPENDS ${_in}
)
else(_has_no_translations)
+ if(NOT TARGET intltool-merge-cache)
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache
+ COMMAND ${INTLTOOL_MERGE} ${_args} --quiet --cache="${CMAKE_BINARY_DIR}/po/.intltool-merge-cache" "${GETTEXT_PO_DIR}" "${_in}" "${_out}"
+ DEPENDS ${_in}
+ )
+ add_custom_target(intltool-merge-cache ALL
+ DEPENDS ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache)
+ endif(NOT TARGET intltool-merge-cache)
+
add_custom_command(OUTPUT ${_out}
COMMAND ${INTLTOOL_MERGE} ${_args} --quiet --cache="${CMAKE_BINARY_DIR}/po/.intltool-merge-cache" "${GETTEXT_PO_DIR}" "${_in}" "${_out}"
- DEPENDS ${_in}
+ DEPENDS ${_in} intltool-merge-cache
)
endif(_has_no_translations)
endmacro(intltool_merge)
--
2.18.1

View File

@ -1,133 +0,0 @@
From 44fbd35658e842a146daf31c53d8dbd670dd21bb Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 3 Dec 2019 12:05:25 +0100
Subject: [PATCH] I#729 - New Mail account wizard ignores email address change
Closes https://gitlab.gnome.org/GNOME/evolution/issues/729
---
src/mail/e-mail-config-assistant.c | 25 +++++++++++++++++++++++--
src/mail/e-mail-config-summary-page.c | 23 ++++++++++++++++++++---
src/mail/e-mail-config-summary-page.h | 2 ++
3 files changed, 45 insertions(+), 5 deletions(-)
diff --git a/src/mail/e-mail-config-assistant.c b/src/mail/e-mail-config-assistant.c
index 5307f1f90e..0c8da3c015 100644
--- a/src/mail/e-mail-config-assistant.c
+++ b/src/mail/e-mail-config-assistant.c
@@ -1069,7 +1069,26 @@ mail_config_assistant_prepare (GtkAssistant *assistant,
e_named_parameters_free (params);
}
- if (E_IS_MAIL_CONFIG_RECEIVING_PAGE (page) && first_visit) {
+ if (!first_visit && E_IS_MAIL_CONFIG_IDENTITY_PAGE (page)) {
+ ESource *source;
+ ESourceMailIdentity *extension;
+ const gchar *email_address;
+ const gchar *extension_name;
+
+ source = priv->identity_source;
+ extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
+ extension = e_source_get_extension (source, extension_name);
+ email_address = e_source_mail_identity_get_address (extension);
+
+ /* Set the value to an empty string when going back to the identity page,
+ thus when moving away from it the source's display name is updated
+ with the new address, in case it changed. Do not modify the display
+ name when the user changed it. */
+ if (g_strcmp0 (e_mail_config_summary_page_get_account_name (priv->summary_page), email_address) == 0)
+ e_source_set_display_name (source, "");
+ }
+
+ if (E_IS_MAIL_CONFIG_RECEIVING_PAGE (page)) {
ESource *source;
ESourceMailIdentity *extension;
const gchar *email_address;
@@ -1084,7 +1103,9 @@ mail_config_assistant_prepare (GtkAssistant *assistant,
extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
extension = e_source_get_extension (source, extension_name);
email_address = e_source_mail_identity_get_address (extension);
- e_source_set_display_name (source, email_address);
+
+ if (first_visit || g_strcmp0 (e_source_get_display_name (source), "") == 0)
+ e_source_set_display_name (source, email_address);
}
if (first_visit && (
diff --git a/src/mail/e-mail-config-summary-page.c b/src/mail/e-mail-config-summary-page.c
index fb0306d3e1..20c669ad65 100644
--- a/src/mail/e-mail-config-summary-page.c
+++ b/src/mail/e-mail-config-summary-page.c
@@ -53,6 +53,8 @@ struct _EMailConfigSummaryPagePrivate {
GtkLabel *send_user_label;
GtkLabel *send_security_label;
GtkEntry *account_name_entry;
+
+ GBinding *account_name_binding;
};
enum {
@@ -549,9 +551,6 @@ mail_config_summary_page_refresh (EMailConfigSummaryPage *page)
const gchar *extension_name;
const gchar *value;
- value = e_source_get_display_name (source);
- gtk_entry_set_text (priv->account_name_entry, value);
-
extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
extension = e_source_get_extension (source, extension_name);
@@ -830,6 +829,14 @@ e_mail_config_summary_page_get_internal_box (EMailConfigSummaryPage *page)
return page->priv->main_box;
}
+const gchar *
+e_mail_config_summary_page_get_account_name (EMailConfigSummaryPage *page)
+{
+ g_return_val_if_fail (E_IS_MAIL_CONFIG_SUMMARY_PAGE (page), NULL);
+
+ return gtk_entry_get_text (page->priv->account_name_entry);
+}
+
void
e_mail_config_summary_page_refresh (EMailConfigSummaryPage *page)
{
@@ -934,6 +941,11 @@ e_mail_config_summary_page_set_identity_source (EMailConfigSummaryPage *page,
page->priv->identity_source = identity_source;
page->priv->identity_source_changed_id = 0;
+ if (page->priv->account_name_binding) {
+ g_binding_unbind (page->priv->account_name_binding);
+ page->priv->account_name_binding = NULL;
+ }
+
if (identity_source != NULL) {
gulong handler_id;
@@ -943,6 +955,11 @@ e_mail_config_summary_page_set_identity_source (EMailConfigSummaryPage *page,
page);
page->priv->identity_source_changed_id = handler_id;
+
+ page->priv->account_name_binding =
+ e_binding_bind_property (identity_source, "display-name",
+ page->priv->account_name_entry, "text",
+ G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
}
g_object_notify (G_OBJECT (page), "identity-source");
diff --git a/src/mail/e-mail-config-summary-page.h b/src/mail/e-mail-config-summary-page.h
index af793dc8b6..64d0af875c 100644
--- a/src/mail/e-mail-config-summary-page.h
+++ b/src/mail/e-mail-config-summary-page.h
@@ -68,6 +68,8 @@ EMailConfigPage *
e_mail_config_summary_page_new (void);
GtkBox * e_mail_config_summary_page_get_internal_box
(EMailConfigSummaryPage *page);
+const gchar * e_mail_config_summary_page_get_account_name
+ (EMailConfigSummaryPage *page);
void e_mail_config_summary_page_refresh
(EMailConfigSummaryPage *page);
EMailConfigServiceBackend *
--
2.21.0

View File

@ -1,338 +0,0 @@
diff -up evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c.mangled-deeper-html-quotes evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c
--- evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c.mangled-deeper-html-quotes 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c 2018-09-03 15:31:08.028513879 +0200
@@ -1205,6 +1205,120 @@ test_bug_750636 (TestFixture *fixture)
g_test_fail ();
}
+static void
+test_issue_86 (TestFixture *fixture)
+{
+ const gchar *source_text =
+ "normal text\n"
+ "\n"
+ "> level 1\n"
+ "> level 1\n"
+ "> > level 2\n"
+ "> > level 2\n"
+ "> >\n"
+ "> > level 2\n"
+ ">\n"
+ "> level 1\n"
+ "> level 1\n"
+ ">\n"
+ "> > > level 3\n"
+ "> > > level 3\n"
+ ">\n"
+ "> > level 2\n"
+ "> > level 2\n"
+ ">\n"
+ "> level 1\n"
+ "\n"
+ "back normal text\n";
+ gchar *converted, *to_insert;
+
+ if (!test_utils_process_commands (fixture,
+ "mode:html\n")) {
+ g_test_fail ();
+ return;
+ }
+
+ converted = camel_text_to_html (source_text,
+ CAMEL_MIME_FILTER_TOHTML_PRE |
+ CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS |
+ CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES |
+ CAMEL_MIME_FILTER_TOHTML_QUOTE_CITATION,
+ 0xDDDDDD);
+
+ g_return_if_fail (converted != NULL);
+
+ to_insert = g_strconcat (converted,
+ "<span class=\"-x-evo-to-body\" data-credits=\"On Today, User wrote:\"></span>"
+ "<span class=\"-x-evo-cite-body\"></span>",
+ NULL);
+
+ test_utils_insert_content (fixture, to_insert,
+ E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
+
+ if (!test_utils_run_simple_test (fixture,
+ "",
+ HTML_PREFIX "<div>On Today, User wrote:</div>"
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
+ "<pre>normal text</pre>"
+ "<pre><br></pre>"
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
+ "<pre>level 1</pre>"
+ "<pre>level 1</pre>"
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
+ "<pre>level 2</pre>"
+ "<pre>level 2</pre>"
+ "<pre><br></pre>"
+ "<pre>level 2</pre>"
+ "</blockquote>"
+ "<pre><br></pre>"
+ "<pre>level 1</pre>"
+ "<pre>level 1</pre>"
+ "<pre><br></pre>"
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
+ "<pre>level 3</pre>"
+ "<pre>level 3</pre>"
+ "</blockquote>"
+ "</blockquote>"
+ "<pre><br></pre>"
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
+ "<pre>level 2</pre>"
+ "<pre>level 2</pre>"
+ "</blockquote>"
+ "<pre><br></pre>"
+ "<pre>level 1</pre>"
+ "</blockquote>"
+ "<pre><br></pre>"
+ "<pre>back normal text</pre>"
+ "</blockquote>" HTML_SUFFIX,
+ "On Today, User wrote:\n"
+ "> normal text\n"
+ "> \n"
+ "> > level 1\n"
+ "> > level 1\n"
+ "> > > level 2\n"
+ "> > > level 2\n"
+ "> > > \n"
+ "> > > level 2\n"
+ "> > \n"
+ "> > level 1\n"
+ "> > level 1\n"
+ "> > \n"
+ "> > > > level 3\n"
+ "> > > > level 3\n"
+ "> > \n"
+ "> > > level 2\n"
+ "> > > level 2\n"
+ "> > \n"
+ "> > level 1\n"
+ "> \n"
+ "> back normal text"))
+ g_test_fail ();
+
+ g_free (to_insert);
+ g_free (converted);
+}
+
void
test_add_html_editor_bug_tests (void)
{
@@ -1234,4 +1348,5 @@ test_add_html_editor_bug_tests (void)
test_utils_add_test ("/bug/780088", test_bug_780088);
test_utils_add_test ("/bug/788829", test_bug_788829);
test_utils_add_test ("/bug/750636", test_bug_750636);
+ test_utils_add_test ("/issue/86", test_issue_86);
}
diff -up evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c.mangled-deeper-html-quotes evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
--- evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c.mangled-deeper-html-quotes 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 2018-09-03 15:32:41.220512591 +0200
@@ -6230,7 +6230,6 @@ e_editor_dom_convert_content (EEditorPag
WEBKIT_DOM_NODE (content_wrapper),
WEBKIT_DOM_NODE (e_editor_dom_prepare_paragraph (editor_page, FALSE)),
NULL);
-
if (!cite_body) {
if (!empty) {
WebKitDOMNode *child;
@@ -8754,6 +8753,133 @@ adapt_to_editor_dom_changes (WebKitDOMDo
g_clear_object (&collection);
}
+static void
+traverse_nodes_to_split_pre (WebKitDOMDocument *document,
+ WebKitDOMNode *node,
+ WebKitDOMNode *new_parent, /* can be NULL, then prepend to out_new_nodes */
+ gboolean is_in_pre,
+ GSList **out_new_nodes) /* WebKitDOMNode * */
+{
+ if (is_in_pre && WEBKIT_DOM_IS_TEXT (node)) {
+ gchar *text;
+
+ text = webkit_dom_text_get_whole_text (WEBKIT_DOM_TEXT (node));
+ if (text) {
+ WebKitDOMElement *pre;
+ gint ii;
+ gchar **strv;
+
+ strv = g_strsplit (text, "\n", -1);
+
+ for (ii = 0; strv && strv[ii]; ii++) {
+ if (*(strv[ii])) {
+ gint len = strlen (strv[ii]);
+
+ if (strv[ii][len - 1] == '\r') {
+ strv[ii][len - 1] = '\0';
+ }
+ }
+
+ /* <pre> is shown as a block, thus adding a new line at the end behaves like two <br>-s */
+ if (!*(strv[ii]) && !strv[ii + 1])
+ break;
+
+ pre = webkit_dom_document_create_element (document, "pre", NULL);
+
+ if (*(strv[ii])) {
+ webkit_dom_html_element_set_inner_text (WEBKIT_DOM_HTML_ELEMENT (pre), strv[ii], NULL);
+ } else {
+ WebKitDOMElement *br;
+
+ br = webkit_dom_document_create_element (document, "br", NULL);
+ webkit_dom_node_append_child (WEBKIT_DOM_NODE (pre), WEBKIT_DOM_NODE (br), NULL);
+ }
+
+ if (new_parent)
+ webkit_dom_node_append_child (new_parent, WEBKIT_DOM_NODE (pre), NULL);
+ else
+ *out_new_nodes = g_slist_prepend (*out_new_nodes, pre);
+ }
+
+ g_strfreev (strv);
+ }
+
+ g_free (text);
+ } else if (WEBKIT_DOM_IS_HTML_PRE_ELEMENT (node)) {
+ is_in_pre = TRUE;
+ } else {
+ WebKitDOMNode *nd;
+ GError *error = NULL;
+
+ nd = webkit_dom_node_clone_node_with_error (node, FALSE, &error);
+ if (nd) {
+ if (new_parent)
+ webkit_dom_node_append_child (new_parent, nd, NULL);
+ else
+ *out_new_nodes = g_slist_prepend (*out_new_nodes, nd);
+
+ new_parent = nd;
+ } else {
+ g_warning ("%s: Failed to clone node %s: %s\n", G_STRFUNC, G_OBJECT_TYPE_NAME (node), error ? error->message : "Unknown error");
+ }
+ }
+
+ for (node = webkit_dom_node_get_first_child (node);
+ node;
+ node = webkit_dom_node_get_next_sibling (node)) {
+ traverse_nodes_to_split_pre (document, node, new_parent, is_in_pre, out_new_nodes);
+ }
+}
+
+static void
+maybe_split_pre_paragraphs (WebKitDOMDocument *document)
+{
+ WebKitDOMHTMLElement *body;
+ WebKitDOMNodeList *list;
+
+ body = webkit_dom_document_get_body (document);
+ if (!body)
+ return;
+
+ list = webkit_dom_document_query_selector_all (document, "pre", NULL);
+ if (webkit_dom_node_list_get_length (list)) {
+ WebKitDOMNode *body_node, *node, *current;
+ GSList *new_nodes = NULL, *to_remove = NULL, *link;
+
+ g_clear_object (&list);
+
+ body_node = WEBKIT_DOM_NODE (body);
+ webkit_dom_node_normalize (body_node);
+
+ for (current = webkit_dom_node_get_first_child (body_node);
+ current;
+ current = webkit_dom_node_get_next_sibling (current)) {
+ traverse_nodes_to_split_pre (document, current, NULL, FALSE, &new_nodes);
+ to_remove = g_slist_prepend (to_remove, current);
+ }
+
+ for (link = to_remove; link; link = g_slist_next (link)) {
+ node = link->data;
+
+ webkit_dom_node_remove_child (body_node, node, NULL);
+ }
+
+ /* They are in reverse order, thus reverse it */
+ new_nodes = g_slist_reverse (new_nodes);
+
+ for (link = new_nodes; link; link = g_slist_next (link)) {
+ node = link->data;
+
+ webkit_dom_node_append_child (body_node, node, NULL);
+ }
+
+ g_slist_free (to_remove);
+ g_slist_free (new_nodes);
+ }
+
+ g_clear_object (&list);
+}
+
void
e_editor_dom_process_content_after_load (EEditorPage *editor_page)
{
@@ -8803,60 +8929,8 @@ e_editor_dom_process_content_after_load
}
goto out;
- } else {
- WebKitDOMNodeList *list;
- gulong ii;
-
- list = webkit_dom_document_query_selector_all (document, "pre", NULL);
- for (ii = webkit_dom_node_list_get_length (list); ii--;) {
- WebKitDOMNode *node = webkit_dom_node_list_item (list, ii), *parent;
- WebKitDOMElement *element;
- gchar *inner_html;
-
- element = WEBKIT_DOM_ELEMENT (node);
- parent = webkit_dom_node_get_parent_node (node);
- inner_html = webkit_dom_element_get_inner_html (element);
-
- if (inner_html && *inner_html) {
- gchar **strv;
-
- strv = g_strsplit (inner_html, "\n", -1);
- if (strv && strv[0] && strv[1]) {
- WebKitDOMElement *pre;
- gint jj;
-
- for (jj = 0; strv[jj]; jj++) {
- pre = webkit_dom_document_create_element (document, "pre", NULL);
- if (*(strv[jj])) {
- gint len = strlen (strv[jj]);
-
- if (strv[jj][len - 1] == '\r') {
- strv[jj][len - 1] = '\0';
- }
- }
-
- if (*(strv[jj])) {
- webkit_dom_html_element_set_inner_html (WEBKIT_DOM_HTML_ELEMENT (pre), strv[jj], NULL);
- } else {
- WebKitDOMElement *br;
-
- br = webkit_dom_document_create_element (document, "br", NULL);
- webkit_dom_node_append_child (WEBKIT_DOM_NODE (pre), WEBKIT_DOM_NODE (br), NULL);
- }
-
- webkit_dom_node_insert_before (parent, WEBKIT_DOM_NODE (pre), node, NULL);
- }
-
- remove_node (node);
- }
-
- g_strfreev (strv);
- }
-
- g_free (inner_html);
- }
-
- g_clear_object (&list);
+ } else if (!webkit_dom_element_has_attribute (WEBKIT_DOM_ELEMENT (body), "data-evo-draft")) {
+ maybe_split_pre_paragraphs (document);
}
adapt_to_editor_dom_changes (document);

View File

@ -1,35 +0,0 @@
diff -up evolution-3.28.5/src/e-util/e-misc-utils.c.webkitgtk-2.28 evolution-3.28.5/src/e-util/e-misc-utils.c
--- evolution-3.28.5/src/e-util/e-misc-utils.c.webkitgtk-2.28 2020-06-11 15:56:03.324428384 +0200
+++ evolution-3.28.5/src/e-util/e-misc-utils.c 2020-06-11 15:56:03.334428384 +0200
@@ -3633,7 +3633,7 @@ e_util_claim_dbus_proxy_call_error (GDBu
g_return_if_fail (method_name != NULL);
if (in_error && !g_error_matches (in_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
- g_warning ("Failed to call a DBus Proxy method %s::%s: %s",
+ printf ("Failed to call a DBus Proxy method %s::%s: %s\n",
g_dbus_proxy_get_name (dbus_proxy), method_name, in_error->message);
}
diff -up evolution-3.28.5/src/e-util/e-web-view.c.webkitgtk-2.28 evolution-3.28.5/src/e-util/e-web-view.c
--- evolution-3.28.5/src/e-util/e-web-view.c.webkitgtk-2.28 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/e-util/e-web-view.c 2020-06-11 15:57:24.375430212 +0200
@@ -1221,6 +1221,9 @@ web_view_initialize (WebKitWebView *web_
g_object_unref (settings);
}
+static void
+web_view_load_uri (EWebView *web_view,
+ const gchar *uri);
static void
web_view_constructed (GObject *object)
@@ -1265,6 +1268,9 @@ web_view_constructed (GObject *object)
web_view_initialize (WEBKIT_WEB_VIEW (object));
web_view_set_find_controller (E_WEB_VIEW (object));
+
+ /* Initialize the WebPage content for WebKitGTK 2.28 */
+ web_view_load_uri (E_WEB_VIEW (object), NULL);
}
static void

View File

@ -1,39 +0,0 @@
diff -up evolution-3.28.5/src/modules/webkit-editor/e-webkit-editor.c.webkitgtk-2.30 evolution-3.28.5/src/modules/webkit-editor/e-webkit-editor.c
--- evolution-3.28.5/src/modules/webkit-editor/e-webkit-editor.c.webkitgtk-2.30 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/modules/webkit-editor/e-webkit-editor.c 2020-11-30 10:37:53.797115765 +0100
@@ -6111,11 +6111,12 @@ webkit_editor_drag_data_received_cb (Gtk
info == E_DND_TARGET_TYPE_UTF8_STRING || info == E_DND_TARGET_TYPE_STRING ||
info == E_DND_TARGET_TYPE_TEXT_PLAIN || info == E_DND_TARGET_TYPE_TEXT_PLAIN_UTF8) {
gdk_drag_status (context, gdk_drag_context_get_selected_action(context), time);
- if (!GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->drag_drop (widget, context, x, y, time)) {
- g_warning ("Drop failed in WebKit");
+ if (!GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->drag_drop ||
+ !GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->drag_drop (widget, context, x, y, time)) {
goto process_ourselves;
} else {
- GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->drag_leave(widget, context, time);
+ if (GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->drag_leave)
+ GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->drag_leave (widget, context, time);
g_signal_stop_emission_by_name (widget, "drag-data-received");
if (!is_move)
webkit_editor_call_simple_extension_function (wk_editor, "DOMLastDropOperationDidCopy");
@@ -6321,7 +6322,8 @@ webkit_editor_button_press_event (GtkWid
}
/* Chain up to parent's button_press_event() method. */
- return GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->button_press_event (widget, event);
+ return GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->button_press_event &&
+ GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->button_press_event (widget, event);
}
static gboolean
@@ -6378,7 +6380,8 @@ webkit_editor_key_press_event (GtkWidget
}
/* Chain up to parent's key_press_event() method. */
- return GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->key_press_event (widget, event);
+ return GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->key_press_event &&
+ GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->key_press_event (widget, event);
}
static void

View File

@ -1,110 +0,0 @@
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 3568f6e..f695ed8 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -626,6 +626,20 @@ e_editor_dom_exec_command (EEditorPage *editor_page,
e_editor_page_get_document (editor_page), cmd_str, FALSE, has_value ? value : "" );
}
+static WebKitDOMRange *
+clone_and_unref_range (WebKitDOMRange *range)
+{
+ WebKitDOMRange *clone;
+
+ if (!range)
+ return NULL;
+
+ clone = webkit_dom_range_clone_range (range, NULL);
+ g_object_unref (range);
+
+ return clone;
+}
+
static void
perform_spell_check (WebKitDOMDOMSelection *dom_selection,
WebKitDOMRange *start_range,
@@ -642,8 +656,7 @@ perform_spell_check (WebKitDOMDOMSelection *dom_selection,
g_object_unref (actual);
webkit_dom_dom_selection_modify (
dom_selection, "move", "forward", "word");
- actual = webkit_dom_dom_selection_get_range_at (
- dom_selection, 0, NULL);
+ actual = clone_and_unref_range (webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL));
}
g_clear_object (&actual);
}
@@ -1524,8 +1537,10 @@ e_editor_dom_check_magic_links (EEditorPage *editor_page,
selection_end_marker = webkit_dom_document_get_element_by_id (
document, "-x-evo-selection-end-marker");
- node = webkit_dom_node_get_previous_sibling (
- WEBKIT_DOM_NODE (selection_end_marker));
+ if (selection_end_marker)
+ node = webkit_dom_node_get_previous_sibling (WEBKIT_DOM_NODE (selection_end_marker));
+ else
+ node = NULL;
}
}
@@ -4120,7 +4135,7 @@ caret_is_on_the_line_beginning_html (WebKitDOMDocument *document)
dom_window = webkit_dom_document_get_default_view (document);
dom_selection = webkit_dom_dom_window_get_selection (dom_window);
- actual_range = webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL);
+ actual_range = clone_and_unref_range (webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL));
webkit_dom_dom_selection_modify (dom_selection, "move", "left", "lineBoundary");
@@ -9388,7 +9403,7 @@ save_history_for_delete_or_backspace (EEditorPage *editor_page,
return;
}
- range = webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL);
+ range = clone_and_unref_range (webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL));
/* Check if we can delete something */
if (webkit_dom_range_get_collapsed (range, NULL)) {
@@ -9503,7 +9518,7 @@ save_history_for_delete_or_backspace (EEditorPage *editor_page,
} else {
WebKitDOMRange *tmp_range = NULL, *actual_range = NULL;
- actual_range = webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL);
+ actual_range = clone_and_unref_range (webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL));
webkit_dom_dom_selection_modify (
dom_selection, "move", delete_key ? "right" : "left", "character");
@@ -11348,7 +11363,7 @@ e_editor_dom_save_history_for_drag (EEditorPage *editor_page)
}
/* Obtain the dragged content. */
- range = webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL);
+ range = clone_and_unref_range (webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL));
range_clone = webkit_dom_range_clone_range (range, NULL);
/* Create the history event for the content that will
@@ -11708,7 +11723,7 @@ e_editor_dom_get_current_range (EEditorPage *editor_page)
if (webkit_dom_dom_selection_get_range_count (dom_selection) < 1)
goto exit;
- range = webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL);
+ range = clone_and_unref_range (webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL));
exit:
g_clear_object (&dom_selection);
g_clear_object (&dom_window);
diff --git a/src/modules/webkit-editor/web-extension/e-editor-web-extension.c b/src/modules/webkit-editor/web-extension/e-editor-web-extension.c
index d799db4..a286583 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-web-extension.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-web-extension.c
@@ -2465,8 +2465,10 @@ web_page_document_loaded_cb (WebKitWebPage *web_page,
if (!webkit_dom_dom_selection_get_anchor_node (dom_selection) &&
!webkit_dom_dom_selection_get_focus_node (dom_selection)) {
range = webkit_dom_document_caret_range_from_point (document, 0, 0);
- webkit_dom_dom_selection_remove_all_ranges (dom_selection);
- webkit_dom_dom_selection_add_range (dom_selection, range);
+ if (range) {
+ webkit_dom_dom_selection_remove_all_ranges (dom_selection);
+ webkit_dom_dom_selection_add_range (dom_selection, range);
+ }
}
g_clear_object (&range);

View File

@ -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

View File

@ -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));
}

View File

@ -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

View File

@ -1,6 +1,6 @@
diff -up evolution-3.28.5/src/shell/e-shell-window.c.new-button evolution-3.28.5/src/shell/e-shell-window.c
--- evolution-3.28.5/src/shell/e-shell-window.c.new-button 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/shell/e-shell-window.c 2022-09-26 09:27:18.862555829 +0200
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,
@ -36,7 +36,7 @@ diff -up evolution-3.28.5/src/shell/e-shell-window.c.new-button evolution-3.28.5
}
static void
@@ -512,8 +526,8 @@ shell_window_construct_menubar (EShellWi
@@ -463,8 +477,8 @@ shell_window_construct_menubar (EShellWi
main_menu, "visible",
G_BINDING_SYNC_CREATE);
@ -47,7 +47,7 @@ diff -up evolution-3.28.5/src/shell/e-shell-window.c.new-button evolution-3.28.5
G_CALLBACK (shell_window_menubar_update_new_menu), NULL);
return main_menu;
@@ -593,6 +607,11 @@ shell_window_construct_toolbar (EShellWi
@@ -544,6 +558,11 @@ shell_window_construct_toolbar (EShellWi
G_CALLBACK (shell_window_toolbar_update_new_menu),
shell_window);
@ -59,7 +59,7 @@ diff -up evolution-3.28.5/src/shell/e-shell-window.c.new-button evolution-3.28.5
gtk_box_pack_start (GTK_BOX (box), toolbar, TRUE, TRUE, 0);
toolbar = e_shell_window_get_managed_widget (
@@ -1176,6 +1195,24 @@ e_shell_window_class_init (EShellWindowC
@@ -1133,6 +1152,24 @@ e_shell_window_class_init (EShellWindowC
G_TYPE_NONE, 1,
E_TYPE_SHELL_VIEW);
@ -84,7 +84,7 @@ diff -up evolution-3.28.5/src/shell/e-shell-window.c.new-button evolution-3.28.5
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (
binding_set, GDK_KEY_Escape, 0, "close-alert", 0);
@@ -2029,6 +2066,8 @@ e_shell_window_register_new_item_actions
@@ -2048,6 +2085,8 @@ e_shell_window_register_new_item_actions
G_OBJECT (action),
"primary", GINT_TO_POINTER (TRUE));
}
@ -93,10 +93,12 @@ diff -up evolution-3.28.5/src/shell/e-shell-window.c.new-button evolution-3.28.5
}
/**
@@ -2106,4 +2145,6 @@ e_shell_window_register_new_source_actio
@@ -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);
}
/**

View File

@ -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}|"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,17 +1,25 @@
%undefine __cmake_in_source_build
%global _changelog_trimtime %(date +%s -d "1 year ago")
%global _python_bytecompile_extra 0
# correct Obsoletes for evolution-tests when this is changed
%global with_tests 0
%global enable_installed_tests 0
%define glib2_version 2.46.0
%define gtk3_version 3.10.0
%global tnef_support 0
%if 0%{?fedora}
%global tnef_support 1
%endif
%define glib2_version 2.56
%define gtk3_version 3.22
%define gnome_autoar_version 0.1.1
%define gnome_desktop_version 2.91.3
%define intltool_version 0.35.5
%define libgdata_version 0.10.0
%define libgweather_version 3.5.0
%define libgweather_version 3.10
%define libsoup_version 2.42
%define webkit2gtk_version 2.13.90
%define webkit2gtk_version 2.28.0
%define last_anjal_version 0.3.2-3
%define last_libgal2_version 2:2.5.3-2
@ -25,18 +33,32 @@
# Coverity scan can override this to 0, to skip checking in gtk-doc generated code
%{!?with_docs: %global with_docs 1}
%if 0%{?flatpak}
%global with_docs 0
%endif
%define evo_plugin_dir %{_libdir}/evolution/plugins
### Abstract ###
Name: evolution
Version: 3.28.5
Release: 26%{?dist}
Group: Applications/Productivity
Version: 3.40.4
Release: 10%{?dist}
Summary: Mail and calendar client for GNOME
License: GPLv2+ and GFDL
URL: https://wiki.gnome.org/Apps/Evolution
Source: http://download.gnome.org/sources/%{name}/3.28/%{name}-%{version}.tar.xz
Source: http://download.gnome.org/sources/%{name}/3.40/%{name}-%{version}.tar.xz
Source1: flatpak-evolution-fix-service-names.sh
Source2: flatpak-evolution-wrapper.sh.in
Source3: emoji.data
Patch01: evolution-3.40.4-empty-emoji-picker.patch
Patch02: evolution-3.40.4-comp-editor-timezone-reset.patch
Patch03: evolution-3.40.4-google-contacts-to-carddav.patch
Patch04: webkitgtk-2.36.0-dark-theme.patch
Patch05: webkitgtk-2.36.0-disable-hw-accel.patch
Patch06: evolution-3.40.4-frame-flattenning.patch
Patch07: evolution-3.40.4-new-button.patch
# Approximate version number
Provides: bundled(libgnomecanvas) = 2.30.0
@ -46,95 +68,46 @@ Obsoletes: libgal2 <= %{last_libgal2_version}
Obsoletes: evolution-NetworkManager < %{last_evo_nm_version}
Obsoletes: evolution-perl < %{last_evo_perl_version}
%if !%{with_tests}
Obsoletes: evolution-tests <= 3.28.5
%if !%{enable_installed_tests}
Obsoletes: evolution-tests <= 3.31.1
%endif
%global eds_version %{version}
### Patches ###
# RH bug #1620582
Patch01: evolution-3.28.5-config-lookup-crash.patch
# RH bug #1624835
Patch02: evolution-3.28.5-mangled-deeper-html-quotes.patch
# RH bug #1624867
Patch03: evolution-3.28.5-extra-new-line-before-url.patch
# RH bug #1634665
Patch04: evolution-3.28.5-deselect-task-memo-list.patch
# RH bug #1724232
Patch05: evolution-3.28.5-help-contents-link.patch
# RH bug #1724659
Patch06: evolution-3.28.5-intltool-cache.patch
# RH bug #1724984
Patch07: evolution-3.28.5-crash-empty-attendee.patch
# RH bug #1764563
Patch08: evolution-3.28.5-cve-2018-15587-reposition-signature-bar.patch
# RH bug #1753220
Patch09: evolution-3.28.5-gala11yetableitem-ref-child.patch
# RH bug #1778799
Patch10: evolution-3.28.5-mail-account-name-sync-in-wizard.patch
# RH bug #1817143
Patch11: evolution-3.28.5-webkitgtk-2.28.patch
# RH bug #1883619
Patch12: evolution-3.28.5-ecalendaritem-settings.patch
# RH bug #1902630
Patch13: evolution-3.28.5-webkitgtk-2.30.patch
# RH bug #1972749
Patch14: evolution-3.28.5-cmake-variable-name-comparison.patch
# RH bug #2126523
Patch15: evolution-3.28.5-frame-flattenning.patch
# RH bug #2127019
Patch16: evolution-3.28.5-contacts-prefer-orig-value.patch
# RH bug #2129702
Patch17: evolution-3.28.5-new-button.patch
# https://issues.redhat.com/browse/RHEL-17661
Patch18: evolution-3.28.5-webkitgtk-2.40.patch
## Dependencies ###
%if ! 0%{?flatpak}
Requires: %{_bindir}/killall
Requires: gvfs
%endif
Requires: evolution-data-server >= %{eds_version}
Requires: evolution-data-server-ui >= %{eds_version}
Requires: gvfs
Requires: gtkspell3
Requires: gspell
Requires: highlight
Requires: %{name}-langpacks = %{version}-%{release}
### Build Dependencies ###
%if ! 0%{?flatpak}
BuildRequires: %{_bindir}/killall
%endif
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gettext
%if %{with_docs}
BuildRequires: gtk-doc
%endif
BuildRequires: highlight
BuildRequires: intltool >= %{intltool_version}
BuildRequires: itstool
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: yelp-tools
BuildRequires: pkgconfig(atk)
BuildRequires: pkgconfig(cairo-gobject)
BuildRequires: pkgconfig(camel-1.2) >= %{eds_version}
BuildRequires: pkgconfig(enchant)
BuildRequires: pkgconfig(enchant-2)
BuildRequires: pkgconfig(gail-3.0) >= %{gtk3_version}
BuildRequires: pkgconfig(gcr-3)
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
@ -145,13 +118,13 @@ BuildRequires: pkgconfig(gnome-autoar-gtk-0) >= %{gnome_autoar_version}
BuildRequires: pkgconfig(gnome-desktop-3.0) >= %{gnome_desktop_version}
BuildRequires: pkgconfig(gsettings-desktop-schemas)
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
BuildRequires: pkgconfig(gtkspell3-3.0)
BuildRequires: pkgconfig(gspell-1)
BuildRequires: pkgconfig(gweather-3.0) >= %{libgweather_version}
BuildRequires: pkgconfig(iso-codes)
BuildRequires: pkgconfig(libcanberra-gtk3)
BuildRequires: pkgconfig(libebackend-1.2) >= %{eds_version}
BuildRequires: pkgconfig(libebook-1.2) >= %{eds_version}
BuildRequires: pkgconfig(libecal-1.2) >= %{eds_version}
BuildRequires: pkgconfig(libecal-2.0) >= %{eds_version}
BuildRequires: pkgconfig(libedataserver-1.2) >= %{eds_version}
BuildRequires: pkgconfig(libedataserverui-1.2) >= %{eds_version}
BuildRequires: pkgconfig(libgdata) >= %{libgdata_version}
@ -163,6 +136,10 @@ BuildRequires: pkgconfig(shared-mime-info)
BuildRequires: pkgconfig(webkit2gtk-4.0) >= %{webkit2gtk_version}
BuildRequires: pkgconfig(webkit2gtk-web-extension-4.0) >= %{webkit2gtk_version}
%if %{tnef_support}
BuildRequires: pkgconfig(libytnef)
%endif
%if %{ldap_support}
BuildRequires: openldap-devel >= 2.0.11
%endif
@ -182,17 +159,16 @@ are tightly integrated with one another and act as a seamless
personal information-management tool.
%package devel
Group: Development/Libraries
Summary: Development files for building against %{name}
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig(camel-1.2) >= %{eds_version}
Requires: pkgconfig(enchant)
Requires: pkgconfig(enchant-2)
Requires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
Requires: pkgconfig(gtkspell3-3.0)
Requires: pkgconfig(gspell-1)
Requires: pkgconfig(gweather-3.0) >= %{libgweather_version}
Requires: pkgconfig(libebackend-1.2) >= %{eds_version}
Requires: pkgconfig(libebook-1.2) >= %{eds_version}
Requires: pkgconfig(libecal-1.2) >= %{eds_version}
Requires: pkgconfig(libecal-2.0) >= %{eds_version}
Requires: pkgconfig(libedataserver-1.2) >= %{eds_version}
Requires: pkgconfig(libgdata) >= %{libgdata_version}
Requires: pkgconfig(libsoup-2.4) >= %{libsoup_version}
@ -202,9 +178,10 @@ Obsoletes: libgal2-devel <= %{last_libgal2_version}
%description devel
Development files needed for building things which link against %{name}.
%if %{with_docs}
%package devel-docs
Summary: Developer documentation for Evolution
Group: Development/Libraries
Requires: devhelp
Requires: %{name}-devel = %{version}-%{release}
BuildArch: noarch
@ -212,6 +189,8 @@ BuildArch: noarch
%description devel-docs
This package contains developer documentation for Evolution.
%endif
%package langpacks
Summary: Translations for %{name}
BuildArch: noarch
@ -222,7 +201,6 @@ This package contains translations for %{name}.
%if %{with_docs}
%package help
Group: Applications/Productivity
Summary: Help files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: yelp
@ -233,28 +211,23 @@ This package contains user documentation for %{name}.
%endif
%package bogofilter
Group: Applications/Productivity
Summary: Bogofilter plugin for Evolution
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: bogofilter
BuildRequires: bogofilter
%description bogofilter
This package contains the plugin to filter junk mail using Bogofilter.
%package spamassassin
Group: Applications/Productivity
Summary: SpamAssassin plugin for Evolution
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: spamassassin
BuildRequires: spamassassin
%description spamassassin
This package contains the plugin to filter junk mail using SpamAssassin.
%if %{libpst_support}
%package pst
Group: Applications/Productivity
Summary: PST importer plugin for Evolution
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -263,50 +236,34 @@ This package contains the plugin to import Microsoft Personal Storage Table
(PST) files used by Microsoft Outlook and Microsoft Exchange.
%endif
%if %{with_tests}
%if %{enable_installed_tests}
%package tests
Summary: Tests for the %{name} package
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python2-behave
Requires: python2-dogtail
%description tests
The %{name}-tests package contains tests that can be used to verify
the functionality of the installed %{name} package.
%endif
%prep
%setup -q -n evolution-%{version}
%autosetup -p1 -S gendiff
%patch01 -p1 -b .config-lookup-crash
%patch02 -p1 -b .mangled-deeper-html-quotes
%patch03 -p1 -b .extra-new-line-before-url
%patch04 -p1 -b .deselect-task-memo-list
%patch05 -p1 -b .help-contents-link
%patch06 -p1 -b .intltool-cache
%patch07 -p1 -b .crash-empty-attendee
%patch08 -p1 -b .cve-2018-15587-reposition-signature-bar
%patch09 -p1 -b .gala11yetableitem-ref-child
%patch10 -p1 -b .mail-account-name-sync-in-wizard
%patch11 -p1 -b .webkitgtk-2.28
%patch12 -p1 -b .ecalendaritem-settings
%patch13 -p1 -b .webkitgtk-2.30
%patch14 -p1 -b .cmake-variable-name-comparison
%patch15 -p1 -b .frame-flattenning
%patch16 -p1 -b .contacts-prefer-orig-value
%patch17 -p1 -b .new-button
%patch18 -p1 -b .webkitgtk-2.40
cp %{S:3} data/
# Remove the welcome email from Novell
for inbox in src/mail/default/*/Inbox; do
echo -n "" > $inbox
done
%build
%if 0%{?flatpak}
mv data/org.gnome.Evolution.desktop.in.in data/org.gnome.Evolution.desktop.in.i
cat data/org.gnome.Evolution.desktop.in.i | sed -e "s/Icon=evolution/Icon=org.gnome.Evolution/" >data/org.gnome.Evolution.desktop.in.in
%endif
mkdir -p _build
cd _build
%build
# define all of our flags, this is kind of ugly :(
%if %{ldap_support}
@ -328,27 +285,31 @@ fi
%define gtkdoc_flags -DENABLE_GTK_DOC=OFF -DWITH_HELP=OFF
%endif
%if %{enable_installed_tests}
%define tests_flags -DENABLE_INSTALLED_TESTS=ON
%else
%define tests_flags -DENABLE_INSTALLED_TESTS=OFF
%endif
%if %{tnef_support}
%global tnef_flags -DENABLE_YTNEF=ON
%else
%global tnef_flags -DENABLE_YTNEF=OFF
%endif
CFLAGS="$RPM_OPT_FLAGS -fPIC -DLDAP_DEPRECATED -Wno-sign-compare -Wno-deprecated-declarations"; export CFLAGS
%cmake -G "Unix Makefiles" \
-DENABLE_MAINTAINER_MODE=OFF \
-DVERSION_SUBSTRING=" (%{version}-%{release})" \
%ldap_flags %ssl_flags %gtkdoc_flags \
%ldap_flags %ssl_flags %gtkdoc_flags %tests_flags %tnef_flags \
-DENABLE_PLUGINS=all \
-DENABLE_YTNEF=OFF \
%if %{with_tests}
-DENABLE_INSTALLED_TESTS=ON \
%else
-DENABLE_INSTALLED_TESTS=OFF \
%endif
..
%{nil}
make %{?_smp_mflags}
%cmake_build
%if %{with_docs}
cd ..
# Replace identical images in the help by links.
# This reduces the RPM size by several megabytes.
helpdir=$RPM_BUILD_ROOT%{_datadir}/gnome/help/%{name}
@ -370,24 +331,28 @@ done
%endif
%install
rm -rf $RPM_BUILD_ROOT
cd _build
make DESTDIR=$RPM_BUILD_ROOT install
%cmake_install
%if 0%{?flatpak}
%{S:1} <%{S:2} >flatpak-evolution-wrapper.sh
chmod a+x flatpak-evolution-wrapper.sh
mv $RPM_BUILD_ROOT%{_bindir}/evolution $RPM_BUILD_ROOT%{_bindir}/evolution.bin
cp flatpak-evolution-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/evolution
%endif
%find_lang evolution --all-name --with-gnome
grep "/usr/share/locale" evolution.lang > translations.lang
grep "%{_datadir}/locale" evolution.lang > translations.lang
%if %{with_docs}
grep -v "/usr/share/locale" evolution.lang > help.lang
grep -v "%{_datadir}/locale" evolution.lang > help.lang
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%ldconfig_scriptlets
%files
%license COPYING
%doc AUTHORS NEWS README
%doc AUTHORS NEWS README.md
%{_mandir}/man1/*
# GSettings schemas:
%{_datadir}/GConf/gsettings/evolution.convert
@ -410,16 +375,20 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%{_datadir}/glib-2.0/schemas/org.gnome.evolution.plugin.mail-notification.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.evolution.plugin.prefer-plain.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.evolution.plugin.publish-calendar.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.evolution.plugin.sender-validator.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.evolution.plugin.templates.gschema.xml
# The main executable
%{_bindir}/evolution
%if 0%{?flatpak}
%{_bindir}/evolution.bin
%endif
%{_datadir}/metainfo/org.gnome.Evolution.appdata.xml
# Desktop files:
%{_datadir}/applications/org.gnome.Evolution.desktop
%{_sysconfdir}/xdg/autostart/org.gnome.Evolution-alarm-notify.desktop
# Icons:
%{_datadir}/icons/hicolor/16x16/apps/*
@ -427,8 +396,8 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%{_datadir}/icons/hicolor/24x24/apps/*
%{_datadir}/icons/hicolor/32x32/apps/*
%{_datadir}/icons/hicolor/48x48/apps/*
%{_datadir}/icons/hicolor/256x256/apps/*
%{_datadir}/icons/hicolor/symbolic/apps/*
%{_datadir}/icons/hicolor/scalable/apps/*
# The main data directory
# (have not attempted to split this up into an explicit list)
@ -441,16 +410,17 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%{_libdir}/evolution/modules/module-accounts-window.so
%{_libdir}/evolution/modules/module-addressbook.so
%{_libdir}/evolution/modules/module-backup-restore.so
%{_libdir}/evolution/modules/module-book-config-carddav.so
%{_libdir}/evolution/modules/module-book-config-google.so
%{_libdir}/evolution/modules/module-book-config-ldap.so
%{_libdir}/evolution/modules/module-book-config-local.so
%{_libdir}/evolution/modules/module-book-config-webdav.so
%{_libdir}/evolution/modules/module-cal-config-caldav.so
%{_libdir}/evolution/modules/module-cal-config-contacts.so
%{_libdir}/evolution/modules/module-cal-config-google.so
%{_libdir}/evolution/modules/module-cal-config-local.so
%{_libdir}/evolution/modules/module-cal-config-weather.so
%{_libdir}/evolution/modules/module-cal-config-webcal.so
%{_libdir}/evolution/modules/module-cal-config-webdav-notes.so
%{_libdir}/evolution/modules/module-calendar.so
%{_libdir}/evolution/modules/module-composer-autosave.so
%{_libdir}/evolution/modules/module-composer-to-meeting.so
@ -473,6 +443,12 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%{_libdir}/evolution/modules/module-webkit-editor.so
%{_libdir}/evolution/modules/module-webkit-inspector.so
%if %{tnef_support}
%{_libdir}/evolution/modules/module-tnef-attachment.so
%endif
%{_libdir}/evolution-data-server/ui-modules/module-evolution-alarm-notify.so
# Shared libraries:
%{_libdir}/evolution/libevolution-mail-composer.so
%{_libdir}/evolution/libeabutil.so
@ -480,7 +456,6 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%{_libdir}/evolution/libecontacteditor.so
%{_libdir}/evolution/libecontactlisteditor.so
%{_libdir}/evolution/libecontactprint.so
%{_libdir}/evolution/libedomutils.so
%{_libdir}/evolution/libemail-engine.so
%{_libdir}/evolution/libevolution-mail-formatter.so
%{_libdir}/evolution/libevolution-shell.so
@ -496,12 +471,10 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
# WebKit2 Extensions
%{_libdir}/evolution/web-extensions/libewebextension.so
%{_libdir}/evolution/web-extensions/module-itip-formatter-webextension.so
%{_libdir}/evolution/web-extensions/webkit-editor/module-webkit-editor-webextension.so
# Various libexec programs:
%dir %{_libexecdir}/evolution
%{_libexecdir}/evolution/evolution-alarm-notify
%{_libexecdir}/evolution/evolution-backup
%{_libexecdir}/evolution/killev
@ -546,6 +519,9 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%{evo_plugin_dir}/org-gnome-save-calendar.eplug
%{evo_plugin_dir}/liborg-gnome-save-calendar.so
%{evo_plugin_dir}/org-gnome-evolution-sender-validation.eplug
%{evo_plugin_dir}/liborg-gnome-evolution-sender-validation.so
%{evo_plugin_dir}/org-gnome-templates.eplug
%{evo_plugin_dir}/liborg-gnome-templates.so
@ -560,6 +536,8 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%{_libdir}/pkgconfig/evolution-shell-3.0.pc
%{_libdir}/pkgconfig/libemail-engine.pc
%if %{with_docs}
%files devel-docs
%doc %{_datadir}/gtk-doc/html/evolution-mail-composer
%doc %{_datadir}/gtk-doc/html/evolution-mail-engine
@ -567,10 +545,12 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%doc %{_datadir}/gtk-doc/html/evolution-shell
%doc %{_datadir}/gtk-doc/html/evolution-util
%files langpacks -f _build/translations.lang
%endif
%files langpacks -f translations.lang
%if %{with_docs}
%files help -f _build/help.lang
%files help -f help.lang
%endif
%files bogofilter
@ -588,103 +568,251 @@ grep -v "/usr/share/locale" evolution.lang > help.lang
%{evo_plugin_dir}/liborg-gnome-pst-import.so
%endif
%if %{with_tests}
%if %{enable_installed_tests}
%files tests
%{_libexecdir}/%{name}/installed-tests
%{_datadir}/installed-tests
%endif
%changelog
* Mon Mar 18 2024 Milan Crha <mcrha@redhat.com> - 3.28.5-26
- Resolves: RHEL-29169 (Composer: Cursor jumps to the starting line when "return" key is pressed at the end of the line)
* Thu Mar 14 2024 Milan Crha <mcrha@redhat.com> - 3.28.5-25
- Resolves: RHEL-29169 (Composer: Cursor jumps to the starting line when "return" key is pressed at the end of the line)
* Tue Dec 12 2023 Milan Crha <mcrha@redhat.com> - 3.28.5-24
- Resolves: RHEL-17661 (Composer: Cursor jumps over characters when using backspace or delete)
* Wed Oct 11 2023 Milan Crha <mcrha@redhat.com> - 3.28.5-23
- Related: RHEL-12398 (Move WebKitGTK parts in Evolution Data Server into optional subpackage)
* Wed Oct 11 2023 Milan Crha <mcrha@redhat.com> - 3.40.4-10
- Related: RHEL-12405 (Move WebKitGTK parts in Evolution Data Server into optional subpackage)
- Add dependency on newly introduced evolution-data-server-ui
* Wed Jan 04 2023 Milan Crha <mcrha@redhat.com> - 3.28.5-22
- Resolves: #2126523 (Update patch to handle frame flattening change in WebKitGTK)
* Tue Jan 03 2023 Milan Crha <mcrha@redhat.com> - 3.40.4-9
- Resolves: #2126524 (Update patch to handle frame flattening change in WebKitGTK)
* Mon Sep 26 2022 Milan Crha <mcrha@redhat.com> - 3.28.5-21
- Resolves: #2129702 (EShellWindow: The 'New' menu is not filled after start)
* Mon Sep 26 2022 Milan Crha <mcrha@redhat.com> - 3.40.4-8
- Resolves: #2129703 (EShellWindow: The 'New' menu is not filled after start)
- Correct Requires for the 'devel' subpackage to enchant-2
* Thu Sep 15 2022 Milan Crha <mcrha@redhat.com> - 3.28.5-20
- Resolves: #2127019 (Contacts: Prefer original value only when filled on contact merge)
* Wed Sep 14 2022 Milan Crha <mcrha@redhat.com> - 3.40.4-7
- Resolves: #2126524 (Add patch to handle frame flattening change in WebKitGTK)
* Wed Sep 14 2022 Milan Crha <mcrha@redhat.com> - 3.28.5-19
- Resolves: #2126523 (Add patch to handle frame flattening change in WebKitGTK)
* Mon Apr 25 2022 Milan Crha <mcrha@redhat.com> - 3.40.4-6
- Resolves: #2078369 (Disable hardware acceleration for WebKitGTK)
* Wed Jun 16 2021 Milan Crha <mcrha@redhat.com> - 3.28.5-18
- Resolves: #1972749 (PrintableOptions.cmake: Correct variable name comparison)
* Fri Apr 08 2022 Milan Crha <mcrha@redhat.com> - 3.40.4-5
- Related: #2071056 (Update zh_CN and ja translations in the patch)
* Mon May 17 2021 Milan Crha <mcrha@redhat.com> - 3.28.5-17
- Resolves: #1961192 (Add missing bundled() Provides for libgnomecanvas)
* Tue Apr 05 2022 Milan Crha <mcrha@redhat.com> - 3.40.4-4
- Resolves: #2071056 (Addressbook: Switch from GData Contacts API to CardDAV API for Google books)
- Resolves: #2071742 (Add patch to use correct colors in mail preview with webkit2gtk3 2.36.x)
* Mon Nov 30 2020 Milan Crha <mcrha@redhat.com> - 3.28.5-16
- Resolves: #1902630 (Crash on file drag into mail composer with WebKitGTK 2.30)
* Mon Feb 14 2022 Milan Crha <mcrha@redhat.com> - 3.40.4-3
- Resolves: #2054084 (ECompEditor: Timezone can be reset on component save)
* Wed Sep 30 2020 Milan Crha <mcrha@redhat.com> - 3.28.5-15
- Resolves: #1883619 (ECalendarItem: Settings loaded only when being shown)
* Mon Oct 11 2021 Milan Crha <mcrha@redhat.com> - 3.40.4-2
- Resolves: #2012701 (Empty emoji picker with gtk3 3.24.30)
* Thu Jun 11 2020 Milan Crha <mcrha@redhat.com> - 3.28.5-14
- Related: #1817143 (Add a small patch to behave better with WebKitGTK 2.28)
* Fri Aug 13 2021 Milan Crha <mcrha@redhat.com> - 3.40.4-1
- Related: #1992450 (Update to 3.40.4)
* Fri May 15 2020 Milan Crha <mcrha@redhat.com> - 3.28.5-13
- Resolves: #1836165 (Cannot type the date of a meeting)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.40.3-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Dec 03 2019 Milan Crha <mcrha@redhat.com> - 3.28.5-12
- Add patch for RH bug #1778799 (New Mail account wizard ignores email address change)
* Mon Jul 12 2021 Milan Crha <mcrha@redhat.com> - 3.40.3-1
- Related: #1981215 (Update to 3.40.3)
* Thu Oct 24 2019 Milan Crha <mcrha@redhat.com> - 3.28.5-11
- Update patch for RH bug #1764563 (CVE-2018-15587: Reposition signature bar)
* Fri Jun 04 2021 Milan Crha <mcrha@redhat.com> - 3.40.2-1
- Related: #1967855 (Update to 3.40.2)
* Wed Oct 23 2019 Milan Crha <mcrha@redhat.com> - 3.28.5-10
- Add patch for RH bug #1764563 (CVE-2018-15587: Reposition signature bar)
- Add patch for RH bug #1753220 (GalA11yETableItem: Incorrect implementation of AtkObjectClass::ref_child())
* Mon May 17 2021 Milan Crha <mcrha@redhat.com> - 3.40.1-2
- Resolves: #1961194 (Add missing bundled() Provides for libgnomecanvas)
* Fri Jun 28 2019 Milan Crha <mcrha@redhat.com> - 3.28.5-9
- Add patch for RH bug #1724984 ([ECompEditor] Ensure attendee changes stored before save)
* Fri Apr 30 2021 Milan Crha <mcrha@redhat.com> - 3.40.1-1
- Related: #1952776 (Update to 3.40.1)
* Thu Jun 27 2019 Milan Crha <mcrha@redhat.com> - 3.28.5-8
- Add patch for RH bug #1724659 (Make sure intltool-merge cache is created only once)
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.40.0-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Jun 27 2019 Milan Crha <mcrha@redhat.com> - 3.28.5-7
- Add patch for RH bug #1724232 (Help Contents (F1) has a bad link to GNOME site)
* Fri Mar 19 2021 Milan Crha <mcrha@redhat.com> - 3.40.0-1
- Update to 3.40.0
* Fri Oct 26 2018 Milan Crha <mcrha@redhat.com> - 3.28.5-6
- Add BuildRequires/Requires for 'killall' binary (RH bug #1643481)
* Fri Mar 12 2021 Milan Crha <mcrha@redhat.com> - 3.39.3-1
- Update to 3.39.3
* Mon Oct 15 2018 Milan Crha <mcrha@redhat.com> - 3.28.5-5
- Obsolete evolution-tests subpackage (RH bug #1638480)
* Fri Feb 12 2021 Milan Crha <mcrha@redhat.com> - 3.39.2-1
- Update to 3.39.2
* Mon Oct 01 2018 Milan Crha <mcrha@redhat.com> - 3.28.5-4
- Add patch for RH bug #1634665 (Deselects task/memo list when started in Calendar view)
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.39.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Sep 03 2018 Milan Crha <mcrha@redhat.com> - 3.28.5-3
- Add patch for RH bug #1624835 (Quoting of plain text mail into HTML mode mangles deeper levels)
- Add patch for RH bug #1624867 (Extra new line added in front of long URLs)
* Fri Jan 08 2021 Milan Crha <mcrha@redhat.com> - 3.39.1-1
- Update to 3.39.1
* Thu Aug 23 2018 Milan Crha <mcrha@redhat.com> - 3.28.5-2
- Add patch for RH bug #1620582 (Crash under config_lookup_thread() at e-config-lookup.c:179)
* Fri Nov 20 2020 Milan Crha <mcrha@redhat.com> - 3.38.2-1
- Update to 3.38.2
* Mon Jul 30 2018 Milan Crha <mcrha@redhat.com> - 3.28.5-1
- Update to 3.28.5
* Fri Oct 02 2020 Milan Crha <mcrha@redhat.com> - 3.38.1-1
- Update to 3.38.1
* Mon Jul 16 2018 Milan Crha <mcrha@redhat.com> - 3.28.4-1
- Update to 3.28.4
* Sat Sep 26 2020 Adrian Reber <adrian@lisas.de> - 3.38.0-2
- Rebuilt for protobuf 3.13
* Fri Jun 22 2018 Milan Crha <mcrha@redhat.com> - 3.28.3-2
- Disable evolution-tests subpackage, not much maintained upstream and requires python2
* Fri Sep 11 2020 Milan Crha <mcrha@redhat.com> - 3.38.0-1
- Update to 3.38.0
* Mon Jun 18 2018 Milan Crha <mcrha@redhat.com> - 3.28.3-1
- Update to 3.28.3
- Remove fix to strip closing > from URLs when linkifying (fixed upstream)
* Fri Sep 04 2020 Milan Crha <mcrha@redhat.com> - 3.37.92-1
- Update to 3.37.92
* Fri Aug 07 2020 Milan Crha <mcrha@redhat.com> - 3.37.90-1
- Update to 3.37.90
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.37.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 03 2020 Milan Crha <mcrha@redhat.com> - 3.37.3-1
- Update to 3.37.3
* Tue Jun 23 2020 Adam Williamson <awilliam@redhat.com> - 3.37.2-2
- Backport several fixes for annoying bugs from mainline
* Fri May 29 2020 Milan Crha <mcrha@redhat.com> - 3.37.2-1
- Update to 3.37.2
* Fri Apr 24 2020 Milan Crha <mcrha@redhat.com> - 3.37.1-1
- Update to 3.37.1
* Fri Mar 27 2020 Milan Crha <mcrha@redhat.com> - 3.36.1-1
- Update to 3.36.1
* Fri Mar 06 2020 Milan Crha <mcrha@redhat.com> - 3.36.0-1
- Update to 3.36.0
* Fri Feb 28 2020 Milan Crha <mcrha@redhat.com> - 3.35.92-1
- Update to 3.35.92
* Fri Feb 14 2020 Milan Crha <mcrha@redhat.com> - 3.35.91-1
- Update to 3.35.91
* Fri Jan 31 2020 Milan Crha <mcrha@redhat.com> - 3.35.90-1
- Update to 3.35.90
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.35.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jan 16 2020 Kalev Lember <klember@redhat.com> - 3.35.3-3
- Rebuilt for libgnome-desktop soname bump
* Mon Jan 06 2020 Milan Crha <mcrha@redhat.com> - 3.35.3-2
- Enable TNEF support for Fedora
* Fri Jan 03 2020 Milan Crha <mcrha@redhat.com> - 3.35.3-1
- Update to 3.35.3
* Fri Nov 22 2019 Milan Crha <mcrha@redhat.com> - 3.35.2-1
- Update to 3.35.2
* Fri Oct 11 2019 Milan Crha <mcrha@redhat.com> - 3.35.1-1
- Update to 3.35.1
* Mon Oct 07 2019 Milan Crha <mcrha@redhat.com> - 3.34.1-1
- Update to 3.34.1
* Mon Sep 09 2019 Milan Crha <mcrha@redhat.com> - 3.34.0-1
- Update to 3.34.0
* Mon Sep 02 2019 Milan Crha <mcrha@redhat.com> - 3.33.92-1
- Update to 3.33.92
* Mon Aug 19 2019 Milan Crha <mcrha@redhat.com> - 3.33.91-1
- Update to 3.33.91
* Mon Aug 05 2019 Milan Crha <mcrha@redhat.com> - 3.33.90-1
- Update to 3.33.90
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.33.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Jul 21 2019 Kalev Lember <klember@redhat.com> - 3.33.4-2
- Rebuilt for libgnome-desktop soname bump
* Mon Jul 15 2019 Milan Crha <mcrha@redhat.com> - 3.33.4-1
- Update to 3.33.4
* Mon Jul 08 2019 Kalev Lember <klember@redhat.com> - 3.33.3-2
- Rebuilt for libgweather soname bump
* Mon Jun 17 2019 Milan Crha <mcrha@redhat.com> - 3.33.3-1
- Update to 3.33.3
* Mon May 20 2019 Milan Crha <mcrha@redhat.com> - 3.33.2-1
- Update to 3.33.2
* Mon Apr 22 2019 Milan Crha <mcrha@redhat.com> - 3.33.1-1
- Update to 3.33.1
* Mon Apr 08 2019 Milan Crha <mcrha@redhat.com> - 3.32.1-1
- Update to 3.32.1
* Mon Mar 11 2019 Milan Crha <mcrha@redhat.com> - 3.32.0-1
- Update to 3.32.0
* Mon Mar 04 2019 Milan Crha <mcrha@redhat.com> - 3.31.92-1
- Update to 3.31.92
* Mon Feb 18 2019 Milan Crha <mcrha@redhat.com> - 3.31.91-1
- Update to 3.31.91
* Mon Feb 04 2019 Milan Crha <mcrha@redhat.com> - 3.31.90-1
- Update to 3.31.90
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.31.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 07 2019 Milan Crha <mcrha@redhat.com> - 3.31.4-1
- Update to 3.31.4
* Mon Dec 10 2018 Milan Crha <mcrha@redhat.com> - 3.31.3-1
- Update to 3.31.3
* Mon Nov 12 2018 Milan Crha <mcrha@redhat.com> - 3.31.2-1
- Update to 3.31.2
* Fri Oct 26 2018 Milan Crha <mcrha@redhat.com> - 3.31.1-2
- Obsolete evolution-tests subpackage
- Add BuildRequires/Requires for 'killall' binary
* Mon Oct 08 2018 Milan Crha <mcrha@redhat.com> - 3.31.1-1
- Update to 3.31.1
* Mon Sep 24 2018 Milan Crha <mcrha@redhat.com> - 3.30.1-1
- Update to 3.30.1
- Remove patch for GNOME Evolution issue #86 (fixed upstream)
- Disable tests subpackage - it uses python2 and it is unmaintained upstream
- Remove BuildRequires on bogofilter and spamassassin
* Mon Sep 03 2018 Milan Crha <mcrha@redhat.com> - 3.30.0-1
- Update to 3.30.0
- Add patch for GNOME Evolution issue #86 (Quoting of plain text mail into HTML mode mangles deeper levels)
* Mon Aug 27 2018 Milan Crha <mcrha@redhat.com> - 3.29.92-1
- Update to 3.29.92
* Mon Aug 13 2018 Milan Crha <mcrha@redhat.com> - 3.29.91-1
- Update to 3.29.91
* Mon Jul 30 2018 Milan Crha <mcrha@redhat.com> - 3.29.90-1
- Update to 3.29.90
* Mon Jul 16 2018 Milan Crha <mcrha@redhat.com> - 3.29.4-1
- Update to 3.29.4
- Change dependencies of the tests subpackage and do not precompile the scripts there
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.29.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 18 2018 Milan Crha <mcrha@redhat.com> - 3.29.3-1
- Update to 3.29.3
* Mon May 21 2018 Milan Crha <mcrha@redhat.com> - 3.29.2-1
- Update to 3.29.2
* Mon Apr 16 2018 Milan Crha <mcrha@redhat.com> - 3.29.1-1
- Update to 3.29.1
- Remove fix to strip closing > from URLs when linkifying (BGO#795108) (Fixed upstream)
* Tue Apr 10 2018 Adam Williamson <awilliam@redhat.com> - 3.28.1-2
- Backport fix to strip closing > from URLs when linkifying (BGO#795108)