[Xfce4-commits] <xfce4-dict:master> When pasting text in the speed reader, query only the main clipboard
Enrico Tröger
noreply at xfce.org
Sun Jun 6 13:02:01 CEST 2010
Updating branch refs/heads/master
to 87998b7a3257af530997e9f3bf6decbffd0aa9f0 (commit)
from 5a7847bba8e4ff031ae4aa283be47840bd22226c (commit)
commit 87998b7a3257af530997e9f3bf6decbffd0aa9f0
Author: Enrico Tröger <enrico.troeger at uvena.de>
Date: Sat Jun 5 13:41:00 2010 +0200
When pasting text in the speed reader, query only the main clipboard
This mostly reverts the previous related commit as it turned out that
it would most often paste the selected text from the search field
which we don't want.
lib/speedreader.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/lib/speedreader.c b/lib/speedreader.c
index 069ca72..a3514d1 100644
--- a/lib/speedreader.c
+++ b/lib/speedreader.c
@@ -548,14 +548,9 @@ static void sr_clear_clicked_cb(GtkButton *button, GtkTextBuffer *buffer)
static void sr_paste_clicked_cb(GtkButton *button, GtkTextBuffer *buffer)
{
- gchar *text;
- gtk_text_buffer_set_text(buffer, "", 0);
- text = dict_get_clipboard_contents();
- if (text != NULL)
- {
- gtk_text_buffer_set_text(buffer, text, -1);
- g_free(text);
- }
+ GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ gtk_text_buffer_set_text(buffer, "", 0);
+ gtk_text_buffer_paste_clipboard(buffer, clipboard, NULL, TRUE);
}
More information about the Xfce4-commits
mailing list