Add html target to output viewer clipboard
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 24 May 2010 07:34:00 +0000 (09:34 +0200)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 24 May 2010 16:27:24 +0000 (09:27 -0700)
src/ui/gui/psppire-output-window.c

index 3107547bbdf15e801a09a1493bcfc8a97f3f049d..f2580b7b16ca225844caa6ecc5bb150fc8d49658 100644 (file)
@@ -624,6 +624,10 @@ clipboard_get_cb (GtkClipboard     *clipboard,
       string_map_insert (&options, "format", "txt");
       break;
 
+    case SELECT_FMT_HTML:
+      string_map_insert (&options, "format", "html");
+      break;
+
     default:
       goto finish;
       break;
@@ -647,7 +651,8 @@ clipboard_get_cb (GtkClipboard     *clipboard,
       n = n->next;
     }
 
-  driver->class->flush (driver);
+  if ( driver->class->flush)
+    driver->class->flush (driver);
 
   if ( g_file_get_contents (filename, &text, &length, NULL) )
     {
@@ -683,9 +688,7 @@ static const GtkTargetEntry targets[] = {
   { "UTF8_STRING",   0, SELECT_FMT_UTF8 },
   { "text/plain;charset=utf-8", 0, SELECT_FMT_UTF8 },
 
-  /*
   { "text/html",     0, SELECT_FMT_HTML }
-  */
 };
 
 static void