diff --git a/src/objects/actions/clipboard.c b/src/objects/actions/clipboard.c index 2dc4d9e..d445813 100644 --- a/src/objects/actions/clipboard.c +++ b/src/objects/actions/clipboard.c @@ -49,10 +49,15 @@ } - static void activate_paste(GAction G_GNUC_UNUSED(*action), GVariant G_GNUC_UNUSED(*parameter), GtkWidget *terminal) { + static void activate_paste(GAction G_GNUC_UNUSED(*action), GVariant *parameter, GtkWidget *terminal) { - debug("%s",__FUNCTION__); - v3270_paste(terminal); + debug("%s %p",__FUNCTION__,parameter); + + if(!parameter) { + v3270_paste(terminal); + } else { + v3270_paste_from_url(terminal,g_variant_get_string(parameter,NULL)); + } } @@ -123,10 +128,11 @@ }; - GAction * action = pw3270_action_new_from_lib3270(&action_descriptor); + pw3270Action * action = PW3270_ACTION(pw3270_action_new_from_lib3270(&action_descriptor)); - PW3270_ACTION(action)->activate = activate_paste; + action->types.parameter = G_VARIANT_TYPE_STRING; + action->activate = activate_paste; - return action; + return G_ACTION(action); } diff --git a/ui/application.xml b/ui/application.xml index e220acb..fe7b04d 100644 --- a/ui/application.xml +++ b/ui/application.xml @@ -135,20 +135,22 @@ Paste from clipboard win.paste + clipboard:// Paste next - win.paste_next + win.paste + next:// - Paste text file - win.paste_file + Paste from text file + win.paste + file:// -
-- libgit2 0.21.2