From 1e3a0d8a0d937256c2555f52c0df7b47217457fb Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 20 Aug 2021 16:48:08 -0300 Subject: [PATCH] Adding nick for toggles, removing 'gtk-' from icons. --- src/core/actions/table.c | 6 +++--- src/core/toggles/table.c | 5 +++++ src/include/lib3270/toggle.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/core/actions/table.c b/src/core/actions/table.c index d566ef2..cceeedf 100644 --- a/src/core/actions/table.c +++ b/src/core/actions/table.c @@ -108,7 +108,7 @@ const LIB3270_ACTION * lib3270_get_actions() { .type = LIB3270_ACTION_TYPE_NETWORK, .keys = NULL, - .icon = "gtk-connect", + .icon = "connect", .label = N_( "_Reconnect" ), .summary = N_( "Reconnect to the same host" ), .activate = connect_host, @@ -122,7 +122,7 @@ const LIB3270_ACTION * lib3270_get_actions() { .type = LIB3270_ACTION_TYPE_NETWORK, .keys = NULL, - .icon = "gtk-disconnect", + .icon = "disconnect", .label = N_( "_Disconnect" ), .summary = N_( "Disconnect from host" ), .activate = lib3270_disconnect, @@ -601,7 +601,7 @@ const LIB3270_ACTION * lib3270_get_actions() { .type = LIB3270_ACTION_TYPE_GENERIC, .keys = NULL, - .icon = "gtk-ok", + .icon = "ok", .label = N_("Enter"), .summary = N_( "Send an \"Enter\" action" ), .activate = lib3270_enter, diff --git a/src/core/toggles/table.c b/src/core/toggles/table.c index af7be17..a30f1e2 100644 --- a/src/core/toggles/table.c +++ b/src/core/toggles/table.c @@ -86,6 +86,7 @@ const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = { { .id = LIB3270_TOGGLE_DS_TRACE, .name = "dstrace", + .nick = "ds", .def = False, .key = NULL, // Default keycode .icon = NULL, // Icon name @@ -116,6 +117,7 @@ const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = { { .id = LIB3270_TOGGLE_SCREEN_TRACE, .name = "screentrace", + .nick = "sc", .def = False, .key = NULL, // Default keycode .icon = NULL, // Icon name @@ -126,6 +128,7 @@ const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = { { .id = LIB3270_TOGGLE_EVENT_TRACE, .name = "eventtrace", + .nick = "ev", .def = False, .key = NULL, // Default keycode .icon = NULL, // Icon name @@ -286,6 +289,7 @@ const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = { { .id = LIB3270_TOGGLE_NETWORK_TRACE, .name = "nettrace", + .nick = "net", .def = False, .key = NULL, // Default keycode .icon = NULL, // Icon name @@ -296,6 +300,7 @@ const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = { { .id = LIB3270_TOGGLE_SSL_TRACE, .name = "ssltrace", + .nick = "ssl", .def = False, .key = NULL, // Default keycode .icon = NULL, // Icon name diff --git a/src/include/lib3270/toggle.h b/src/include/lib3270/toggle.h index 8d20df2..d209eb5 100644 --- a/src/include/lib3270/toggle.h +++ b/src/include/lib3270/toggle.h @@ -98,6 +98,7 @@ typedef struct _lib3270_toggle { LIB3270_TOGGLE_ID id; ///< @brief Toggle ID. const char def; ///< @brief Default value. const char * key; ///< @brief Default key (or NULL if no default). + const char * nick; ///< @brief Toggle nick. } LIB3270_TOGGLE; -- libgit2 0.21.2