+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
+
2005-01-05 Marco Pesenti Gritti <marco@gnome.org>
* backend/ev-document.c: (ev_document_get_text):
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,
typedef struct _EvView EvView;
typedef struct _EvViewClass EvViewClass;
-GType ev_view_get_type (void) G_GNUC_CONST;
-GtkWidget* ev_view_new (void);
-
-void ev_view_set_document (EvView *view,
- EvDocument *document);
-void ev_view_set_page (EvView *view,
- int page);
-int ev_view_get_page (EvView *view);
-
-void ev_view_zoom_in (EvView *view);
-void ev_view_zoom_out (EvView *view);
-void ev_view_normal_size (EvView *view);
-void ev_view_best_fit (EvView *view);
-void ev_view_fit_width (EvView *view);
+GType ev_view_get_type (void) G_GNUC_CONST;
+GtkWidget* ev_view_new (void);
+void ev_view_copy (EvView *view);
+void ev_view_set_document (EvView *view,
+ EvDocument *document);
+void ev_view_set_page (EvView *view,
+ int page);
+int ev_view_get_page (EvView *view);
+void ev_view_zoom_in (EvView *view);
+void ev_view_zoom_out (EvView *view);
+void ev_view_normal_size (EvView *view);
+void ev_view_best_fit (EvView *view);
+void ev_view_fit_width (EvView *view);
char* ev_view_get_find_status_message (EvView *view);