diff --git a/po/pt_BR.po b/po/pt_BR.po index 6ca518a..d8ef9d6 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: pw3270 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-04-19 09:39-0300\n" -"PO-Revision-Date: 2013-04-01 10:06-0300\n" +"POT-Creation-Date: 2013-04-22 09:22-0300\n" +"PO-Revision-Date: 2013-04-22 09:32-0300\n" "Last-Translator: Perry Werneck \n" "Language-Team: Português <>\n" "Language: pt_BR\n" @@ -18,22 +18,22 @@ msgstr "" "X-Poedit-SourceCharset: utf-8\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: actions.c:741 actions.c:753 +#: actions.c:742 actions.c:754 #, c-format msgid "%s action needs a valid id attribute" msgstr "Ação %s exige um atributo ID válido" -#: actions.c:589 actions.c:718 actions.c:730 +#: actions.c:590 actions.c:719 actions.c:731 #, c-format msgid "%s action needs a valid toggle name" msgstr "Ação %s exige um nome de toggle válido" -#: actions.c:765 +#: actions.c:766 #, c-format msgid "%s action needs a valid value" msgstr "Ação %s precisa de um valor válido" -#: actions.c:475 +#: actions.c:476 #, c-format msgid "%s action needs src attribute" msgstr "Ação %s precisa do atributo src" @@ -225,7 +225,7 @@ msgstr "Nome da aplicação" msgid "Attn" msgstr "Attn" -#: actions.c:450 +#: actions.c:451 #, c-format msgid "Attribute \"%s\" is invalid or undefined" msgstr "Atributo \"%s\" é invalido ou indefinido" @@ -672,7 +672,7 @@ msgstr "Trace de eventos" #: ui/rexx.xml:260 msgid "External Rexx script" -msgstr "External Rexx script" +msgstr "Script rexx externo" #: charset.c:315 msgid "Extra CGCSGID(s), ignoring" @@ -881,7 +881,7 @@ msgstr "Manter selecionado" #: v3270/security.c:257 msgid "Key usage does not include certificate signing" -msgstr "Key usage does not include certificate signing" +msgstr "Uso da chave não permite assinatura de certificados" #: paste.c:302 msgid "Keyboard is locked" @@ -916,7 +916,7 @@ msgstr "Só Maiúsculas" msgid "Monochrome" msgstr "Monocromático" -#: actions.c:606 +#: actions.c:607 msgid "Move action needs target & direction attributes" msgstr "Ação \"move\" precisa dos atributos \"target\" e \"direction\"" @@ -1677,11 +1677,11 @@ msgstr "Texto antes de '['" #: v3270/security.c:125 msgid "The CRL has expired." -msgstr "The CRL has expired." +msgstr "A lista de certificados revogados expirou." #: v3270/security.c:118 msgid "The CRL is not yet valid." -msgstr "The CRL is not yet valid." +msgstr "A lista de certificados revogados ainda não é válida." #: v3270/security.c:146 msgid "The CRL lastUpdate field contains an invalid time." @@ -1956,7 +1956,8 @@ msgstr "Não é possível decodificar chave pública do emissor" #: v3270/security.c:75 msgid "Unable to decrypt CRL's signature" -msgstr "Unable to decrypt CRL's signature" +msgstr "" +"Na foi possível decriptar assinatura da lista de certificados revogados" #: v3270/security.c:68 msgid "Unable to decrypt certificate's signature" @@ -1968,7 +1969,7 @@ msgstr "Unable to get certificate CRL" #: v3270/security.c:54 msgid "Unable to get issuer certificate" -msgstr "Unable to get issuer certificate" +msgstr "Não foi possível obter emissor do certificado" #: v3270/security.c:180 msgid "Unable to get local issuer certificate" @@ -1984,7 +1985,7 @@ msgstr "Não foi possível enviar a requisição de transferência de arquivo" #: v3270/security.c:187 msgid "Unable to verify the first certificate" -msgstr "Unable to verify the first certificate" +msgstr "Não foi possível verificar o primeiro certificado" #: filetransfer.c:774 msgid "Undefined" @@ -2018,12 +2019,12 @@ msgstr "Erro inesperado" msgid "Unexpected group \"%s\"" msgstr "Grupo inesperado \"%s\"" -#: actions.c:464 actions.c:484 +#: actions.c:465 actions.c:485 #, c-format msgid "Unexpected or invalid %s attribute: \"%s\"" msgstr "Atributo %s inesperado ou inválido: \"%s\"" -#: actions.c:438 +#: actions.c:439 #, c-format msgid "Unexpected or invalid attribute value \"%s\"" msgstr "Valor de attributo inesperado ou inválido: \"%s\"" @@ -2044,7 +2045,7 @@ msgstr "" "Assinatura inválida no objeto H3270, possível divergência de versão na " "lib3270" -#: actions.c:364 +#: actions.c:365 #, c-format msgid "Unexpected target \"%s\"" msgstr "Alvo inesperado \"%s\"" diff --git a/pw3270.cbp b/pw3270.cbp index 4af8d0e..428cf73 100644 --- a/pw3270.cbp +++ b/pw3270.cbp @@ -279,10 +279,6 @@ - - - - diff --git a/src/include/pw3270/v3270.h b/src/include/pw3270/v3270.h index ff505ff..679ea91 100644 --- a/src/include/pw3270/v3270.h +++ b/src/include/pw3270/v3270.h @@ -196,6 +196,7 @@ LIB3270_EXPORT int v3270_set_session_color_type(GtkWidget *widget, unsigned short colortype); LIB3270_EXPORT void v3270_set_host(GtkWidget *widget, const gchar *uri); LIB3270_EXPORT const gchar * v3270_get_host(GtkWidget *widget); + LIB3270_EXPORT GtkWidget * v3270_get_default_widget(void); // Keyboard & Mouse special actions LIB3270_EXPORT gboolean v3270_set_keyboard_action(GtkWidget *widget, const gchar *key_name, GtkAction *action); diff --git a/src/plugins/hllapi/pluginmain.c b/src/plugins/hllapi/pluginmain.c index 623dd56..f87caa1 100644 --- a/src/plugins/hllapi/pluginmain.c +++ b/src/plugins/hllapi/pluginmain.c @@ -509,323 +509,7 @@ return 0; } -/* - static void cmd_connectps(QUERY *qry) - { - g_message("%s","HLLAPI ConnectPS request received"); - request_status(qry,v3270_set_script(pw3270_get_terminal_widget(NULL),'H',TRUE)); - } - - static void cmd_disconnectps(QUERY *qry) - { - g_message("%s","HLLAPI DisconnectPS request received"); - request_status(qry,0); - } - - static void cmd_getrevision(QUERY *qry) - { - request_complete(qry,0,lib3270_get_revision()); - } - - static void cmd_setcursor(QUERY *qry) - { - int rc = ENOTCONN; - - if(lib3270_connected(qry->hSession)) - { - trace("%s: pos=%d row=%d col=%d",__FUNCTION__,rc,rc/80,rc%80); - lib3270_set_cursor_address(qry->hSession,qry->pos -1); - rc = 0; - } - - request_status(qry,rc); - } - - static void cmd_sendstring(QUERY *qry) - { - gchar * text; - GError * error = NULL; - gsize bytes_read; - gsize bytes_written; - const gchar * charset; - - if(!lib3270_connected(qry->hSession)) - { - request_status(qry,ENOTCONN); - return; - } - - g_get_charset(&charset); - - text = g_convert(qry->text,qry->length,lib3270_get_charset(qry->hSession),charset,&bytes_read,&bytes_written,&error); - if(text) - { - int rc = 0; - - if(strchr(text,control_char)) - { - // Convert control char - gchar * buffer = text; - char * ptr; - - for(ptr = strchr(text,control_char);ptr;ptr = strchr(buffer,control_char)) - { - *(ptr++) = 0; - - lib3270_emulate_input(qry->hSession,buffer,-1,0); - - switch(*(ptr++)) - { - case 'P': // Print - rc = pw3270_print(pw3270_get_terminal_widget(NULL), NULL, GTK_PRINT_OPERATION_ACTION_PRINT, PW3270_SRC_ALL); - break; - - case 'E': // Enter - lib3270_enter(qry->hSession); - break; - - case 'F': // Erase EOF - lib3270_eraseeof(qry->hSession); - break; - - case '1': // PF1 - lib3270_pfkey(qry->hSession,1); - break; - - case '2': // PF2 - lib3270_pfkey(qry->hSession,2); - break; - - case '3': // PF3 - lib3270_pfkey(qry->hSession,3); - break; - - case '4': // PF4 - lib3270_pfkey(qry->hSession,4); - break; - - case '5': // PF5 - lib3270_pfkey(qry->hSession,5); - break; - - case '6': // PF6 - lib3270_pfkey(qry->hSession,6); - break; - - case '7': // PF7 - lib3270_pfkey(qry->hSession,7); - break; - - case '8': // PF8 - lib3270_pfkey(qry->hSession,8); - break; - - case '9': // PF9 - lib3270_pfkey(qry->hSession,9); - break; - - case 'a': // PF10 - lib3270_pfkey(qry->hSession,10); - break; - - case 'b': // PF11 - lib3270_pfkey(qry->hSession,11); - break; - - case 'c': // PF12 - lib3270_pfkey(qry->hSession,12); - break; - } - - } - - lib3270_emulate_input(qry->hSession,buffer,-1,0); - - } - else - { - lib3270_emulate_input(qry->hSession,text,strlen(text),0); - } - g_free(text); - - request_status(qry,rc); - - return; - } - - request_complete(qry, error->code, error->message); - g_error_free(error); - - } - - struct wait - { - QUERY * qry; - time_t end; - }; - - static gboolean do_wait(struct wait *w) - { - if(lib3270_get_program_message(w->qry->hSession) == LIB3270_MESSAGE_NONE) - { - request_status(w->qry,0); - return FALSE; - } - - if(time(0) > w->end) - { - trace("%s: TIMEOUT",__FUNCTION__); - request_status(w->qry,ETIMEDOUT); - return FALSE; - } - - return TRUE; - } - - static void cmd_wait(QUERY *qry) - { - struct wait *w; - - if(lib3270_get_program_message(qry->hSession) == LIB3270_MESSAGE_NONE) - { - request_status(qry,0); - return; - } - - w = g_malloc0(sizeof(struct wait)); - w->qry = qry; - w->end = time(0)+pw3270_get_integer(pw3270_get_toplevel(),"hllapi","wait",2); - - g_timeout_add_full(G_PRIORITY_DEFAULT, (guint) 300, (GSourceFunc) do_wait, w, g_free); - } - - static void cmd_copypstostr(QUERY *qry) - { - int rows; - int cols; - unsigned short * attr; - unsigned char * text; - int rc; - unsigned char * buffer; - size_t length; - - if(!lib3270_connected(qry->hSession)) - { - request_status(qry,ENOTCONN); - return; - } - - lib3270_get_screen_size(qry->hSession,&rows,&cols); - - if(qry->pos < 1 || (qry->pos+qry->length) >= (rows*cols)) - { - request_status(qry,EINVAL); - return; - } - - qry->pos--; - - length = (qry->length * sizeof(unsigned short)) + qry->length + 2; - text = buffer = g_malloc0(length+1); - attr = (unsigned short *) (text+qry->length+1); - - trace("%s: pos=%d length=%d",__FUNCTION__,qry->pos,qry->length); - rc = lib3270_get_contents(qry->hSession,qry->pos,qry->pos+(qry->length-1),text,attr); - - if(rc) - { - request_status(qry,rc); - } - else - { - const gchar * charset; - gchar * local; - gsize bytes_read; - gsize bytes_written; - GError * error = NULL; - - trace("Text: [%s]",text); - - g_get_charset(&charset); - - local = g_convert((const gchar *) text,-1,charset,lib3270_get_charset(qry->hSession),&bytes_read,&bytes_written,&error); - - if(!local) - { - request_complete(qry,error->code,error->message); - g_error_free(error); - } - else - { - strncpy((char *) text,(const char *) local,qry->length); - - trace("response: [%s] len=%d",buffer,length); - request_buffer(qry,0,length,buffer); - g_free(local); - } - } - - g_free(buffer); - } - - static void cmd_querycursor(QUERY *qry) - { - request_value(qry,0,lib3270_get_cursor_address(qry->hSession)); - } - - void enqueue_request(QUERY *qry) - { - static const struct _cmd - { - int cmd; - void (*exec)(QUERY *qry); - } cmd[] = - { - { HLLAPI_CMD_CONNECTPS, cmd_connectps }, // 1 - { HLLAPI_CMD_DISCONNECTPS, cmd_disconnectps }, // 2 - { HLLAPI_CMD_INPUTSTRING, cmd_sendstring }, // 3 - { HLLAPI_CMD_WAIT, cmd_wait }, // 4 -// { HLLAPI_CMD_COPYPS, }, // 5 -// { HLLAPI_CMD_SEARCHPS, }, // 6 - { HLLAPI_CMD_QUERYCURSOR, cmd_querycursor }, // 7 - - { HLLAPI_CMD_COPYPSTOSTR, cmd_copypstostr }, // 8 - -// { HLLAPI_CMD_COPYSTRTOPS }, // 15 - - { HLLAPI_CMD_SETCURSOR, cmd_setcursor }, // 40 - -// { HLLAPI_CMD_SENDFILE }, // 90 -// { HLLAPI_CMD_RECEIVEFILE }, - - - { HLLAPI_CMD_GETREVISION, cmd_getrevision }, - }; - - - - int f; - - trace("HLLAPI function %d",(int) qry->cmd); - - qry->hSession = lib3270_get_default_session_handle(); - - for(f=0;fcmd) - { - cmd[f].exec(qry); - return; - } - } - - g_warning("Unexpected HLLAPI function %d",(int) qry->cmd); - request_status(qry,EINVAL); - } - G_GNUC_INTERNAL void set_active(gboolean on) { - v3270_set_script(pw3270_get_terminal_widget(NULL),'H',on); + v3270_set_script(v3270_get_default_widget(),'H',on); } - -*/ diff --git a/src/plugins/hllapi/remotectl.h b/src/plugins/hllapi/remotectl.h index 5912d82..5088912 100644 --- a/src/plugins/hllapi/remotectl.h +++ b/src/plugins/hllapi/remotectl.h @@ -58,7 +58,6 @@ } QUERY; - G_GNUC_INTERNAL void set_active(gboolean on); G_GNUC_INTERNAL void enqueue_request(QUERY *qry); G_GNUC_INTERNAL void request_complete(QUERY *qry, int rc, const gchar *text); diff --git a/src/plugins/hllapi/server.h b/src/plugins/hllapi/server.h index 65e70df..c138e2e 100644 --- a/src/plugins/hllapi/server.h +++ b/src/plugins/hllapi/server.h @@ -44,8 +44,6 @@ #define PIPE_BUFFER_LENGTH HLLAPI_MAXLENGTH+30 - #define set_active(x) /* x */ - - G_GNUC_INTERNAL void popup_lasterror(const gchar *fmt, ...); + G_GNUC_INTERNAL void set_active(gboolean on); diff --git a/src/plugins/rx3270/pluginmain.cc b/src/plugins/rx3270/pluginmain.cc index cfe568f..2e776cb 100644 --- a/src/plugins/rx3270/pluginmain.cc +++ b/src/plugins/rx3270/pluginmain.cc @@ -314,7 +314,9 @@ threadContext->ArrayPut(rxArgs, threadContext->String(""),1); } + v3270_set_script(widget,'R',TRUE); RexxObjectPtr result = threadContext->CallProgram(filename, rxArgs); + v3270_set_script(widget,'R',FALSE); if (threadContext->CheckCondition()) { @@ -422,6 +424,7 @@ extern "C" g_free(filename); } + } gtk_action_set_sensitive(action,TRUE); diff --git a/src/pw3270/v3270/widget.c b/src/pw3270/v3270/widget.c index 6b00f31..98a49d2 100644 --- a/src/pw3270/v3270/widget.c +++ b/src/pw3270/v3270/widget.c @@ -1514,3 +1514,21 @@ gboolean v3270_is_connected(GtkWidget *widget) return lib3270_connected(GTK_V3270(widget)->host) ? TRUE : FALSE; } +GtkWidget * v3270_get_default_widget(void) +{ + H3270 * hSession = lib3270_get_default_session_handle(); + + if(!hSession) + { + g_warning("No default session available on %s",__FUNCTION__); + return NULL; + } + + if(!(hSession->widget && GTK_IS_V3270(hSession->widget))) + { + g_warning("No widget on default session on %s",__FUNCTION__); + return NULL; + } + + return GTK_WIDGET(hSession->widget); +} -- libgit2 0.21.2