Compare commits
No commits in common. 'c9' and 'i8c' have entirely different histories.
@ -1,2 +1 @@
|
||||
2ad33472d280d83737884a0e60a9236793653111 SOURCES/emoji.data
|
||||
2b480d7dd297d84c1b1321f5c90bd0e35d566433 SOURCES/evolution-3.40.4.tar.xz
|
||||
4e88744b1ae02e2d49c220b2e981007eae701bb0 SOURCES/evolution-3.28.5.tar.xz
|
||||
|
@ -1,2 +1 @@
|
||||
SOURCES/emoji.data
|
||||
SOURCES/evolution-3.40.4.tar.xz
|
||||
SOURCES/evolution-3.28.5.tar.xz
|
||||
|
@ -0,0 +1,44 @@
|
||||
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()
|
@ -0,0 +1,37 @@
|
||||
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. */
|
@ -0,0 +1,17 @@
|
||||
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);
|
@ -0,0 +1,314 @@
|
||||
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 (
|
@ -0,0 +1,383 @@
|
||||
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;
|
@ -0,0 +1,46 @@
|
||||
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)) {
|
@ -0,0 +1,156 @@
|
||||
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
|
@ -0,0 +1,66 @@
|
||||
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");
|
@ -0,0 +1,583 @@
|
||||
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);
|
@ -0,0 +1,200 @@
|
||||
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",
|
@ -0,0 +1,36 @@
|
||||
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
|
||||
|
@ -0,0 +1,42 @@
|
||||
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
|
||||
|
@ -0,0 +1,133 @@
|
||||
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
|
||||
|
@ -0,0 +1,338 @@
|
||||
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);
|
@ -0,0 +1,35 @@
|
||||
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
|
@ -0,0 +1,39 @@
|
||||
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
|
@ -0,0 +1,110 @@
|
||||
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);
|
@ -1,68 +0,0 @@
|
||||
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
|
||||
|
@ -1,56 +0,0 @@
|
||||
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));
|
||||
}
|
||||
|
@ -1,468 +0,0 @@
|
||||
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
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# see https://gitlab.gnome.org/GNOME/glib/issues/1737
|
||||
# previous versions used milliseconds instead of seconds as the timeout argument",
|
||||
(`pkg-config --atleast-version 2.60.1 gio-2.0` || `pkg-config --atleast-version 2.61.0 gio-2.0`) && TIMEOUTMULT= || TIMEOUTMULT=000
|
||||
|
||||
sed -e "s|\@SOURCES_SERVICE\@|$(pkg-config --variable=sourcesdbusservicename evolution-data-server-1.2)|" \
|
||||
-e "s|\@ADDRESSBOOK_SERVICE\@|$(pkg-config --variable=addressbookdbusservicename evolution-data-server-1.2)|" \
|
||||
-e "s|\@CALENDAR_SERVICE\@|$(pkg-config --variable=calendardbusservicename evolution-data-server-1.2)|" \
|
||||
-e "s|\@TIMEOUTMULT\@|${TIMEOUTMULT}|"
|
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "--quit" -o "$1" = "--force-shutdown" ]; then
|
||||
/app/bin/evolution.bin "$@"
|
||||
else
|
||||
export BOGOFILTER_DIR="${XDG_DATA_HOME}/bogofilter/"
|
||||
export GIO_USE_NETWORK_MONITOR=base
|
||||
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
|
@ -1,51 +0,0 @@
|
||||
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
|
||||
|
@ -1,27 +0,0 @@
|
||||
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
|
||||
|
Loading…
Reference in new issue