From f002735d10a8eac8df7d6ebc5e081b8511315507 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 6 Jan 2020 16:57:14 -0300 Subject: [PATCH] Addin "copy as table" action Fixing warning. --- src/terminal/actions/action.c | 6 +++--- src/terminal/actions/table.c | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/terminal/actions/action.c b/src/terminal/actions/action.c index 78a167c..f99839d 100644 --- a/src/terminal/actions/action.c +++ b/src/terminal/actions/action.c @@ -170,7 +170,7 @@ void V3270Action_init(V3270Action *action) { static const LIB3270_PROPERTY default_info = { - .name = "unnamed" + .name = NULL }; action->terminal = NULL; @@ -237,8 +237,8 @@ } - void set_property(GObject *object, guint G_GNUC_UNUSED(prop_id), const GValue G_GNUC_UNUSED(*value), GParamSpec *pspec) { - g_message("Action %s property %s is read-only",g_action_get_name(G_ACTION(object)),pspec->name); + void set_property(GObject G_GNUC_UNUSED(*object), guint G_GNUC_UNUSED(prop_id), const GValue G_GNUC_UNUSED(*value), GParamSpec *pspec) { +// g_message("Action %s property %s is read-only",g_action_get_name(G_ACTION(object)),pspec->name); } static gboolean bg_notify_enabled(GObject *action) { diff --git a/src/terminal/actions/table.c b/src/terminal/actions/table.c index 1ace65a..57f06da 100644 --- a/src/terminal/actions/table.c +++ b/src/terminal/actions/table.c @@ -96,6 +96,18 @@ }, { + .flags = V3270_COPY_TABLE, + .group = LIB3270_ACTION_GROUP_SELECTION, + .name = "copy-table", + .icon = "edit-copy", + .label = N_( "Copy as table" ), + .summary = N_( "Copy as table" ), + .key = 'c', + .mods = GDK_SHIFT_MASK|GDK_ALT_MASK, + .activate = fire_copy_accelerator + }, + + { .flags = V3270_ACTION_FLAG_CUT|V3270_COPY_DEFAULT, .group = LIB3270_ACTION_GROUP_SELECTION, .name = "cut", @@ -130,6 +142,18 @@ }, { + .flags = V3270_ACTION_FLAG_CUT|V3270_COPY_TABLE, + .group = LIB3270_ACTION_GROUP_SELECTION, + .name = "cut-table", + .icon = "edit-cut", + .label = N_( "Cut as table" ), + .summary = N_( "Cut as table" ), + .key = 'x', + .mods = GDK_SHIFT_MASK|GDK_ALT_MASK, + .activate = fire_copy_accelerator + }, + + { .flags = 0, .group = LIB3270_ACTION_GROUP_ONLINE, .name = "paste", -- libgit2 0.21.2