Commit 82ea8ecd6024be5179d3f9358293ac1861de3d1c
1 parent
2a3185b8
Exists in
master
and in
5 other branches
Corrigindo gerenciamento de código de página no HLLAPI.
Showing
6 changed files
with
45 additions
and
66 deletions
Show diff stats
locale/pt_BR.po
| ... | ... | @@ -5,7 +5,7 @@ msgid "" |
| 5 | 5 | msgstr "" |
| 6 | 6 | "Project-Id-Version: pw3270 5.0\n" |
| 7 | 7 | "Report-Msgid-Bugs-To: \n" |
| 8 | -"POT-Creation-Date: 2017-08-10 10:12-0300\n" | |
| 8 | +"POT-Creation-Date: 2017-08-10 10:21-0300\n" | |
| 9 | 9 | "PO-Revision-Date: 2017-02-15 17:08-0200\n" |
| 10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
| 11 | 11 | "Language-Team: Português <perry.werneck@gmail.com>\n" |
| ... | ... | @@ -419,11 +419,6 @@ msgstr "Não foi possível conectar a %s" |
| 419 | 419 | msgid "Can't connect to %s:%s" |
| 420 | 420 | msgstr "Não foi possível conectar a %s:%s" |
| 421 | 421 | |
| 422 | -#: main.c:70 | |
| 423 | -#, fuzzy | |
| 424 | -msgid "Can't connect to DBUS server" | |
| 425 | -msgstr "Não foi possível conectar a %s" | |
| 426 | - | |
| 427 | 422 | #: selection.c:425 |
| 428 | 423 | #, c-format |
| 429 | 424 | msgid "Can't convert line %d from %s to %s" |
| ... | ... | @@ -438,10 +433,6 @@ msgstr "Recortar não permitido em seleção retangular" |
| 438 | 433 | msgid "Can't determine value for environment variable \"%s\" " |
| 439 | 434 | msgstr "Não consigo determinar o valor da variável de ambiente \"%s\" " |
| 440 | 435 | |
| 441 | -#: main.c:115 | |
| 442 | -msgid "Can't get DBUS object name" | |
| 443 | -msgstr "" | |
| 444 | - | |
| 445 | 436 | #: ft.c:413 |
| 446 | 437 | msgid "Can't get file size" |
| 447 | 438 | msgstr "Não foi possível obter o tamanho do arquivo" |
| ... | ... | @@ -663,11 +654,6 @@ msgstr "Configurar host" |
| 663 | 654 | msgid "Connect on startup" |
| 664 | 655 | msgstr "Conectar ao iniciar" |
| 665 | 656 | |
| 666 | -#: gobject.c:205 | |
| 667 | -#, fuzzy | |
| 668 | -msgid "Connecting to host" | |
| 669 | -msgstr "Não foi possível conectar ao servidor" | |
| 670 | - | |
| 671 | 657 | #: connect.c:215 connect.c:311 connect.c:320 connect.c:382 connect.c:397 |
| 672 | 658 | #: connect.c:413 connect.c:427 connect.c:447 connect.c:461 connect.c:477 |
| 673 | 659 | #: connect.c:573 |
| ... | ... | @@ -1927,11 +1913,6 @@ msgstr "Iniciar transferência de arquivo" |
| 1927 | 1913 | msgid "Starting" |
| 1928 | 1914 | msgstr "Iniciando" |
| 1929 | 1915 | |
| 1930 | -#: gobject.c:193 | |
| 1931 | -#, c-format | |
| 1932 | -msgid "State %04d can't accept requests" | |
| 1933 | -msgstr "" | |
| 1934 | - | |
| 1935 | 1916 | #: security.c:237 |
| 1936 | 1917 | msgid "Subject issuer mismatch" |
| 1937 | 1918 | msgstr "Divergência na identidade do emissor" |
| ... | ... | @@ -2417,11 +2398,6 @@ msgstr "Valor de cor inválido ou inesperado: \"%s\"" |
| 2417 | 2398 | msgid "Unexpected or unknown security status" |
| 2418 | 2399 | msgstr "Estado de segurança inesperado ou desconhecido." |
| 2419 | 2400 | |
| 2420 | -#: gobject.c:208 | |
| 2421 | -#, fuzzy, c-format | |
| 2422 | -msgid "Unexpected state %04d" | |
| 2423 | -msgstr "Alvo inesperado \"%s\"" | |
| 2424 | - | |
| 2425 | 2401 | #: actions.c:391 |
| 2426 | 2402 | #, c-format |
| 2427 | 2403 | msgid "Unexpected target \"%s\"" |
| ... | ... | @@ -2826,6 +2802,10 @@ msgstr "translator-credits" |
| 2826 | 2802 | #~ "32768. Valores maiores trazem maior performance, porem, nem todos os " |
| 2827 | 2803 | #~ "hosts podem suportá-los." |
| 2828 | 2804 | |
| 2805 | +#, fuzzy | |
| 2806 | +#~ msgid "Can't connect to DBUS server" | |
| 2807 | +#~ msgstr "Não foi possível conectar a %s" | |
| 2808 | + | |
| 2829 | 2809 | #~ msgid "Can't start download." |
| 2830 | 2810 | #~ msgstr "Não foi possível iniciar o download." |
| 2831 | 2811 | |
| ... | ... | @@ -2862,6 +2842,10 @@ msgstr "translator-credits" |
| 2862 | 2842 | #~ msgid "Complete" |
| 2863 | 2843 | #~ msgstr "Completo" |
| 2864 | 2844 | |
| 2845 | +#, fuzzy | |
| 2846 | +#~ msgid "Connecting to host" | |
| 2847 | +#~ msgstr "Não foi possível conectar ao servidor" | |
| 2848 | + | |
| 2865 | 2849 | #~ msgid "Copiar tudo" |
| 2866 | 2850 | #~ msgstr "Copiar tudo" |
| 2867 | 2851 | |
| ... | ... | @@ -3224,6 +3208,10 @@ msgstr "translator-credits" |
| 3224 | 3208 | #~ msgid "Unexpected element <%s>" |
| 3225 | 3209 | #~ msgstr "Elemento <%s> inesperado" |
| 3226 | 3210 | |
| 3211 | +#, fuzzy | |
| 3212 | +#~ msgid "Unexpected state %04d" | |
| 3213 | +#~ msgstr "Alvo inesperado \"%s\"" | |
| 3214 | + | |
| 3227 | 3215 | #~ msgid "" |
| 3228 | 3216 | #~ "Unknown host:\n" |
| 3229 | 3217 | #~ "%s" | ... | ... |
locale/pw3270.pot
| ... | ... | @@ -9,7 +9,7 @@ msgstr "" |
| 9 | 9 | "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n" |
| 10 | 10 | "Project-Id-Version: PACKAGE VERSION\n" |
| 11 | 11 | "Report-Msgid-Bugs-To: \n" |
| 12 | -"POT-Creation-Date: 2017-08-10 10:12-0300\n" | |
| 12 | +"POT-Creation-Date: 2017-08-10 13:47-0300\n" | |
| 13 | 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 14 | 14 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 15 | 15 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| ... | ... | @@ -20,7 +20,7 @@ msgstr "" |
| 20 | 20 | "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n" |
| 21 | 21 | "Project-Id-Version: PACKAGE VERSION\n" |
| 22 | 22 | "Report-Msgid-Bugs-To: \n" |
| 23 | -"POT-Creation-Date: 2017-08-10 10:12-0300\n" | |
| 23 | +"POT-Creation-Date: 2017-08-10 13:47-0300\n" | |
| 24 | 24 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 25 | 25 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 26 | 26 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| ... | ... | @@ -39,17 +39,6 @@ msgstr "" |
| 39 | 39 | "MIME-Version: 1.0\n" |
| 40 | 40 | "Content-Type: text/plain; charset=CHARSET\n" |
| 41 | 41 | "Content-Transfer-Encoding: 8bit\n" |
| 42 | -"#-#-#-#-# dbus3270.pot (PACKAGE VERSION) #-#-#-#-#\n" | |
| 43 | -"Project-Id-Version: PACKAGE VERSION\n" | |
| 44 | -"Report-Msgid-Bugs-To: \n" | |
| 45 | -"POT-Creation-Date: 2017-08-10 10:12-0300\n" | |
| 46 | -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
| 47 | -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
| 48 | -"Language-Team: LANGUAGE <LL@li.org>\n" | |
| 49 | -"Language: \n" | |
| 50 | -"MIME-Version: 1.0\n" | |
| 51 | -"Content-Type: text/plain; charset=CHARSET\n" | |
| 52 | -"Content-Transfer-Encoding: 8bit\n" | |
| 53 | 42 | |
| 54 | 43 | #: window.c:329 |
| 55 | 44 | #, c-format |
| ... | ... | @@ -435,10 +424,6 @@ msgstr "" |
| 435 | 424 | msgid "Can't connect to %s:%s" |
| 436 | 425 | msgstr "" |
| 437 | 426 | |
| 438 | -#: main.c:70 | |
| 439 | -msgid "Can't connect to DBUS server" | |
| 440 | -msgstr "" | |
| 441 | - | |
| 442 | 427 | #: selection.c:425 |
| 443 | 428 | #, c-format |
| 444 | 429 | msgid "Can't convert line %d from %s to %s" |
| ... | ... | @@ -453,10 +438,6 @@ msgstr "" |
| 453 | 438 | msgid "Can't determine value for environment variable \"%s\" " |
| 454 | 439 | msgstr "" |
| 455 | 440 | |
| 456 | -#: main.c:115 | |
| 457 | -msgid "Can't get DBUS object name" | |
| 458 | -msgstr "" | |
| 459 | - | |
| 460 | 441 | #: ft.c:413 |
| 461 | 442 | msgid "Can't get file size" |
| 462 | 443 | msgstr "" |
| ... | ... | @@ -666,10 +647,6 @@ msgstr "" |
| 666 | 647 | msgid "Connect on startup" |
| 667 | 648 | msgstr "" |
| 668 | 649 | |
| 669 | -#: gobject.c:205 | |
| 670 | -msgid "Connecting to host" | |
| 671 | -msgstr "" | |
| 672 | - | |
| 673 | 650 | #: connect.c:215 connect.c:311 connect.c:320 connect.c:382 connect.c:397 |
| 674 | 651 | #: connect.c:413 connect.c:427 connect.c:447 connect.c:461 connect.c:477 |
| 675 | 652 | #: connect.c:573 |
| ... | ... | @@ -1884,11 +1861,6 @@ msgstr "" |
| 1884 | 1861 | msgid "Starting" |
| 1885 | 1862 | msgstr "" |
| 1886 | 1863 | |
| 1887 | -#: gobject.c:193 | |
| 1888 | -#, c-format | |
| 1889 | -msgid "State %04d can't accept requests" | |
| 1890 | -msgstr "" | |
| 1891 | - | |
| 1892 | 1864 | #: security.c:237 |
| 1893 | 1865 | msgid "Subject issuer mismatch" |
| 1894 | 1866 | msgstr "" |
| ... | ... | @@ -2320,11 +2292,6 @@ msgstr "" |
| 2320 | 2292 | msgid "Unexpected or unknown security status" |
| 2321 | 2293 | msgstr "" |
| 2322 | 2294 | |
| 2323 | -#: gobject.c:208 | |
| 2324 | -#, c-format | |
| 2325 | -msgid "Unexpected state %04d" | |
| 2326 | -msgstr "" | |
| 2327 | - | |
| 2328 | 2295 | #: actions.c:391 |
| 2329 | 2296 | #, c-format |
| 2330 | 2297 | msgid "Unexpected target \"%s\"" | ... | ... |
src/include/pw3270/hllapi.h
| ... | ... | @@ -154,9 +154,6 @@ extern "C" { |
| 154 | 154 | |
| 155 | 155 | HLLAPI_API_CALL hllapi_reset(void); |
| 156 | 156 | |
| 157 | - HLLAPI_API_CALL hllapi_get_revision(void); | |
| 158 | - HLLAPI_API_CALL hllapi_get_datadir(LPSTR datadir); | |
| 159 | - | |
| 160 | 157 | HLLAPI_API_CALL hllapi_connect(LPSTR uri, WORD wait); |
| 161 | 158 | HLLAPI_API_CALL hllapi_disconnect(void); |
| 162 | 159 | HLLAPI_API_CALL hllapi_get_message_id(void); |
| ... | ... | @@ -192,6 +189,7 @@ extern "C" { |
| 192 | 189 | |
| 193 | 190 | HLLAPI_API_CALL hllapi_get_revision(void); |
| 194 | 191 | HLLAPI_API_CALL hllapi_get_datadir(LPSTR datadir); |
| 192 | + HLLAPI_API_CALL hllapi_set_charset(LPSTR datadir); | |
| 195 | 193 | |
| 196 | 194 | HLLAPI_API_CALL hllapi_connect(LPSTR uri, WORD wait); |
| 197 | 195 | HLLAPI_API_CALL hllapi_disconnect(void); | ... | ... |
src/libpw3270cpp/session.cc
| ... | ... | @@ -222,6 +222,7 @@ |
| 222 | 222 | trace("%s(%s,%s)",__FUNCTION__,remote,local); |
| 223 | 223 | |
| 224 | 224 | #ifdef HAVE_ICONV |
| 225 | + | |
| 225 | 226 | string display_charset = this->get_display_charset(); |
| 226 | 227 | |
| 227 | 228 | if(this->conv2Local != (iconv_t) (-1)) |
| ... | ... | @@ -243,9 +244,16 @@ |
| 243 | 244 | } |
| 244 | 245 | else |
| 245 | 246 | { |
| 247 | + // Same charset, doesn't convert | |
| 246 | 248 | conv2Local = conv2Host = (iconv_t)(-1); |
| 247 | 249 | } |
| 248 | 250 | |
| 251 | +#else | |
| 252 | + | |
| 253 | + #error aqui | |
| 254 | + throw exception("%s",strerror(ENOSUP)); | |
| 255 | + | |
| 256 | + | |
| 249 | 257 | #endif |
| 250 | 258 | |
| 251 | 259 | } | ... | ... |
src/plugins/hllapi/calls.cc
| ... | ... | @@ -54,6 +54,9 @@ |
| 54 | 54 | if(hSession) |
| 55 | 55 | delete hSession; |
| 56 | 56 | hSession = session::create(mode); |
| 57 | + | |
| 58 | + session::get_default()->set_display_charset(); | |
| 59 | + | |
| 57 | 60 | trace("hSession=%p",hSession); |
| 58 | 61 | } |
| 59 | 62 | catch(std::exception &e) |
| ... | ... | @@ -239,6 +242,21 @@ |
| 239 | 242 | return 0; |
| 240 | 243 | } |
| 241 | 244 | |
| 245 | + HLLAPI_API_CALL hllapi_set_charset(LPSTR text) | |
| 246 | + { | |
| 247 | + try | |
| 248 | + { | |
| 249 | + | |
| 250 | + session::get_default()->set_display_charset(NULL, (const char *) text); | |
| 251 | + | |
| 252 | + } | |
| 253 | + catch(std::exception &e) | |
| 254 | + { | |
| 255 | + return HLLAPI_STATUS_SYSTEM_ERROR; | |
| 256 | + } | |
| 257 | + | |
| 258 | + return 0; | |
| 259 | + } | |
| 242 | 260 | |
| 243 | 261 | HLLAPI_API_CALL hllapi_pfkey(WORD key) |
| 244 | 262 | { | ... | ... |
src/pw3270/resources.rc.in
| 1 | 1 | 1 ICON @PACKAGE_NAME@.ico |
| 2 | 2 | |
| 3 | 3 | 2 VERSIONINFO |
| 4 | -FILEVERSION @PACKAGE_MAJOR_VERSION@,@PACKAGE_MINOR_VERSION@,@PACKAGE_MAJOR_RELEASE@,@PACKAGE_MINOR_RELEASE@ | |
| 5 | -PRODUCTVERSION @PACKAGE_MAJOR_VERSION@,@PACKAGE_MINOR_VERSION@,@PACKAGE_MAJOR_RELEASE@,@PACKAGE_MINOR_RELEASE@ | |
| 4 | +FILEVERSION @PACKAGE_MAJOR_VERSION@,@PACKAGE_MINOR_VERSION@,@PACKAGE_MAJOR_RELEASE@ | |
| 5 | +PRODUCTVERSION @PACKAGE_MAJOR_VERSION@,@PACKAGE_MINOR_VERSION@,@PACKAGE_MAJOR_RELEASE@ | |
| 6 | 6 | BEGIN |
| 7 | 7 | BLOCK "StringFileInfo" |
| 8 | 8 | BEGIN |
| ... | ... | @@ -14,7 +14,7 @@ BEGIN |
| 14 | 14 | VALUE "LegalCopyright", "Copyright (c) Banco do Brasil S.A." |
| 15 | 15 | VALUE "OriginalFilename", "@PACKAGE_NAME@.exe" |
| 16 | 16 | VALUE "ProductName", "@PACKAGE_NAME@" |
| 17 | - VALUE "ProductVersion", "@PACKAGE_VERSION@" | |
| 17 | + VALUE "ProductVersion", "@PACKAGE_VERSION@-@PACKAGE_MAJOR_RELEASE@.@PACKAGE_MINOR_RELEASE@" | |
| 18 | 18 | END |
| 19 | 19 | END |
| 20 | 20 | END | ... | ... |