Commit 64b5457b86ebe2d0f4aa6788a55795ac0493df7c
1 parent
db6070d4
Exists in
master
and in
5 other branches
Reativando indicador de script ativo
Showing
8 changed files
with
43 additions
and
343 deletions
Show diff stats
po/pt_BR.po
| @@ -5,8 +5,8 @@ msgid "" | @@ -5,8 +5,8 @@ msgid "" | ||
| 5 | msgstr "" | 5 | msgstr "" |
| 6 | "Project-Id-Version: pw3270 5.0\n" | 6 | "Project-Id-Version: pw3270 5.0\n" |
| 7 | "Report-Msgid-Bugs-To: \n" | 7 | "Report-Msgid-Bugs-To: \n" |
| 8 | -"POT-Creation-Date: 2013-04-19 09:39-0300\n" | ||
| 9 | -"PO-Revision-Date: 2013-04-01 10:06-0300\n" | 8 | +"POT-Creation-Date: 2013-04-22 09:22-0300\n" |
| 9 | +"PO-Revision-Date: 2013-04-22 09:32-0300\n" | ||
| 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
| 11 | "Language-Team: Português <>\n" | 11 | "Language-Team: Português <>\n" |
| 12 | "Language: pt_BR\n" | 12 | "Language: pt_BR\n" |
| @@ -18,22 +18,22 @@ msgstr "" | @@ -18,22 +18,22 @@ msgstr "" | ||
| 18 | "X-Poedit-SourceCharset: utf-8\n" | 18 | "X-Poedit-SourceCharset: utf-8\n" |
| 19 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" | 19 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" |
| 20 | 20 | ||
| 21 | -#: actions.c:741 actions.c:753 | 21 | +#: actions.c:742 actions.c:754 |
| 22 | #, c-format | 22 | #, c-format |
| 23 | msgid "%s action needs a valid id attribute" | 23 | msgid "%s action needs a valid id attribute" |
| 24 | msgstr "Ação %s exige um atributo ID válido" | 24 | msgstr "Ação %s exige um atributo ID válido" |
| 25 | 25 | ||
| 26 | -#: actions.c:589 actions.c:718 actions.c:730 | 26 | +#: actions.c:590 actions.c:719 actions.c:731 |
| 27 | #, c-format | 27 | #, c-format |
| 28 | msgid "%s action needs a valid toggle name" | 28 | msgid "%s action needs a valid toggle name" |
| 29 | msgstr "Ação %s exige um nome de toggle válido" | 29 | msgstr "Ação %s exige um nome de toggle válido" |
| 30 | 30 | ||
| 31 | -#: actions.c:765 | 31 | +#: actions.c:766 |
| 32 | #, c-format | 32 | #, c-format |
| 33 | msgid "%s action needs a valid value" | 33 | msgid "%s action needs a valid value" |
| 34 | msgstr "Ação %s precisa de um valor válido" | 34 | msgstr "Ação %s precisa de um valor válido" |
| 35 | 35 | ||
| 36 | -#: actions.c:475 | 36 | +#: actions.c:476 |
| 37 | #, c-format | 37 | #, c-format |
| 38 | msgid "%s action needs src attribute" | 38 | msgid "%s action needs src attribute" |
| 39 | msgstr "Ação %s precisa do atributo src" | 39 | msgstr "Ação %s precisa do atributo src" |
| @@ -225,7 +225,7 @@ msgstr "Nome da aplicação" | @@ -225,7 +225,7 @@ msgstr "Nome da aplicação" | ||
| 225 | msgid "Attn" | 225 | msgid "Attn" |
| 226 | msgstr "Attn" | 226 | msgstr "Attn" |
| 227 | 227 | ||
| 228 | -#: actions.c:450 | 228 | +#: actions.c:451 |
| 229 | #, c-format | 229 | #, c-format |
| 230 | msgid "Attribute \"%s\" is invalid or undefined" | 230 | msgid "Attribute \"%s\" is invalid or undefined" |
| 231 | msgstr "Atributo \"%s\" é invalido ou indefinido" | 231 | msgstr "Atributo \"%s\" é invalido ou indefinido" |
| @@ -672,7 +672,7 @@ msgstr "Trace de eventos" | @@ -672,7 +672,7 @@ msgstr "Trace de eventos" | ||
| 672 | 672 | ||
| 673 | #: ui/rexx.xml:260 | 673 | #: ui/rexx.xml:260 |
| 674 | msgid "External Rexx script" | 674 | msgid "External Rexx script" |
| 675 | -msgstr "External Rexx script" | 675 | +msgstr "Script rexx externo" |
| 676 | 676 | ||
| 677 | #: charset.c:315 | 677 | #: charset.c:315 |
| 678 | msgid "Extra CGCSGID(s), ignoring" | 678 | msgid "Extra CGCSGID(s), ignoring" |
| @@ -881,7 +881,7 @@ msgstr "Manter selecionado" | @@ -881,7 +881,7 @@ msgstr "Manter selecionado" | ||
| 881 | 881 | ||
| 882 | #: v3270/security.c:257 | 882 | #: v3270/security.c:257 |
| 883 | msgid "Key usage does not include certificate signing" | 883 | msgid "Key usage does not include certificate signing" |
| 884 | -msgstr "Key usage does not include certificate signing" | 884 | +msgstr "Uso da chave não permite assinatura de certificados" |
| 885 | 885 | ||
| 886 | #: paste.c:302 | 886 | #: paste.c:302 |
| 887 | msgid "Keyboard is locked" | 887 | msgid "Keyboard is locked" |
| @@ -916,7 +916,7 @@ msgstr "Só Maiúsculas" | @@ -916,7 +916,7 @@ msgstr "Só Maiúsculas" | ||
| 916 | msgid "Monochrome" | 916 | msgid "Monochrome" |
| 917 | msgstr "Monocromático" | 917 | msgstr "Monocromático" |
| 918 | 918 | ||
| 919 | -#: actions.c:606 | 919 | +#: actions.c:607 |
| 920 | msgid "Move action needs target & direction attributes" | 920 | msgid "Move action needs target & direction attributes" |
| 921 | msgstr "Ação \"move\" precisa dos atributos \"target\" e \"direction\"" | 921 | msgstr "Ação \"move\" precisa dos atributos \"target\" e \"direction\"" |
| 922 | 922 | ||
| @@ -1677,11 +1677,11 @@ msgstr "Texto antes de '['" | @@ -1677,11 +1677,11 @@ msgstr "Texto antes de '['" | ||
| 1677 | 1677 | ||
| 1678 | #: v3270/security.c:125 | 1678 | #: v3270/security.c:125 |
| 1679 | msgid "The CRL has expired." | 1679 | msgid "The CRL has expired." |
| 1680 | -msgstr "The CRL has expired." | 1680 | +msgstr "A lista de certificados revogados expirou." |
| 1681 | 1681 | ||
| 1682 | #: v3270/security.c:118 | 1682 | #: v3270/security.c:118 |
| 1683 | msgid "The CRL is not yet valid." | 1683 | msgid "The CRL is not yet valid." |
| 1684 | -msgstr "The CRL is not yet valid." | 1684 | +msgstr "A lista de certificados revogados ainda não é válida." |
| 1685 | 1685 | ||
| 1686 | #: v3270/security.c:146 | 1686 | #: v3270/security.c:146 |
| 1687 | msgid "The CRL lastUpdate field contains an invalid time." | 1687 | msgid "The CRL lastUpdate field contains an invalid time." |
| @@ -1956,7 +1956,8 @@ msgstr "Não é possível decodificar chave pública do emissor" | @@ -1956,7 +1956,8 @@ msgstr "Não é possível decodificar chave pública do emissor" | ||
| 1956 | 1956 | ||
| 1957 | #: v3270/security.c:75 | 1957 | #: v3270/security.c:75 |
| 1958 | msgid "Unable to decrypt CRL's signature" | 1958 | msgid "Unable to decrypt CRL's signature" |
| 1959 | -msgstr "Unable to decrypt CRL's signature" | 1959 | +msgstr "" |
| 1960 | +"Na foi possível decriptar assinatura da lista de certificados revogados" | ||
| 1960 | 1961 | ||
| 1961 | #: v3270/security.c:68 | 1962 | #: v3270/security.c:68 |
| 1962 | msgid "Unable to decrypt certificate's signature" | 1963 | msgid "Unable to decrypt certificate's signature" |
| @@ -1968,7 +1969,7 @@ msgstr "Unable to get certificate CRL" | @@ -1968,7 +1969,7 @@ msgstr "Unable to get certificate CRL" | ||
| 1968 | 1969 | ||
| 1969 | #: v3270/security.c:54 | 1970 | #: v3270/security.c:54 |
| 1970 | msgid "Unable to get issuer certificate" | 1971 | msgid "Unable to get issuer certificate" |
| 1971 | -msgstr "Unable to get issuer certificate" | 1972 | +msgstr "Não foi possível obter emissor do certificado" |
| 1972 | 1973 | ||
| 1973 | #: v3270/security.c:180 | 1974 | #: v3270/security.c:180 |
| 1974 | msgid "Unable to get local issuer certificate" | 1975 | 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" | @@ -1984,7 +1985,7 @@ msgstr "Não foi possível enviar a requisição de transferência de arquivo" | ||
| 1984 | 1985 | ||
| 1985 | #: v3270/security.c:187 | 1986 | #: v3270/security.c:187 |
| 1986 | msgid "Unable to verify the first certificate" | 1987 | msgid "Unable to verify the first certificate" |
| 1987 | -msgstr "Unable to verify the first certificate" | 1988 | +msgstr "Não foi possível verificar o primeiro certificado" |
| 1988 | 1989 | ||
| 1989 | #: filetransfer.c:774 | 1990 | #: filetransfer.c:774 |
| 1990 | msgid "Undefined" | 1991 | msgid "Undefined" |
| @@ -2018,12 +2019,12 @@ msgstr "Erro inesperado" | @@ -2018,12 +2019,12 @@ msgstr "Erro inesperado" | ||
| 2018 | msgid "Unexpected group \"%s\"" | 2019 | msgid "Unexpected group \"%s\"" |
| 2019 | msgstr "Grupo inesperado \"%s\"" | 2020 | msgstr "Grupo inesperado \"%s\"" |
| 2020 | 2021 | ||
| 2021 | -#: actions.c:464 actions.c:484 | 2022 | +#: actions.c:465 actions.c:485 |
| 2022 | #, c-format | 2023 | #, c-format |
| 2023 | msgid "Unexpected or invalid %s attribute: \"%s\"" | 2024 | msgid "Unexpected or invalid %s attribute: \"%s\"" |
| 2024 | msgstr "Atributo %s inesperado ou inválido: \"%s\"" | 2025 | msgstr "Atributo %s inesperado ou inválido: \"%s\"" |
| 2025 | 2026 | ||
| 2026 | -#: actions.c:438 | 2027 | +#: actions.c:439 |
| 2027 | #, c-format | 2028 | #, c-format |
| 2028 | msgid "Unexpected or invalid attribute value \"%s\"" | 2029 | msgid "Unexpected or invalid attribute value \"%s\"" |
| 2029 | msgstr "Valor de attributo inesperado ou inválido: \"%s\"" | 2030 | msgstr "Valor de attributo inesperado ou inválido: \"%s\"" |
| @@ -2044,7 +2045,7 @@ msgstr "" | @@ -2044,7 +2045,7 @@ msgstr "" | ||
| 2044 | "Assinatura inválida no objeto H3270, possível divergência de versão na " | 2045 | "Assinatura inválida no objeto H3270, possível divergência de versão na " |
| 2045 | "lib3270" | 2046 | "lib3270" |
| 2046 | 2047 | ||
| 2047 | -#: actions.c:364 | 2048 | +#: actions.c:365 |
| 2048 | #, c-format | 2049 | #, c-format |
| 2049 | msgid "Unexpected target \"%s\"" | 2050 | msgid "Unexpected target \"%s\"" |
| 2050 | msgstr "Alvo inesperado \"%s\"" | 2051 | msgstr "Alvo inesperado \"%s\"" |
pw3270.cbp
| @@ -279,10 +279,6 @@ | @@ -279,10 +279,6 @@ | ||
| 279 | <Unit filename="src/plugins/hllapi/testprogram.c"> | 279 | <Unit filename="src/plugins/hllapi/testprogram.c"> |
| 280 | <Option compilerVar="CC" /> | 280 | <Option compilerVar="CC" /> |
| 281 | </Unit> | 281 | </Unit> |
| 282 | - <Unit filename="src/plugins/remotectl/client.h" /> | ||
| 283 | - <Unit filename="src/plugins/remotectl/packets.h" /> | ||
| 284 | - <Unit filename="src/plugins/remotectl/remotectl.h" /> | ||
| 285 | - <Unit filename="src/plugins/remotectl/server.h" /> | ||
| 286 | <Unit filename="src/plugins/rx3270/Makefile.in" /> | 282 | <Unit filename="src/plugins/rx3270/Makefile.in" /> |
| 287 | <Unit filename="src/plugins/rx3270/local.cc" /> | 283 | <Unit filename="src/plugins/rx3270/local.cc" /> |
| 288 | <Unit filename="src/plugins/rx3270/pluginmain.cc" /> | 284 | <Unit filename="src/plugins/rx3270/pluginmain.cc" /> |
src/include/pw3270/v3270.h
| @@ -196,6 +196,7 @@ | @@ -196,6 +196,7 @@ | ||
| 196 | LIB3270_EXPORT int v3270_set_session_color_type(GtkWidget *widget, unsigned short colortype); | 196 | LIB3270_EXPORT int v3270_set_session_color_type(GtkWidget *widget, unsigned short colortype); |
| 197 | LIB3270_EXPORT void v3270_set_host(GtkWidget *widget, const gchar *uri); | 197 | LIB3270_EXPORT void v3270_set_host(GtkWidget *widget, const gchar *uri); |
| 198 | LIB3270_EXPORT const gchar * v3270_get_host(GtkWidget *widget); | 198 | LIB3270_EXPORT const gchar * v3270_get_host(GtkWidget *widget); |
| 199 | + LIB3270_EXPORT GtkWidget * v3270_get_default_widget(void); | ||
| 199 | 200 | ||
| 200 | // Keyboard & Mouse special actions | 201 | // Keyboard & Mouse special actions |
| 201 | LIB3270_EXPORT gboolean v3270_set_keyboard_action(GtkWidget *widget, const gchar *key_name, GtkAction *action); | 202 | LIB3270_EXPORT gboolean v3270_set_keyboard_action(GtkWidget *widget, const gchar *key_name, GtkAction *action); |
src/plugins/hllapi/pluginmain.c
| @@ -509,323 +509,7 @@ | @@ -509,323 +509,7 @@ | ||
| 509 | return 0; | 509 | return 0; |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | -/* | ||
| 513 | - static void cmd_connectps(QUERY *qry) | ||
| 514 | - { | ||
| 515 | - g_message("%s","HLLAPI ConnectPS request received"); | ||
| 516 | - request_status(qry,v3270_set_script(pw3270_get_terminal_widget(NULL),'H',TRUE)); | ||
| 517 | - } | ||
| 518 | - | ||
| 519 | - static void cmd_disconnectps(QUERY *qry) | ||
| 520 | - { | ||
| 521 | - g_message("%s","HLLAPI DisconnectPS request received"); | ||
| 522 | - request_status(qry,0); | ||
| 523 | - } | ||
| 524 | - | ||
| 525 | - static void cmd_getrevision(QUERY *qry) | ||
| 526 | - { | ||
| 527 | - request_complete(qry,0,lib3270_get_revision()); | ||
| 528 | - } | ||
| 529 | - | ||
| 530 | - static void cmd_setcursor(QUERY *qry) | ||
| 531 | - { | ||
| 532 | - int rc = ENOTCONN; | ||
| 533 | - | ||
| 534 | - if(lib3270_connected(qry->hSession)) | ||
| 535 | - { | ||
| 536 | - trace("%s: pos=%d row=%d col=%d",__FUNCTION__,rc,rc/80,rc%80); | ||
| 537 | - lib3270_set_cursor_address(qry->hSession,qry->pos -1); | ||
| 538 | - rc = 0; | ||
| 539 | - } | ||
| 540 | - | ||
| 541 | - request_status(qry,rc); | ||
| 542 | - } | ||
| 543 | - | ||
| 544 | - static void cmd_sendstring(QUERY *qry) | ||
| 545 | - { | ||
| 546 | - gchar * text; | ||
| 547 | - GError * error = NULL; | ||
| 548 | - gsize bytes_read; | ||
| 549 | - gsize bytes_written; | ||
| 550 | - const gchar * charset; | ||
| 551 | - | ||
| 552 | - if(!lib3270_connected(qry->hSession)) | ||
| 553 | - { | ||
| 554 | - request_status(qry,ENOTCONN); | ||
| 555 | - return; | ||
| 556 | - } | ||
| 557 | - | ||
| 558 | - g_get_charset(&charset); | ||
| 559 | - | ||
| 560 | - text = g_convert(qry->text,qry->length,lib3270_get_charset(qry->hSession),charset,&bytes_read,&bytes_written,&error); | ||
| 561 | - if(text) | ||
| 562 | - { | ||
| 563 | - int rc = 0; | ||
| 564 | - | ||
| 565 | - if(strchr(text,control_char)) | ||
| 566 | - { | ||
| 567 | - // Convert control char | ||
| 568 | - gchar * buffer = text; | ||
| 569 | - char * ptr; | ||
| 570 | - | ||
| 571 | - for(ptr = strchr(text,control_char);ptr;ptr = strchr(buffer,control_char)) | ||
| 572 | - { | ||
| 573 | - *(ptr++) = 0; | ||
| 574 | - | ||
| 575 | - lib3270_emulate_input(qry->hSession,buffer,-1,0); | ||
| 576 | - | ||
| 577 | - switch(*(ptr++)) | ||
| 578 | - { | ||
| 579 | - case 'P': // Print | ||
| 580 | - rc = pw3270_print(pw3270_get_terminal_widget(NULL), NULL, GTK_PRINT_OPERATION_ACTION_PRINT, PW3270_SRC_ALL); | ||
| 581 | - break; | ||
| 582 | - | ||
| 583 | - case 'E': // Enter | ||
| 584 | - lib3270_enter(qry->hSession); | ||
| 585 | - break; | ||
| 586 | - | ||
| 587 | - case 'F': // Erase EOF | ||
| 588 | - lib3270_eraseeof(qry->hSession); | ||
| 589 | - break; | ||
| 590 | - | ||
| 591 | - case '1': // PF1 | ||
| 592 | - lib3270_pfkey(qry->hSession,1); | ||
| 593 | - break; | ||
| 594 | - | ||
| 595 | - case '2': // PF2 | ||
| 596 | - lib3270_pfkey(qry->hSession,2); | ||
| 597 | - break; | ||
| 598 | - | ||
| 599 | - case '3': // PF3 | ||
| 600 | - lib3270_pfkey(qry->hSession,3); | ||
| 601 | - break; | ||
| 602 | - | ||
| 603 | - case '4': // PF4 | ||
| 604 | - lib3270_pfkey(qry->hSession,4); | ||
| 605 | - break; | ||
| 606 | - | ||
| 607 | - case '5': // PF5 | ||
| 608 | - lib3270_pfkey(qry->hSession,5); | ||
| 609 | - break; | ||
| 610 | - | ||
| 611 | - case '6': // PF6 | ||
| 612 | - lib3270_pfkey(qry->hSession,6); | ||
| 613 | - break; | ||
| 614 | - | ||
| 615 | - case '7': // PF7 | ||
| 616 | - lib3270_pfkey(qry->hSession,7); | ||
| 617 | - break; | ||
| 618 | - | ||
| 619 | - case '8': // PF8 | ||
| 620 | - lib3270_pfkey(qry->hSession,8); | ||
| 621 | - break; | ||
| 622 | - | ||
| 623 | - case '9': // PF9 | ||
| 624 | - lib3270_pfkey(qry->hSession,9); | ||
| 625 | - break; | ||
| 626 | - | ||
| 627 | - case 'a': // PF10 | ||
| 628 | - lib3270_pfkey(qry->hSession,10); | ||
| 629 | - break; | ||
| 630 | - | ||
| 631 | - case 'b': // PF11 | ||
| 632 | - lib3270_pfkey(qry->hSession,11); | ||
| 633 | - break; | ||
| 634 | - | ||
| 635 | - case 'c': // PF12 | ||
| 636 | - lib3270_pfkey(qry->hSession,12); | ||
| 637 | - break; | ||
| 638 | - } | ||
| 639 | - | ||
| 640 | - } | ||
| 641 | - | ||
| 642 | - lib3270_emulate_input(qry->hSession,buffer,-1,0); | ||
| 643 | - | ||
| 644 | - } | ||
| 645 | - else | ||
| 646 | - { | ||
| 647 | - lib3270_emulate_input(qry->hSession,text,strlen(text),0); | ||
| 648 | - } | ||
| 649 | - g_free(text); | ||
| 650 | - | ||
| 651 | - request_status(qry,rc); | ||
| 652 | - | ||
| 653 | - return; | ||
| 654 | - } | ||
| 655 | - | ||
| 656 | - request_complete(qry, error->code, error->message); | ||
| 657 | - g_error_free(error); | ||
| 658 | - | ||
| 659 | - } | ||
| 660 | - | ||
| 661 | - struct wait | ||
| 662 | - { | ||
| 663 | - QUERY * qry; | ||
| 664 | - time_t end; | ||
| 665 | - }; | ||
| 666 | - | ||
| 667 | - static gboolean do_wait(struct wait *w) | ||
| 668 | - { | ||
| 669 | - if(lib3270_get_program_message(w->qry->hSession) == LIB3270_MESSAGE_NONE) | ||
| 670 | - { | ||
| 671 | - request_status(w->qry,0); | ||
| 672 | - return FALSE; | ||
| 673 | - } | ||
| 674 | - | ||
| 675 | - if(time(0) > w->end) | ||
| 676 | - { | ||
| 677 | - trace("%s: TIMEOUT",__FUNCTION__); | ||
| 678 | - request_status(w->qry,ETIMEDOUT); | ||
| 679 | - return FALSE; | ||
| 680 | - } | ||
| 681 | - | ||
| 682 | - return TRUE; | ||
| 683 | - } | ||
| 684 | - | ||
| 685 | - static void cmd_wait(QUERY *qry) | ||
| 686 | - { | ||
| 687 | - struct wait *w; | ||
| 688 | - | ||
| 689 | - if(lib3270_get_program_message(qry->hSession) == LIB3270_MESSAGE_NONE) | ||
| 690 | - { | ||
| 691 | - request_status(qry,0); | ||
| 692 | - return; | ||
| 693 | - } | ||
| 694 | - | ||
| 695 | - w = g_malloc0(sizeof(struct wait)); | ||
| 696 | - w->qry = qry; | ||
| 697 | - w->end = time(0)+pw3270_get_integer(pw3270_get_toplevel(),"hllapi","wait",2); | ||
| 698 | - | ||
| 699 | - g_timeout_add_full(G_PRIORITY_DEFAULT, (guint) 300, (GSourceFunc) do_wait, w, g_free); | ||
| 700 | - } | ||
| 701 | - | ||
| 702 | - static void cmd_copypstostr(QUERY *qry) | ||
| 703 | - { | ||
| 704 | - int rows; | ||
| 705 | - int cols; | ||
| 706 | - unsigned short * attr; | ||
| 707 | - unsigned char * text; | ||
| 708 | - int rc; | ||
| 709 | - unsigned char * buffer; | ||
| 710 | - size_t length; | ||
| 711 | - | ||
| 712 | - if(!lib3270_connected(qry->hSession)) | ||
| 713 | - { | ||
| 714 | - request_status(qry,ENOTCONN); | ||
| 715 | - return; | ||
| 716 | - } | ||
| 717 | - | ||
| 718 | - lib3270_get_screen_size(qry->hSession,&rows,&cols); | ||
| 719 | - | ||
| 720 | - if(qry->pos < 1 || (qry->pos+qry->length) >= (rows*cols)) | ||
| 721 | - { | ||
| 722 | - request_status(qry,EINVAL); | ||
| 723 | - return; | ||
| 724 | - } | ||
| 725 | - | ||
| 726 | - qry->pos--; | ||
| 727 | - | ||
| 728 | - length = (qry->length * sizeof(unsigned short)) + qry->length + 2; | ||
| 729 | - text = buffer = g_malloc0(length+1); | ||
| 730 | - attr = (unsigned short *) (text+qry->length+1); | ||
| 731 | - | ||
| 732 | - trace("%s: pos=%d length=%d",__FUNCTION__,qry->pos,qry->length); | ||
| 733 | - rc = lib3270_get_contents(qry->hSession,qry->pos,qry->pos+(qry->length-1),text,attr); | ||
| 734 | - | ||
| 735 | - if(rc) | ||
| 736 | - { | ||
| 737 | - request_status(qry,rc); | ||
| 738 | - } | ||
| 739 | - else | ||
| 740 | - { | ||
| 741 | - const gchar * charset; | ||
| 742 | - gchar * local; | ||
| 743 | - gsize bytes_read; | ||
| 744 | - gsize bytes_written; | ||
| 745 | - GError * error = NULL; | ||
| 746 | - | ||
| 747 | - trace("Text: [%s]",text); | ||
| 748 | - | ||
| 749 | - g_get_charset(&charset); | ||
| 750 | - | ||
| 751 | - local = g_convert((const gchar *) text,-1,charset,lib3270_get_charset(qry->hSession),&bytes_read,&bytes_written,&error); | ||
| 752 | - | ||
| 753 | - if(!local) | ||
| 754 | - { | ||
| 755 | - request_complete(qry,error->code,error->message); | ||
| 756 | - g_error_free(error); | ||
| 757 | - } | ||
| 758 | - else | ||
| 759 | - { | ||
| 760 | - strncpy((char *) text,(const char *) local,qry->length); | ||
| 761 | - | ||
| 762 | - trace("response: [%s] len=%d",buffer,length); | ||
| 763 | - request_buffer(qry,0,length,buffer); | ||
| 764 | - g_free(local); | ||
| 765 | - } | ||
| 766 | - } | ||
| 767 | - | ||
| 768 | - g_free(buffer); | ||
| 769 | - } | ||
| 770 | - | ||
| 771 | - static void cmd_querycursor(QUERY *qry) | ||
| 772 | - { | ||
| 773 | - request_value(qry,0,lib3270_get_cursor_address(qry->hSession)); | ||
| 774 | - } | ||
| 775 | - | ||
| 776 | - void enqueue_request(QUERY *qry) | ||
| 777 | - { | ||
| 778 | - static const struct _cmd | ||
| 779 | - { | ||
| 780 | - int cmd; | ||
| 781 | - void (*exec)(QUERY *qry); | ||
| 782 | - } cmd[] = | ||
| 783 | - { | ||
| 784 | - { HLLAPI_CMD_CONNECTPS, cmd_connectps }, // 1 | ||
| 785 | - { HLLAPI_CMD_DISCONNECTPS, cmd_disconnectps }, // 2 | ||
| 786 | - { HLLAPI_CMD_INPUTSTRING, cmd_sendstring }, // 3 | ||
| 787 | - { HLLAPI_CMD_WAIT, cmd_wait }, // 4 | ||
| 788 | -// { HLLAPI_CMD_COPYPS, }, // 5 | ||
| 789 | -// { HLLAPI_CMD_SEARCHPS, }, // 6 | ||
| 790 | - { HLLAPI_CMD_QUERYCURSOR, cmd_querycursor }, // 7 | ||
| 791 | - | ||
| 792 | - { HLLAPI_CMD_COPYPSTOSTR, cmd_copypstostr }, // 8 | ||
| 793 | - | ||
| 794 | -// { HLLAPI_CMD_COPYSTRTOPS }, // 15 | ||
| 795 | - | ||
| 796 | - { HLLAPI_CMD_SETCURSOR, cmd_setcursor }, // 40 | ||
| 797 | - | ||
| 798 | -// { HLLAPI_CMD_SENDFILE }, // 90 | ||
| 799 | -// { HLLAPI_CMD_RECEIVEFILE }, | ||
| 800 | - | ||
| 801 | - | ||
| 802 | - { HLLAPI_CMD_GETREVISION, cmd_getrevision }, | ||
| 803 | - }; | ||
| 804 | - | ||
| 805 | - | ||
| 806 | - | ||
| 807 | - int f; | ||
| 808 | - | ||
| 809 | - trace("HLLAPI function %d",(int) qry->cmd); | ||
| 810 | - | ||
| 811 | - qry->hSession = lib3270_get_default_session_handle(); | ||
| 812 | - | ||
| 813 | - for(f=0;f<G_N_ELEMENTS(cmd);f++) | ||
| 814 | - { | ||
| 815 | - if(cmd[f].cmd == qry->cmd) | ||
| 816 | - { | ||
| 817 | - cmd[f].exec(qry); | ||
| 818 | - return; | ||
| 819 | - } | ||
| 820 | - } | ||
| 821 | - | ||
| 822 | - g_warning("Unexpected HLLAPI function %d",(int) qry->cmd); | ||
| 823 | - request_status(qry,EINVAL); | ||
| 824 | - } | ||
| 825 | - | ||
| 826 | G_GNUC_INTERNAL void set_active(gboolean on) | 512 | G_GNUC_INTERNAL void set_active(gboolean on) |
| 827 | { | 513 | { |
| 828 | - v3270_set_script(pw3270_get_terminal_widget(NULL),'H',on); | 514 | + v3270_set_script(v3270_get_default_widget(),'H',on); |
| 829 | } | 515 | } |
| 830 | - | ||
| 831 | -*/ |
src/plugins/hllapi/remotectl.h
| @@ -58,7 +58,6 @@ | @@ -58,7 +58,6 @@ | ||
| 58 | 58 | ||
| 59 | } QUERY; | 59 | } QUERY; |
| 60 | 60 | ||
| 61 | - G_GNUC_INTERNAL void set_active(gboolean on); | ||
| 62 | G_GNUC_INTERNAL void enqueue_request(QUERY *qry); | 61 | G_GNUC_INTERNAL void enqueue_request(QUERY *qry); |
| 63 | G_GNUC_INTERNAL void request_complete(QUERY *qry, int rc, const gchar *text); | 62 | G_GNUC_INTERNAL void request_complete(QUERY *qry, int rc, const gchar *text); |
| 64 | 63 |
src/plugins/hllapi/server.h
| @@ -44,8 +44,6 @@ | @@ -44,8 +44,6 @@ | ||
| 44 | 44 | ||
| 45 | #define PIPE_BUFFER_LENGTH HLLAPI_MAXLENGTH+30 | 45 | #define PIPE_BUFFER_LENGTH HLLAPI_MAXLENGTH+30 |
| 46 | 46 | ||
| 47 | - #define set_active(x) /* x */ | ||
| 48 | - | ||
| 49 | - | ||
| 50 | G_GNUC_INTERNAL void popup_lasterror(const gchar *fmt, ...); | 47 | G_GNUC_INTERNAL void popup_lasterror(const gchar *fmt, ...); |
| 48 | + G_GNUC_INTERNAL void set_active(gboolean on); | ||
| 51 | 49 |
src/plugins/rx3270/pluginmain.cc
| @@ -314,7 +314,9 @@ | @@ -314,7 +314,9 @@ | ||
| 314 | threadContext->ArrayPut(rxArgs, threadContext->String(""),1); | 314 | threadContext->ArrayPut(rxArgs, threadContext->String(""),1); |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | + v3270_set_script(widget,'R',TRUE); | ||
| 317 | RexxObjectPtr result = threadContext->CallProgram(filename, rxArgs); | 318 | RexxObjectPtr result = threadContext->CallProgram(filename, rxArgs); |
| 319 | + v3270_set_script(widget,'R',FALSE); | ||
| 318 | 320 | ||
| 319 | if (threadContext->CheckCondition()) | 321 | if (threadContext->CheckCondition()) |
| 320 | { | 322 | { |
| @@ -422,6 +424,7 @@ extern "C" | @@ -422,6 +424,7 @@ extern "C" | ||
| 422 | g_free(filename); | 424 | g_free(filename); |
| 423 | } | 425 | } |
| 424 | 426 | ||
| 427 | + | ||
| 425 | } | 428 | } |
| 426 | 429 | ||
| 427 | gtk_action_set_sensitive(action,TRUE); | 430 | gtk_action_set_sensitive(action,TRUE); |
src/pw3270/v3270/widget.c
| @@ -1514,3 +1514,21 @@ gboolean v3270_is_connected(GtkWidget *widget) | @@ -1514,3 +1514,21 @@ gboolean v3270_is_connected(GtkWidget *widget) | ||
| 1514 | return lib3270_connected(GTK_V3270(widget)->host) ? TRUE : FALSE; | 1514 | return lib3270_connected(GTK_V3270(widget)->host) ? TRUE : FALSE; |
| 1515 | } | 1515 | } |
| 1516 | 1516 | ||
| 1517 | +GtkWidget * v3270_get_default_widget(void) | ||
| 1518 | +{ | ||
| 1519 | + H3270 * hSession = lib3270_get_default_session_handle(); | ||
| 1520 | + | ||
| 1521 | + if(!hSession) | ||
| 1522 | + { | ||
| 1523 | + g_warning("No default session available on %s",__FUNCTION__); | ||
| 1524 | + return NULL; | ||
| 1525 | + } | ||
| 1526 | + | ||
| 1527 | + if(!(hSession->widget && GTK_IS_V3270(hSession->widget))) | ||
| 1528 | + { | ||
| 1529 | + g_warning("No widget on default session on %s",__FUNCTION__); | ||
| 1530 | + return NULL; | ||
| 1531 | + } | ||
| 1532 | + | ||
| 1533 | + return GTK_WIDGET(hSession->widget); | ||
| 1534 | +} |