Enable the Edit Copy functionality
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 7 Aug 2016 13:56:50 +0000 (15:56 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 7 Aug 2016 13:56:50 +0000 (15:56 +0200)
src/ui/gui/psppire-data-window.c

index aa48d0e02c409c74ad89a7496ad4fe412454a28b..5273c6170dab520f85d3846cc089b07585728bfa 100644 (file)
@@ -45,6 +45,8 @@
 #include "gl/c-strcasestr.h"
 #include "gl/xvasprintf.h"
 
+#include "ui/gui/efficient-sheet/jmd-sheet.h"
+
 #include "find-dialog.h"
 #include "psppire-dialog-action-1sks.h"
 #include "psppire-dialog-action-aggregate.h"
@@ -1076,14 +1078,15 @@ on_cut (PsppireDataWindow *dw)
 static void
 on_copy (PsppireDataWindow *dw)
 {
-#if SHEET_MERGE
   int p = gtk_notebook_get_current_page (GTK_NOTEBOOK (dw->data_editor));
   if (p == 0)
     {
-      PsppireDataSheet *ds = psppire_data_editor_get_active_data_sheet (dw->data_editor);
-      psppire_data_sheet_edit_copy (ds);
+      GtkClipboard *clip =
+       gtk_clipboard_get_for_display (gtk_widget_get_display (GTK_WIDGET (dw)),
+                                  GDK_SELECTION_CLIPBOARD);
+
+      jmd_sheet_set_clip (JMD_SHEET (dw->data_editor->data_sheet), clip);
     }
-#endif
 }
 
 static void