[evolution] EHTMLEditorActions - Activating the Paste as Text and Paste Quotation from context menu does nothing
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorActions - Activating the Paste as Text and Paste Quotation from context menu does nothing
- Date: Fri, 27 Feb 2015 10:33:28 +0000 (UTC)
commit b971d5c0b8dc14190765e6b059617d9bafad7a5e
Author: Tomas Popela <tpopela redhat com>
Date: Fri Feb 27 10:38:39 2015 +0100
EHTMLEditorActions - Activating the Paste as Text and Paste Quotation from context menu does nothing
If the view is not focused, grab focus and do the action.
e-util/e-html-editor-actions.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/e-util/e-html-editor-actions.c b/e-util/e-html-editor-actions.c
index 5d4204a..d29213a 100644
--- a/e-util/e-html-editor-actions.c
+++ b/e-util/e-html-editor-actions.c
@@ -718,10 +718,11 @@ action_paste_as_text_cb (GtkAction *action,
{
EHTMLEditorView *view = e_html_editor_get_view (editor);
- if (gtk_widget_has_focus (GTK_WIDGET (view))) {
- e_html_editor_view_paste_as_text (view);
- e_html_editor_view_force_spell_check (view);
- }
+ if (!gtk_widget_has_focus (GTK_WIDGET (view)))
+ gtk_widget_grab_focus (GTK_WIDGET (view));
+
+ e_html_editor_view_paste_as_text (view);
+ e_html_editor_view_force_spell_check (view);
}
static void
@@ -730,10 +731,11 @@ action_paste_quote_cb (GtkAction *action,
{
EHTMLEditorView *view = e_html_editor_get_view (editor);
- if (gtk_widget_has_focus (GTK_WIDGET (view))) {
- e_html_editor_view_paste_clipboard_quoted (view);
- e_html_editor_view_force_spell_check (view);
- }
+ if (!gtk_widget_has_focus (GTK_WIDGET (view)))
+ gtk_widget_grab_focus (GTK_WIDGET (view));
+
+ e_html_editor_view_paste_clipboard_quoted (view);
+ e_html_editor_view_force_spell_check (view);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]