Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-view.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2005-01-05 16:18:13 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-01-05 16:18:13 (GMT)
commit8195f1f7c4693838e73f23ab95ba60707faf6446 (patch)
treef63f58eadfb22cf3dbe992da5e60c5572f59eed7 /shell/ev-view.c
parent9c1e6ba4d99cb7f937b2b3998814a7486b88c4ce (diff)
Implement Edit->Copy
2005-01-05 Marco Pesenti Gritti <marco@gnome.org> * shell/ev-view.c: (ev_view_copy): * shell/ev-view.h: * shell/ev-window.c: (ev_window_cmd_edit_copy): Implement Edit->Copy
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index bd50b38..9936ce1 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -421,6 +421,19 @@ ev_view_expose_event (GtkWidget *widget,
return FALSE;
}
+void
+ev_view_copy (EvView *ev_view)
+{
+ GtkClipboard *clipboard;
+ char *text;
+
+ text = ev_document_get_text (ev_view->document, &ev_view->selection);
+ clipboard = gtk_widget_get_clipboard (GTK_WIDGET (ev_view),
+ GDK_SELECTION_CLIPBOARD);
+ gtk_clipboard_set_text (clipboard, text, -1);
+ g_free (text);
+}
+
static void
ev_view_primary_get_cb (GtkClipboard *clipboard,
GtkSelectionData *selection_data,