From 0c627cd7d2e56927bf94e550eaf4c4a924fabda2 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Tue, 14 Jul 2020 22:02:33 -0300 Subject: [PATCH] Adding PA Key actions on the keytable. --- src/core/actions/table.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/core/windows/connect.c | 1 - src/testprogram/testprogram.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) diff --git a/src/core/actions/table.c b/src/core/actions/table.c index afe26fc..f80247a 100644 --- a/src/core/actions/table.c +++ b/src/core/actions/table.c @@ -91,6 +91,21 @@ return lib3270_move_selection(hSession,LIB3270_DIR_RIGHT); } + static int pa1(H3270 *hSession) + { + return lib3270_pakey(hSession,1); + } + + static int pa2(H3270 *hSession) + { + return lib3270_pakey(hSession,1); + } + + static int pa3(H3270 *hSession) + { + return lib3270_pakey(hSession,1); + } + /** * @brief Get LIB3270 action table; * @@ -770,6 +785,51 @@ .activatable = lib3270_is_disconnected }, + // + // Misc Actions + // + { + .name = "PA1", + .type = LIB3270_ACTION_TYPE_GENERIC, + + .keys = NULL, + .icon = NULL, + .label = N_("PA1"), + .summary = N_( "Program Action 1" ), + .activate = pa1, + + .group = LIB3270_ACTION_GROUP_ONLINE, + .activatable = lib3270_is_connected + }, + + { + .name = "PA2", + .type = LIB3270_ACTION_TYPE_GENERIC, + + .keys = NULL, + .icon = NULL, + .label = N_("PA1"), + .summary = N_( "Program Action 2" ), + .activate = pa2, + + .group = LIB3270_ACTION_GROUP_ONLINE, + .activatable = lib3270_is_connected + }, + + { + .name = "PA3", + .type = LIB3270_ACTION_TYPE_GENERIC, + + .keys = NULL, + .icon = NULL, + .label = N_("PA1"), + .summary = N_( "Program Action 3" ), + .activate = pa3, + + .group = LIB3270_ACTION_GROUP_ONLINE, + .activatable = lib3270_is_connected + }, + { .name = NULL, } diff --git a/src/core/windows/connect.c b/src/core/windows/connect.c index 888dc88..0ac7536 100644 --- a/src/core/windows/connect.c +++ b/src/core/windows/connect.c @@ -320,7 +320,6 @@ int net_reconnect(H3270 *hSession, int seconds) if(hSession->ssl.enabled) { - debug("%s: Enabling SSL ****************************",__FUNCTION__); hSession->ssl.host = 1; if(ssl_init(hSession)) return errno = ENOTCONN; diff --git a/src/testprogram/testprogram.c b/src/testprogram/testprogram.c index 14abebe..d4ef16e 100644 --- a/src/testprogram/testprogram.c +++ b/src/testprogram/testprogram.c @@ -1,3 +1,31 @@ +/* + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a + * aplicativos mainframe. Registro no INPI sob o nome G3270. + * + * Copyright (C) <2008> + * + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela + * Free Software Foundation. + * + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para + * obter mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin + * St, Fifth Floor, Boston, MA 02110-1301 USA + * + * Este programa está nomeado como connect.c e possui - linhas de código. + * + * Contatos: + * + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) + * + */ #include #include -- libgit2 0.21.2