X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/4c77d5e0aec3c7aab32965ca4e02abb17bb6108f..e13ab673e45ea48de49661f7838e75925f405514:/src/clipboard.c diff --git a/src/clipboard.c b/src/clipboard.c index afc16f98..3a6f4910 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@ -19,9 +19,18 @@ * */ -#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif #include @@ -101,7 +110,7 @@ static void clip_receive_viking ( GtkClipboard *c, GtkSelectionData *sd, gpointe } else a_dialog_error_msg_extra ( VIK_GTK_WINDOW_FROM_WIDGET(GTK_WIDGET(vlp)), - _("The clipboard contains sublayer data for a %s layers." + _("The clipboard contains sublayer data for %s layers. " "You must select a layer of this type to paste the clipboard data."), vik_layer_get_interface(vc->layer_type)->name ); } @@ -312,10 +321,10 @@ void a_clipboard_copy_selected ( VikLayersPanel *vlp ) return; vik_treeview_get_selected_iter ( sel->vt, &iter ); + layer_type = sel->type; if ( vik_treeview_item_get_type ( sel->vt, &iter ) == VIK_TREEVIEW_TYPE_SUBLAYER ) { type = VIK_CLIPBOARD_DATA_SUBLAYER; - layer_type = sel->type; if ( vik_layer_get_interface(layer_type)->copy_item) { subtype = vik_treeview_item_get_data(sel->vt, &iter); vik_layer_get_interface(layer_type)->copy_item(sel, subtype, vik_treeview_item_get_pointer(sel->vt, &iter), &data, &len );