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