[evolution] Bug 771268 - [WK2] Prefer text over image on Paste
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 771268 - [WK2] Prefer text over image on Paste
- Date: Wed, 21 Sep 2016 08:41:09 +0000 (UTC)
commit 81c52e43904074fee012b24a063f520ed85006ef
Author: Tomas Popela <tpopela redhat com>
Date: Wed Sep 21 10:37:44 2016 +0200
Bug 771268 - [WK2] Prefer text over image on Paste
Prefer text and HTML content over others when pasting the clipboard content.
composer/e-msg-composer.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 23c29a2..a2a9b89 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1720,17 +1720,25 @@ msg_composer_paste_clipboard_targets_cb (GtkClipboard *clipboard,
if (targets == NULL || n_targets < 0)
return;
+ editor = e_msg_composer_get_editor (composer);
+ cnt_editor = e_html_editor_get_content_editor (editor);
+
/* Order is important here to ensure common use cases are
* handled correctly. See GNOME bug #603715 for details. */
+ if (gtk_targets_include_text (targets, n_targets) ||
+ e_targets_include_html (targets, n_targets)) {
+ if (composer->priv->last_signal_was_paste_primary) {
+ e_content_editor_paste_primary (cnt_editor);
+ } else
+ e_content_editor_paste (cnt_editor);
+ return;
+ }
if (gtk_targets_include_uri (targets, n_targets)) {
e_composer_paste_uris (composer, clipboard);
return;
}
- editor = e_msg_composer_get_editor (composer);
- cnt_editor = e_html_editor_get_content_editor (editor);
-
if (!e_content_editor_get_html_mode (cnt_editor) &&
gtk_targets_include_image (targets, n_targets, TRUE)) {
e_composer_paste_image (composer, clipboard);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]