]> git.street.me.uk Git - andy/viking.git/blobdiff - src/clipboard.c
Refactoring: retrieve the VikWindow from the VikViewport via its GtkWidget nature
[andy/viking.git] / src / clipboard.c
index dc98a5883b47229711527738d0e11c13ef9f3c17..6f747ee15b5ce2fc139ec4369d60ac0930cb3224 100644 (file)
@@ -51,11 +51,6 @@ static void clip_get ( GtkClipboard *c, GtkSelectionData *selection_data, guint
     //    g_print("clip_get: vc = %p, size = %d\n", vc, sizeof(*vc) + vc->len);
     gtk_selection_data_set ( selection_data, selection_data->target, 8, (void *)vc, sizeof(*vc) + vc->len );
   }
-  if (info==1) {
-    if (vc->type == VIK_CLIPBOARD_DATA_LAYER) {
-      gtk_selection_data_set_text ( selection_data, VIK_LAYER(vc->clipboard)->name, -1 );
-    } 
-  }
 }
 
 static void clip_clear ( GtkClipboard *c, gpointer p )
@@ -322,8 +317,10 @@ void a_clipboard_copy_selected ( VikLayersPanel *vlp )
   }
   else
   {
+    gint ilen;
     type = VIK_CLIPBOARD_DATA_LAYER;
-    vik_layer_marshall ( sel, &data, &len );
+    vik_layer_marshall ( sel, &data, &ilen );
+    len = ilen;
   }
 
   if (data)