Commit f002735d10a8eac8df7d6ebc5e081b8511315507
1 parent
6d9d4251
Exists in
master
and in
1 other branch
Addin "copy as table" action
Fixing warning.
Showing
2 changed files
with
27 additions
and
3 deletions
Show diff stats
src/terminal/actions/action.c
| ... | ... | @@ -170,7 +170,7 @@ |
| 170 | 170 | void V3270Action_init(V3270Action *action) { |
| 171 | 171 | |
| 172 | 172 | static const LIB3270_PROPERTY default_info = { |
| 173 | - .name = "unnamed" | |
| 173 | + .name = NULL | |
| 174 | 174 | }; |
| 175 | 175 | |
| 176 | 176 | action->terminal = NULL; |
| ... | ... | @@ -237,8 +237,8 @@ |
| 237 | 237 | |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | - void set_property(GObject *object, guint G_GNUC_UNUSED(prop_id), const GValue G_GNUC_UNUSED(*value), GParamSpec *pspec) { | |
| 241 | - g_message("Action %s property %s is read-only",g_action_get_name(G_ACTION(object)),pspec->name); | |
| 240 | + void set_property(GObject G_GNUC_UNUSED(*object), guint G_GNUC_UNUSED(prop_id), const GValue G_GNUC_UNUSED(*value), GParamSpec *pspec) { | |
| 241 | +// g_message("Action %s property %s is read-only",g_action_get_name(G_ACTION(object)),pspec->name); | |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | static gboolean bg_notify_enabled(GObject *action) { | ... | ... |
src/terminal/actions/table.c
| ... | ... | @@ -96,6 +96,18 @@ |
| 96 | 96 | }, |
| 97 | 97 | |
| 98 | 98 | { |
| 99 | + .flags = V3270_COPY_TABLE, | |
| 100 | + .group = LIB3270_ACTION_GROUP_SELECTION, | |
| 101 | + .name = "copy-table", | |
| 102 | + .icon = "edit-copy", | |
| 103 | + .label = N_( "Copy as table" ), | |
| 104 | + .summary = N_( "Copy as table" ), | |
| 105 | + .key = 'c', | |
| 106 | + .mods = GDK_SHIFT_MASK|GDK_ALT_MASK, | |
| 107 | + .activate = fire_copy_accelerator | |
| 108 | + }, | |
| 109 | + | |
| 110 | + { | |
| 99 | 111 | .flags = V3270_ACTION_FLAG_CUT|V3270_COPY_DEFAULT, |
| 100 | 112 | .group = LIB3270_ACTION_GROUP_SELECTION, |
| 101 | 113 | .name = "cut", |
| ... | ... | @@ -130,6 +142,18 @@ |
| 130 | 142 | }, |
| 131 | 143 | |
| 132 | 144 | { |
| 145 | + .flags = V3270_ACTION_FLAG_CUT|V3270_COPY_TABLE, | |
| 146 | + .group = LIB3270_ACTION_GROUP_SELECTION, | |
| 147 | + .name = "cut-table", | |
| 148 | + .icon = "edit-cut", | |
| 149 | + .label = N_( "Cut as table" ), | |
| 150 | + .summary = N_( "Cut as table" ), | |
| 151 | + .key = 'x', | |
| 152 | + .mods = GDK_SHIFT_MASK|GDK_ALT_MASK, | |
| 153 | + .activate = fire_copy_accelerator | |
| 154 | + }, | |
| 155 | + | |
| 156 | + { | |
| 133 | 157 | .flags = 0, |
| 134 | 158 | .group = LIB3270_ACTION_GROUP_ONLINE, |
| 135 | 159 | .name = "paste", | ... | ... |