From 8195f1f7c4693838e73f23ab95ba60707faf6446 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 05 Jan 2005 16:18:13 +0000 Subject: Implement Edit->Copy 2005-01-05 Marco Pesenti Gritti * shell/ev-view.c: (ev_view_copy): * shell/ev-view.h: * shell/ev-window.c: (ev_window_cmd_edit_copy): Implement Edit->Copy --- (limited to 'shell/ev-view.c') 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, -- cgit v0.9.1