[evolution] Bug 751915 - Crash when using both internal and external editors to compose plain-text mail
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 751915 - Crash when using both internal and external editors to compose plain-text mail
- Date: Tue, 7 Jul 2015 09:45:16 +0000 (UTC)
commit 2e5d4f86700c0ab3cea3d4469118c8e43c720605
Author: Tomas Popela <tpopela redhat com>
Date: Tue Jul 7 11:43:43 2015 +0200
Bug 751915 - Crash when using both internal and external editors to compose plain-text mail
We need to clear the history before we open the external editor (as when the
text from external editor will be loaded back to composer the history won't
be valid).
e-util/e-html-editor-view.c | 8 ++++----
e-util/e-html-editor-view.h | 2 ++
plugins/external-editor/external-editor.c | 7 +++++++
3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 8721a93..0770ce0 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -9721,8 +9721,8 @@ wrap_paragraphs_in_quoted_content (EHTMLEditorSelection *selection,
g_object_unref (paragraphs);
}
-static void
-remove_whole_event_history (EHTMLEditorView *view)
+void
+e_html_editor_view_clear_history (EHTMLEditorView *view)
{
EHTMLEditorViewHistoryEvent *ev;
@@ -9934,7 +9934,7 @@ e_html_editor_view_set_html_mode (EHTMLEditorView *view,
style_updated_cb (view);
out:
- remove_whole_event_history (view);
+ e_html_editor_view_clear_history (view);
g_object_notify (G_OBJECT (view), "html-mode");
}
@@ -10127,7 +10127,7 @@ e_html_editor_view_init (EHTMLEditorView *view)
view->priv->im_input_in_progress = FALSE;
view->priv->history = NULL;
- remove_whole_event_history (view);
+ e_html_editor_view_clear_history (view);
e_html_editor_view_update_fonts (view);
style_updated_cb (view);
diff --git a/e-util/e-html-editor-view.h b/e-util/e-html-editor-view.h
index bf5ad64..469d99b 100644
--- a/e-util/e-html-editor-view.h
+++ b/e-util/e-html-editor-view.h
@@ -294,6 +294,8 @@ void e_html_editor_view_redo (EHTMLEditorView *view);
void e_html_editor_view_insert_new_history_event
(EHTMLEditorView *view,
EHTMLEditorViewHistoryEvent *event);
+void e_html_editor_view_clear_history
+ (EHTMLEditorView *view);
gboolean e_html_editor_view_is_undo_redo_in_progress
(EHTMLEditorView *view);
void e_html_editor_view_set_undo_redo_in_progress
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 31ad139..d263566 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -453,6 +453,9 @@ finished:
static void launch_editor (GtkAction *action, EMsgComposer *composer)
{
+ EHTMLEditor *editor;
+ EHTMLEditorView *view;
+
d (printf ("\n\nexternal_editor plugin is launched \n\n"));
if (editor_running ()) {
@@ -460,6 +463,10 @@ static void launch_editor (GtkAction *action, EMsgComposer *composer)
return;
}
+ editor = e_msg_composer_get_editor (composer);
+ view = e_html_editor_get_view (editor);
+
+ e_html_editor_view_clear_history (view);
disable_composer (composer);
g_mutex_lock (&external_editor_running_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]