Commit eb13ee51af412baf0306c5fdc260ffbbce3dd985
1 parent
446ad017
Exists in
master
and in
5 other branches
Updating translation.
Fixing automatic path detection.
Showing
5 changed files
with
185 additions
and
193 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -210,6 +210,13 @@ $(POTDIR)/%.pot: \ |
| 210 | 210 | @$(MAKE) -C src/$(basename $(notdir $@)) $@ |
| 211 | 211 | |
| 212 | 212 | $(POTDIR)/%.pot: \ |
| 213 | + /usr/share/pw3270/pot/%.pot | |
| 214 | + | |
| 215 | + @echo $(notdir $@) ... | |
| 216 | + @mkdir -p `dirname $@` | |
| 217 | + @cp "$^" $@ | |
| 218 | + | |
| 219 | +$(POTDIR)/%.pot: \ | |
| 213 | 220 | ./modules/%/* \ |
| 214 | 221 | ./modules/%/src/* \ |
| 215 | 222 | ./modules/%/Makefile | ... | ... |
gitsync.sh
| ... | ... | @@ -7,7 +7,9 @@ |
| 7 | 7 | # https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html |
| 8 | 8 | # |
| 9 | 9 | # git remote add bitbucket https://bitbucket.org/pw3270/pw3270-application.git |
| 10 | +# git remote add github https://github.com/PerryWerneck/pw3270.git | |
| 10 | 11 | # |
| 12 | + | |
| 11 | 13 | # git remote add github https://github.com/PerryWerneck/pw3270.git |
| 12 | 14 | # git push github --all |
| 13 | 15 | # | ... | ... |
locale/pt_BR.po
| 1 | 1 | # |
| 2 | -# Perry Werneck <perry.werneck@gmail.com>, 2012, 2013, 2014, 2016, 2017, 2018. | |
| 2 | +# Perry Werneck <perry.werneck@gmail.com>, 2012, 2013, 2014, 2016, 2017, 2018, 2019. | |
| 3 | 3 | # |
| 4 | 4 | #: properties.c:66 properties.c:73 properties.c:80 properties.c:101 |
| 5 | 5 | #: properties.c:108 properties.c:115 properties.c:122 properties.c:136 |
| 6 | -#: properties.c:143 properties.c:348 properties.c:355 properties.c:362 | |
| 7 | -#: properties.c:369 properties.c:376 properties.c:383 | |
| 6 | +#: properties.c:143 properties.c:347 properties.c:354 properties.c:361 | |
| 7 | +#: properties.c:368 properties.c:375 properties.c:382 | |
| 8 | 8 | msgid "" |
| 9 | 9 | msgstr "" |
| 10 | 10 | "Project-Id-Version: pw3270 5.0\n" |
| 11 | 11 | "Report-Msgid-Bugs-To: \n" |
| 12 | -"POT-Creation-Date: 2019-01-16 17:05-0200\n" | |
| 13 | -"PO-Revision-Date: 2018-10-22 14:38-0300\n" | |
| 12 | +"POT-Creation-Date: 2019-01-17 15:13-0200\n" | |
| 13 | +"PO-Revision-Date: 2019-01-17 15:24-0200\n" | |
| 14 | 14 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
| 15 | 15 | "Language-Team: Português <>\n" |
| 16 | 16 | "Language: pt_BR\n" |
| ... | ... | @@ -20,7 +20,7 @@ msgstr "" |
| 20 | 20 | "X-Poedit-Language: Portuguese\n" |
| 21 | 21 | "X-Poedit-Country: BRAZIL\n" |
| 22 | 22 | "X-Poedit-SourceCharset: utf-8\n" |
| 23 | -"Plural-Forms: nplurals=2; plural=(n != 1);\n" | |
| 23 | +"Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
| 24 | 24 | "X-Generator: Gtranslator 2.91.7\n" |
| 25 | 25 | |
| 26 | 26 | #: window.c:428 |
| ... | ... | @@ -399,7 +399,7 @@ msgstr "Tema de c_ores:" |
| 399 | 399 | msgid "C_onnect" |
| 400 | 400 | msgstr "_Conectar" |
| 401 | 401 | |
| 402 | -#: toggles.c:333 linux/connect.c:314 | |
| 402 | +#: toggles.c:333 linux/connect.c:317 | |
| 403 | 403 | #, c-format |
| 404 | 404 | msgid "Can't %s network keep-alive" |
| 405 | 405 | msgstr "Não foi possível %s opção \"keep-alive\"" |
| ... | ... | @@ -410,9 +410,8 @@ msgid "Can't accept unnamed %s" |
| 410 | 410 | msgstr "Não posso aceitar elemento %s sem nome" |
| 411 | 411 | |
| 412 | 412 | #: ssl/linux/getcrl.c:230 |
| 413 | -#, fuzzy | |
| 414 | 413 | msgid "Can't bind to LDAP server" |
| 415 | -msgstr "Não foi possível conectar ao servidor DBUS" | |
| 414 | +msgstr "Não foi possível conectar ao servidor LDAP" | |
| 416 | 415 | |
| 417 | 416 | #: linux/connect.c:89 |
| 418 | 417 | #, c-format |
| ... | ... | @@ -454,6 +453,11 @@ msgstr "um atributo \"action\"" |
| 454 | 453 | msgid "Can't get file size" |
| 455 | 454 | msgstr "Não foi possível obter o tamanho do arquivo" |
| 456 | 455 | |
| 456 | +#: local/session.cc:124 local/session.cc:142 | |
| 457 | +#, fuzzy | |
| 458 | +msgid "Can't get screen contents" | |
| 459 | +msgstr "Trace do conteúdo da tela" | |
| 460 | + | |
| 457 | 461 | #: ssl/linux/getcrl.c:208 |
| 458 | 462 | #, fuzzy |
| 459 | 463 | msgid "Can't initialize LDAP" |
| ... | ... | @@ -559,18 +563,16 @@ msgid "Can't save trace data to file %s" |
| 559 | 563 | msgstr "Não foi possível salvar trace no arquivo %s" |
| 560 | 564 | |
| 561 | 565 | #: ssl/linux/getcrl.c:255 |
| 562 | -#, fuzzy | |
| 563 | 566 | msgid "Can't search LDAP server" |
| 564 | -msgstr "Não foi possível conectar ao servidor DBUS" | |
| 567 | +msgstr "Não foi possível conectar ao servidor LDAP" | |
| 565 | 568 | |
| 566 | 569 | #: ssl/linux/getcrl.c:192 |
| 567 | 570 | msgid "Can't set LDAP query" |
| 568 | -msgstr "" | |
| 571 | +msgstr "Não posso definir consulta LDAP" | |
| 569 | 572 | |
| 570 | 573 | #: ssl/linux/getcrl.c:219 |
| 571 | -#, fuzzy | |
| 572 | 574 | msgid "Can't set LDAP version" |
| 573 | -msgstr "Não é possível usar a Winsock versão %d.%d" | |
| 575 | +msgstr "Não é possível setar a versão LDAP" | |
| 574 | 576 | |
| 575 | 577 | #: src/v3270ft/v3270ftprogress.c:811 |
| 576 | 578 | msgid "Can't set callback table" |
| ... | ... | @@ -581,7 +583,6 @@ msgid "Can't set host charset" |
| 581 | 583 | msgstr "Não foi possível definir o charset do host" |
| 582 | 584 | |
| 583 | 585 | #: src/v3270/iocallback.c:190 |
| 584 | -#, fuzzy | |
| 585 | 586 | msgid "Can't set lib3270 I/O controller" |
| 586 | 587 | msgstr "Não foi possível registrar manipuladores de I/O 3270" |
| 587 | 588 | |
| ... | ... | @@ -703,7 +704,7 @@ msgstr "Conectar ao iniciar" |
| 703 | 704 | msgid "Connecting to host" |
| 704 | 705 | msgstr "Conectando ao servidor" |
| 705 | 706 | |
| 706 | -#: iocalls.c:539 linux/connect.c:273 linux/connect.c:302 linux/connect.c:318 | |
| 707 | +#: iocalls.c:539 linux/connect.c:273 linux/connect.c:303 linux/connect.c:321 | |
| 707 | 708 | msgid "Connection error" |
| 708 | 709 | msgstr "Erro de conexão" |
| 709 | 710 | |
| ... | ... | @@ -716,9 +717,8 @@ msgid "Connection reset by peer" |
| 716 | 717 | msgstr "Conexão foi cancelada pelo servidor" |
| 717 | 718 | |
| 718 | 719 | #: properties.c:246 |
| 719 | -#, fuzzy | |
| 720 | 720 | msgid "Connection state" |
| 721 | -msgstr "Conectar ao iniciar" | |
| 721 | +msgstr "Estado da conexão" | |
| 722 | 722 | |
| 723 | 723 | #: 00default.xml:58 |
| 724 | 724 | msgid "Copy" |
| ... | ... | @@ -760,11 +760,11 @@ msgstr "Arquivo atual" |
| 760 | 760 | |
| 761 | 761 | #: properties.c:225 |
| 762 | 762 | msgid "Current screen width in columns" |
| 763 | -msgstr "" | |
| 763 | +msgstr "Largura atua da tela em colunas" | |
| 764 | 764 | |
| 765 | 765 | #: properties.c:232 |
| 766 | 766 | msgid "Current screen width in rows" |
| 767 | -msgstr "" | |
| 767 | +msgstr "Altura atual da tela em linhas" | |
| 768 | 768 | |
| 769 | 769 | #: src/v3270ft/v3270ftprogress.c:75 |
| 770 | 770 | msgid "Current transfer position" |
| ... | ... | @@ -776,7 +776,7 @@ msgstr "Atual:" |
| 776 | 776 | |
| 777 | 777 | #: properties.c:204 |
| 778 | 778 | msgid "Cursor address" |
| 779 | -msgstr "" | |
| 779 | +msgstr "Endereço do cursor" | |
| 780 | 780 | |
| 781 | 781 | #: colors.c:380 |
| 782 | 782 | msgid "Custom colors" |
| ... | ... | @@ -803,7 +803,6 @@ msgid "Dark Green" |
| 803 | 803 | msgstr "Verde Escuro" |
| 804 | 804 | |
| 805 | 805 | #: colors.c:507 |
| 806 | -#, fuzzy | |
| 807 | 806 | msgid "Dark Turquoise" |
| 808 | 807 | msgstr "Turquesa Escuro" |
| 809 | 808 | |
| ... | ... | @@ -905,6 +904,10 @@ msgstr "Erro \"%s\" lendo arquivo local (rc=%d)" |
| 905 | 904 | msgid "Error \"%s\" writing to local file (rc=%d)" |
| 906 | 905 | msgstr "Erro \"%s\" gravando arquivo local (rc=%d)" |
| 907 | 906 | |
| 907 | +#: local/events.cc:59 | |
| 908 | +msgid "Error in vasprintf" | |
| 909 | +msgstr "Erro na chamada vasprintf" | |
| 910 | + | |
| 908 | 911 | #: dialog.c:404 |
| 909 | 912 | #, c-format |
| 910 | 913 | msgid "Error loading %s" |
| ... | ... | @@ -976,9 +979,8 @@ msgid "Format error in certificate's notBefore field" |
| 976 | 979 | msgstr "Erro de formato no campo \"notBefore\" do certificado" |
| 977 | 980 | |
| 978 | 981 | #: properties.c:171 |
| 979 | -#, fuzzy | |
| 980 | 982 | msgid "Formatted screen" |
| 981 | -msgstr "Salvar tela" | |
| 983 | +msgstr "Tela formatada" | |
| 982 | 984 | |
| 983 | 985 | #: toggles.c:147 00default.xml:118 |
| 984 | 986 | msgid "Full Screen" |
| ... | ... | @@ -1005,9 +1007,8 @@ msgid "Green" |
| 1005 | 1007 | msgstr "Verde" |
| 1006 | 1008 | |
| 1007 | 1009 | #: properties.c:157 |
| 1008 | -#, fuzzy | |
| 1009 | 1010 | msgid "Has selected area" |
| 1010 | -msgstr "Salvar seleção" | |
| 1011 | +msgstr "Tem área selecionada" | |
| 1011 | 1012 | |
| 1012 | 1013 | #: 00default.xml:140 |
| 1013 | 1014 | msgid "Help" |
| ... | ... | @@ -1123,7 +1124,7 @@ msgstr "Inserir um novo arquivo na fila de transferência" |
| 1123 | 1124 | |
| 1124 | 1125 | #: ssl/linux/getcrl.c:193 |
| 1125 | 1126 | msgid "Insuficient arguments" |
| 1126 | -msgstr "" | |
| 1127 | +msgstr "Argumentos insuficientes" | |
| 1127 | 1128 | |
| 1128 | 1129 | #: colors.c:514 |
| 1129 | 1130 | msgid "Intensified/Protected" |
| ... | ... | @@ -1138,11 +1139,10 @@ msgid "Invalid CA certificate" |
| 1138 | 1139 | msgstr "Certificado CA inválido" |
| 1139 | 1140 | |
| 1140 | 1141 | #: ssl/linux/getcrl.c:164 |
| 1141 | -#, fuzzy | |
| 1142 | 1142 | msgid "Invalid argument format" |
| 1143 | -msgstr "Ação recortar inválida" | |
| 1143 | +msgstr "O formato do argumento é inválido" | |
| 1144 | 1144 | |
| 1145 | -#: src/v3270/widget.c:940 | |
| 1145 | +#: local/session.cc:69 src/v3270/widget.c:940 | |
| 1146 | 1146 | msgid "Invalid callback table, possible version mismatch in lib3270" |
| 1147 | 1147 | msgstr "" |
| 1148 | 1148 | "Tabela de callbacks inválida, possível divergência de versão na lib3270" |
| ... | ... | @@ -1163,13 +1163,17 @@ msgstr "Ação recortar inválida" |
| 1163 | 1163 | msgid "Invalid remap scope" |
| 1164 | 1164 | msgstr "Escopo de mapeamento inválido" |
| 1165 | 1165 | |
| 1166 | +#: local/events.cc:88 local/events.cc:141 | |
| 1167 | +msgid "Invalid session handler" | |
| 1168 | +msgstr "Identificador de sessão é inválido" | |
| 1169 | + | |
| 1166 | 1170 | #: properties.c:164 |
| 1167 | 1171 | msgid "Is starting (no first screen)?" |
| 1168 | -msgstr "" | |
| 1172 | +msgstr "Está iniciando (não recebeu a primeira tela)?" | |
| 1169 | 1173 | |
| 1170 | 1174 | #: properties.c:150 |
| 1171 | 1175 | msgid "Is terminal in the INITIAL_E state?" |
| 1172 | -msgstr "" | |
| 1176 | +msgstr "O terminal está no estad INITIAL_E?" | |
| 1173 | 1177 | |
| 1174 | 1178 | #: 80javasamples.xml:38 |
| 1175 | 1179 | msgid "Java" |
| ... | ... | @@ -1193,7 +1197,7 @@ msgstr "Barra lateral" |
| 1193 | 1197 | |
| 1194 | 1198 | #: properties.c:253 |
| 1195 | 1199 | msgid "Latest program message" |
| 1196 | -msgstr "" | |
| 1200 | +msgstr "Última mensagem de programa" | |
| 1197 | 1201 | |
| 1198 | 1202 | #: src/v3270ft/v3270ft.c:194 |
| 1199 | 1203 | msgid "Load" |
| ... | ... | @@ -1270,11 +1274,11 @@ msgstr "Nenhuma transferência em andamento" |
| 1270 | 1274 | |
| 1271 | 1275 | #: properties.c:94 |
| 1272 | 1276 | msgid "Non zero if the host is AS400." |
| 1273 | -msgstr "" | |
| 1277 | +msgstr "Diferente de zero se o host é AS400" | |
| 1274 | 1278 | |
| 1275 | 1279 | #: properties.c:87 |
| 1276 | 1280 | msgid "Non zero if the host is TSO." |
| 1277 | -msgstr "" | |
| 1281 | +msgstr "Diferente de zero se o host é TSO" | |
| 1278 | 1282 | |
| 1279 | 1283 | #: colors.c:513 |
| 1280 | 1284 | msgid "Normal/Protected" |
| ... | ... | @@ -1340,6 +1344,10 @@ msgstr "Outro (VM/CMS)" |
| 1340 | 1344 | msgid "Out of memory" |
| 1341 | 1345 | msgstr "Memória insuficiente" |
| 1342 | 1346 | |
| 1347 | +#: local/events.cc:71 | |
| 1348 | +msgid "Out of memory in vasprintf" | |
| 1349 | +msgstr "Memória insuficiente em vasprintf" | |
| 1350 | + | |
| 1343 | 1351 | #: 80javasamples.xml:39 |
| 1344 | 1352 | msgid "Output test" |
| 1345 | 1353 | msgstr "Output test" |
| ... | ... | @@ -1746,8 +1754,8 @@ msgstr "Erro SSL" |
| 1746 | 1754 | msgid "SSL Read error" |
| 1747 | 1755 | msgstr "Erro de leitura SSL" |
| 1748 | 1756 | |
| 1749 | -#: ssl/negotiate.c:181 ssl/negotiate.c:190 ssl/negotiate.c:197 | |
| 1750 | -#: ssl/negotiate.c:212 | |
| 1757 | +#: ssl/negotiate.c:181 ssl/negotiate.c:190 ssl/negotiate.c:199 | |
| 1758 | +#: ssl/negotiate.c:215 | |
| 1751 | 1759 | msgid "SSL error" |
| 1752 | 1760 | msgstr "Erro SSL" |
| 1753 | 1761 | |
| ... | ... | @@ -1806,7 +1814,7 @@ msgstr "Guarda fila de transferência num arquivo XML externo" |
| 1806 | 1814 | |
| 1807 | 1815 | #: properties.c:239 |
| 1808 | 1816 | msgid "Screen buffer length in bytes" |
| 1809 | -msgstr "" | |
| 1817 | +msgstr "Tamanho do buffer de tela em bytes" | |
| 1810 | 1818 | |
| 1811 | 1819 | #: 00default.xml:111 |
| 1812 | 1820 | msgid "Screen size" |
| ... | ... | @@ -1818,11 +1826,11 @@ msgstr "Scripts" |
| 1818 | 1826 | |
| 1819 | 1827 | #: ssl/linux/getcrl.c:267 |
| 1820 | 1828 | msgid "Search did not produce any attributes." |
| 1821 | -msgstr "" | |
| 1829 | +msgstr "Pesquisa não produziu nenhum atributo" | |
| 1822 | 1830 | |
| 1823 | 1831 | #: ssl/linux/getcrl.c:278 |
| 1824 | 1832 | msgid "Search did not produce any values." |
| 1825 | -msgstr "" | |
| 1833 | +msgstr "Pesquisa não produziu nenhum valor" | |
| 1826 | 1834 | |
| 1827 | 1835 | #: src/v3270ft/tables.c:183 |
| 1828 | 1836 | msgid "" |
| ... | ... | @@ -2058,7 +2066,7 @@ msgstr "Não é possível receber requisições no estado %04d" |
| 2058 | 2066 | |
| 2059 | 2067 | #: properties.c:129 |
| 2060 | 2068 | msgid "State is 3270, TN3270e or SSCP" |
| 2061 | -msgstr "" | |
| 2069 | +msgstr "Estado do terminal é 3270, TN3270e or SSCP" | |
| 2062 | 2070 | |
| 2063 | 2071 | #: src/v3270/security.c:247 |
| 2064 | 2072 | msgid "Subject issuer mismatch" |
| ... | ... | @@ -2090,7 +2098,7 @@ msgstr "" |
| 2090 | 2098 | "has been reached, or the maximum number of data blocks per file (16060) has " |
| 2091 | 2099 | "been reached." |
| 2092 | 2100 | |
| 2093 | -#: ssl/negotiate.c:198 src/v3270/security.c:136 | |
| 2101 | +#: ssl/negotiate.c:200 src/v3270/security.c:136 | |
| 2094 | 2102 | msgid "The CRL has expired." |
| 2095 | 2103 | msgstr "A lista de certificados revogados expirou." |
| 2096 | 2104 | |
| ... | ... | @@ -2120,19 +2128,13 @@ msgstr "" |
| 2120 | 2128 | "signature value could not be determined rather than it not matching the " |
| 2121 | 2129 | "expected value. Unused." |
| 2122 | 2130 | |
| 2123 | -#: ssl/negotiate.c:199 | |
| 2124 | -#, fuzzy | |
| 2131 | +#: ssl/negotiate.c:201 | |
| 2125 | 2132 | msgid "The Certificate revocation list (CRL) has expired." |
| 2126 | -msgstr "" | |
| 2127 | -"A lista de revogação de certificados (CRL) de um certificado não pôde ser " | |
| 2128 | -"encontrada." | |
| 2133 | +msgstr "A lista de revogação de certificados (CRL) está expirada." | |
| 2129 | 2134 | |
| 2130 | 2135 | #: ssl/negotiate.c:192 |
| 2131 | -#, fuzzy | |
| 2132 | 2136 | msgid "The Certificate revocation list (CRL) is not yet valid." |
| 2133 | -msgstr "" | |
| 2134 | -"A lista de revogação de certificados (CRL) de um certificado não pôde ser " | |
| 2135 | -"encontrada." | |
| 2137 | +msgstr "A lista de revogação de certificados (CRL) ainda não é válida." | |
| 2136 | 2138 | |
| 2137 | 2139 | #: ssl/negotiate.c:183 |
| 2138 | 2140 | msgid "" |
| ... | ... | @@ -2141,18 +2143,17 @@ msgstr "" |
| 2141 | 2143 | "A lista de revogação de certificados (CRL) de um certificado não pôde ser " |
| 2142 | 2144 | "encontrada." |
| 2143 | 2145 | |
| 2144 | -#: ssl/negotiate.c:213 | |
| 2146 | +#: ssl/negotiate.c:216 | |
| 2145 | 2147 | msgid "The SSL certificate for this host is not trusted." |
| 2146 | 2148 | msgstr "O certificado SSL deste servidor não é confiável" |
| 2147 | 2149 | |
| 2148 | 2150 | #: ssl/linux/getcrl.c:107 |
| 2149 | 2151 | msgid "The URL for the CRL is undefined or empty" |
| 2150 | -msgstr "" | |
| 2152 | +msgstr "A URL para o CRL não está definida ou vazia" | |
| 2151 | 2153 | |
| 2152 | 2154 | #: ssl/linux/getcrl.c:303 |
| 2153 | -#, fuzzy | |
| 2154 | 2155 | msgid "The URL scheme is unknown" |
| 2155 | -msgstr "Termo RPM %d não foi reconhecido" | |
| 2156 | +msgstr "O tipo de URL é desconhecido" | |
| 2156 | 2157 | |
| 2157 | 2158 | #: src/v3270/security.c:220 |
| 2158 | 2159 | msgid "The basicConstraints pathlength parameter has been exceeded." |
| ... | ... | @@ -2206,7 +2207,7 @@ msgstr "" |
| 2206 | 2207 | |
| 2207 | 2208 | #: properties.c:218 |
| 2208 | 2209 | msgid "The color type" |
| 2209 | -msgstr "" | |
| 2210 | +msgstr "O tipo de cor" | |
| 2210 | 2211 | |
| 2211 | 2212 | #: src/v3270/security.c:343 |
| 2212 | 2213 | msgid "The connection is insecure" |
| ... | ... | @@ -2259,6 +2260,8 @@ msgstr "" |
| 2259 | 2260 | #: properties.c:260 |
| 2260 | 2261 | msgid "The delay between the host unlocking the keyboard and the actual unlock" |
| 2261 | 2262 | msgstr "" |
| 2263 | +"Intervalo de tempo entre o desbloqueio de teclado pelo host e o desbloqueio " | |
| 2264 | +"real" | |
| 2262 | 2265 | |
| 2263 | 2266 | #: dialog.c:243 |
| 2264 | 2267 | msgid "The file already exists. Replace it?" |
| ... | ... | @@ -2306,7 +2309,7 @@ msgstr "Os tipos conhecidos são %s" |
| 2306 | 2309 | |
| 2307 | 2310 | #: properties.c:211 |
| 2308 | 2311 | msgid "The model number" |
| 2309 | -msgstr "" | |
| 2312 | +msgstr "Nº do modelo" | |
| 2310 | 2313 | |
| 2311 | 2314 | #: main.c:318 |
| 2312 | 2315 | msgid "The model of 3270 display to be emulated" |
| ... | ... | @@ -2345,7 +2348,7 @@ msgstr "" |
| 2345 | 2348 | "O Certificado raiz não está marcado como confiável para os fins " |
| 2346 | 2349 | "especificados." |
| 2347 | 2350 | |
| 2348 | -#: ssl/negotiate.c:214 | |
| 2351 | +#: ssl/negotiate.c:217 | |
| 2349 | 2352 | msgid "" |
| 2350 | 2353 | "The security certificate presented by this host was not issued by a trusted " |
| 2351 | 2354 | "certificate authority." |
| ... | ... | @@ -2435,9 +2438,8 @@ msgid "Trace Data Stream" |
| 2435 | 2438 | msgstr "Trace Data Stream" |
| 2436 | 2439 | |
| 2437 | 2440 | #: toggles.c:231 |
| 2438 | -#, fuzzy | |
| 2439 | 2441 | msgid "Trace SSL negotiation" |
| 2440 | -msgstr "Negociação SSL falhou" | |
| 2442 | +msgstr "Trace da negociação SSL" | |
| 2441 | 2443 | |
| 2442 | 2444 | #: toggles.c:123 |
| 2443 | 2445 | msgid "Trace interface events" |
| ... | ... | @@ -2499,9 +2501,9 @@ msgstr "Tente de novo com o mesmo arquivo." |
| 2499 | 2501 | msgid "Turquoise" |
| 2500 | 2502 | msgstr "Turquesa" |
| 2501 | 2503 | |
| 2502 | -#: properties.c:404 | |
| 2504 | +#: properties.c:403 | |
| 2503 | 2505 | msgid "URL for the CRL file" |
| 2504 | -msgstr "" | |
| 2506 | +msgstr "URL para o arquivo CRL" | |
| 2505 | 2507 | |
| 2506 | 2508 | #: dialog.c:64 |
| 2507 | 2509 | msgid "UTF-8" |
| ... | ... | @@ -2589,9 +2591,8 @@ msgid "Unexpected or invalid %s attribute: \"%s\"" |
| 2589 | 2591 | msgstr "Atributo %s inesperado ou inválido: \"%s\"" |
| 2590 | 2592 | |
| 2591 | 2593 | #: ssl/linux/getcrl.c:302 |
| 2592 | -#, fuzzy | |
| 2593 | 2594 | msgid "Unexpected or invalid CRL URL" |
| 2594 | -msgstr "Valor de cor inválido ou inesperado: \"%s\"" | |
| 2595 | +msgstr "URL do CRL é inesperada ou inválida" | |
| 2595 | 2596 | |
| 2596 | 2597 | #: actions.c:486 |
| 2597 | 2598 | #, c-format |
| ... | ... | @@ -2928,11 +2929,19 @@ msgstr "um atributo \"action\"" |
| 2928 | 2929 | msgid "bracket" |
| 2929 | 2930 | msgstr "bracket" |
| 2930 | 2931 | |
| 2931 | -#: toggles.c:333 linux/connect.c:314 | |
| 2932 | +#: local/events.cc:163 | |
| 2933 | +msgid "connected" | |
| 2934 | +msgstr "Conectado" | |
| 2935 | + | |
| 2936 | +#: toggles.c:333 linux/connect.c:317 | |
| 2932 | 2937 | msgid "disable" |
| 2933 | 2938 | msgstr "desabilitar" |
| 2934 | 2939 | |
| 2935 | -#: toggles.c:333 linux/connect.c:314 | |
| 2940 | +#: local/events.cc:163 | |
| 2941 | +msgid "disconnected" | |
| 2942 | +msgstr "Desconectado" | |
| 2943 | + | |
| 2944 | +#: toggles.c:333 linux/connect.c:317 | |
| 2936 | 2945 | msgid "enable" |
| 2937 | 2946 | msgstr "habilitar" |
| 2938 | 2947 | |
| ... | ... | @@ -2944,15 +2953,15 @@ msgstr "erro fcntl() ao obter estado do socket." |
| 2944 | 2953 | msgid "ioctlsocket(FIONBIO) failed." |
| 2945 | 2954 | msgstr "ioctlsocket(FIONBIO) failed." |
| 2946 | 2955 | |
| 2947 | -#: properties.c:397 | |
| 2956 | +#: properties.c:396 | |
| 2948 | 2957 | msgid "lib3270 revision" |
| 2949 | -msgstr "" | |
| 2958 | +msgstr "Revisão da lib3270" | |
| 2950 | 2959 | |
| 2951 | -#: properties.c:390 | |
| 2960 | +#: properties.c:389 | |
| 2952 | 2961 | msgid "lib3270 version" |
| 2953 | -msgstr "" | |
| 2962 | +msgstr "Versão da lib3270" | |
| 2954 | 2963 | |
| 2955 | -#: linux/connect.c:303 | |
| 2964 | +#: linux/connect.c:304 | |
| 2956 | 2965 | msgid "setsockopt(SO_OOBINLINE) has failed" |
| 2957 | 2966 | msgstr "setsockopt(SO_OOBINLINE) has failed" |
| 2958 | 2967 | ... | ... |
locale/pw3270.pot
| ... | ... | @@ -5,15 +5,15 @@ |
| 5 | 5 | # |
| 6 | 6 | #: properties.c:66 properties.c:73 properties.c:80 properties.c:101 |
| 7 | 7 | #: properties.c:108 properties.c:115 properties.c:122 properties.c:136 |
| 8 | -#: properties.c:143 properties.c:348 properties.c:355 properties.c:362 | |
| 9 | -#: properties.c:369 properties.c:376 properties.c:383 | |
| 8 | +#: properties.c:143 properties.c:347 properties.c:354 properties.c:361 | |
| 9 | +#: properties.c:368 properties.c:375 properties.c:382 | |
| 10 | 10 | #, fuzzy |
| 11 | 11 | msgid "" |
| 12 | 12 | msgstr "" |
| 13 | 13 | "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n" |
| 14 | 14 | "Project-Id-Version: PACKAGE VERSION\n" |
| 15 | 15 | "Report-Msgid-Bugs-To: \n" |
| 16 | -"POT-Creation-Date: 2019-01-16 17:05-0200\n" | |
| 16 | +"POT-Creation-Date: 2019-01-17 15:13-0200\n" | |
| 17 | 17 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 18 | 18 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 19 | 19 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| ... | ... | @@ -24,7 +24,7 @@ msgstr "" |
| 24 | 24 | "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n" |
| 25 | 25 | "Project-Id-Version: PACKAGE VERSION\n" |
| 26 | 26 | "Report-Msgid-Bugs-To: \n" |
| 27 | -"POT-Creation-Date: 2019-01-16 17:05-0200\n" | |
| 27 | +"POT-Creation-Date: 2019-01-17 15:55+0000\n" | |
| 28 | 28 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 29 | 29 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 30 | 30 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| ... | ... | @@ -35,7 +35,7 @@ msgstr "" |
| 35 | 35 | "#-#-#-#-# libv3270.pot (PACKAGE VERSION) #-#-#-#-#\n" |
| 36 | 36 | "Project-Id-Version: PACKAGE VERSION\n" |
| 37 | 37 | "Report-Msgid-Bugs-To: \n" |
| 38 | -"POT-Creation-Date: 2019-01-16 17:05-0200\n" | |
| 38 | +"POT-Creation-Date: 2019-01-17 15:56+0000\n" | |
| 39 | 39 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 40 | 40 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 41 | 41 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| ... | ... | @@ -57,7 +57,7 @@ msgstr "" |
| 57 | 57 | "#-#-#-#-# dbus3270.pot (PACKAGE VERSION) #-#-#-#-#\n" |
| 58 | 58 | "Project-Id-Version: PACKAGE VERSION\n" |
| 59 | 59 | "Report-Msgid-Bugs-To: \n" |
| 60 | -"POT-Creation-Date: 2019-01-16 17:05-0200\n" | |
| 60 | +"POT-Creation-Date: 2019-01-17 15:13-0200\n" | |
| 61 | 61 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 62 | 62 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 63 | 63 | "Language-Team: LANGUAGE <LL@li.org>\n" |
| ... | ... | @@ -426,7 +426,7 @@ msgstr "" |
| 426 | 426 | msgid "C_onnect" |
| 427 | 427 | msgstr "" |
| 428 | 428 | |
| 429 | -#: toggles.c:333 linux/connect.c:314 | |
| 429 | +#: toggles.c:333 linux/connect.c:317 | |
| 430 | 430 | #, c-format |
| 431 | 431 | msgid "Can't %s network keep-alive" |
| 432 | 432 | msgstr "" |
| ... | ... | @@ -479,6 +479,10 @@ msgstr "" |
| 479 | 479 | msgid "Can't get file size" |
| 480 | 480 | msgstr "" |
| 481 | 481 | |
| 482 | +#: local/session.cc:124 local/session.cc:142 | |
| 483 | +msgid "Can't get screen contents" | |
| 484 | +msgstr "" | |
| 485 | + | |
| 482 | 486 | #: ssl/linux/getcrl.c:208 |
| 483 | 487 | msgid "Can't initialize LDAP" |
| 484 | 488 | msgstr "" |
| ... | ... | @@ -713,7 +717,7 @@ msgstr "" |
| 713 | 717 | msgid "Connecting to host" |
| 714 | 718 | msgstr "" |
| 715 | 719 | |
| 716 | -#: iocalls.c:539 linux/connect.c:273 linux/connect.c:302 linux/connect.c:318 | |
| 720 | +#: iocalls.c:539 linux/connect.c:273 linux/connect.c:303 linux/connect.c:321 | |
| 717 | 721 | msgid "Connection error" |
| 718 | 722 | msgstr "" |
| 719 | 723 | |
| ... | ... | @@ -908,6 +912,10 @@ msgstr "" |
| 908 | 912 | msgid "Error \"%s\" writing to local file (rc=%d)" |
| 909 | 913 | msgstr "" |
| 910 | 914 | |
| 915 | +#: local/events.cc:59 | |
| 916 | +msgid "Error in vasprintf" | |
| 917 | +msgstr "" | |
| 918 | + | |
| 911 | 919 | #: dialog.c:404 |
| 912 | 920 | #, c-format |
| 913 | 921 | msgid "Error loading %s" |
| ... | ... | @@ -1125,7 +1133,7 @@ msgstr "" |
| 1125 | 1133 | msgid "Invalid argument format" |
| 1126 | 1134 | msgstr "" |
| 1127 | 1135 | |
| 1128 | -#: src/v3270/widget.c:940 | |
| 1136 | +#: local/session.cc:69 src/v3270/widget.c:940 | |
| 1129 | 1137 | msgid "Invalid callback table, possible version mismatch in lib3270" |
| 1130 | 1138 | msgstr "" |
| 1131 | 1139 | |
| ... | ... | @@ -1145,6 +1153,10 @@ msgstr "" |
| 1145 | 1153 | msgid "Invalid remap scope" |
| 1146 | 1154 | msgstr "" |
| 1147 | 1155 | |
| 1156 | +#: local/events.cc:88 local/events.cc:141 | |
| 1157 | +msgid "Invalid session handler" | |
| 1158 | +msgstr "" | |
| 1159 | + | |
| 1148 | 1160 | #: properties.c:164 |
| 1149 | 1161 | msgid "Is starting (no first screen)?" |
| 1150 | 1162 | msgstr "" |
| ... | ... | @@ -1320,6 +1332,10 @@ msgstr "" |
| 1320 | 1332 | msgid "Out of memory" |
| 1321 | 1333 | msgstr "" |
| 1322 | 1334 | |
| 1335 | +#: local/events.cc:71 | |
| 1336 | +msgid "Out of memory in vasprintf" | |
| 1337 | +msgstr "" | |
| 1338 | + | |
| 1323 | 1339 | #: 80javasamples.xml:39 |
| 1324 | 1340 | msgid "Output test" |
| 1325 | 1341 | msgstr "" |
| ... | ... | @@ -1719,8 +1735,8 @@ msgstr "" |
| 1719 | 1735 | msgid "SSL Read error" |
| 1720 | 1736 | msgstr "" |
| 1721 | 1737 | |
| 1722 | -#: ssl/negotiate.c:181 ssl/negotiate.c:190 ssl/negotiate.c:197 | |
| 1723 | -#: ssl/negotiate.c:212 | |
| 1738 | +#: ssl/negotiate.c:181 ssl/negotiate.c:190 ssl/negotiate.c:199 | |
| 1739 | +#: ssl/negotiate.c:215 | |
| 1724 | 1740 | msgid "SSL error" |
| 1725 | 1741 | msgstr "" |
| 1726 | 1742 | |
| ... | ... | @@ -2047,7 +2063,7 @@ msgid "" |
| 2047 | 2063 | "been reached." |
| 2048 | 2064 | msgstr "" |
| 2049 | 2065 | |
| 2050 | -#: ssl/negotiate.c:198 src/v3270/security.c:136 | |
| 2066 | +#: ssl/negotiate.c:200 src/v3270/security.c:136 | |
| 2051 | 2067 | msgid "The CRL has expired." |
| 2052 | 2068 | msgstr "" |
| 2053 | 2069 | |
| ... | ... | @@ -2074,7 +2090,7 @@ msgid "" |
| 2074 | 2090 | "expected value. Unused." |
| 2075 | 2091 | msgstr "" |
| 2076 | 2092 | |
| 2077 | -#: ssl/negotiate.c:199 | |
| 2093 | +#: ssl/negotiate.c:201 | |
| 2078 | 2094 | msgid "The Certificate revocation list (CRL) has expired." |
| 2079 | 2095 | msgstr "" |
| 2080 | 2096 | |
| ... | ... | @@ -2087,7 +2103,7 @@ msgid "" |
| 2087 | 2103 | "The Certificate revocation list (CRL) of a certificate could not be found." |
| 2088 | 2104 | msgstr "" |
| 2089 | 2105 | |
| 2090 | -#: ssl/negotiate.c:213 | |
| 2106 | +#: ssl/negotiate.c:216 | |
| 2091 | 2107 | msgid "The SSL certificate for this host is not trusted." |
| 2092 | 2108 | msgstr "" |
| 2093 | 2109 | |
| ... | ... | @@ -2257,7 +2273,7 @@ msgstr "" |
| 2257 | 2273 | msgid "The root CA is not marked as trusted for the specified purpose." |
| 2258 | 2274 | msgstr "" |
| 2259 | 2275 | |
| 2260 | -#: ssl/negotiate.c:214 | |
| 2276 | +#: ssl/negotiate.c:217 | |
| 2261 | 2277 | msgid "" |
| 2262 | 2278 | "The security certificate presented by this host was not issued by a trusted " |
| 2263 | 2279 | "certificate authority." |
| ... | ... | @@ -2394,7 +2410,7 @@ msgstr "" |
| 2394 | 2410 | msgid "Turquoise" |
| 2395 | 2411 | msgstr "" |
| 2396 | 2412 | |
| 2397 | -#: properties.c:404 | |
| 2413 | +#: properties.c:403 | |
| 2398 | 2414 | msgid "URL for the CRL file" |
| 2399 | 2415 | msgstr "" |
| 2400 | 2416 | |
| ... | ... | @@ -2803,11 +2819,19 @@ msgstr "" |
| 2803 | 2819 | msgid "bracket" |
| 2804 | 2820 | msgstr "" |
| 2805 | 2821 | |
| 2806 | -#: toggles.c:333 linux/connect.c:314 | |
| 2822 | +#: local/events.cc:163 | |
| 2823 | +msgid "connected" | |
| 2824 | +msgstr "" | |
| 2825 | + | |
| 2826 | +#: toggles.c:333 linux/connect.c:317 | |
| 2807 | 2827 | msgid "disable" |
| 2808 | 2828 | msgstr "" |
| 2809 | 2829 | |
| 2810 | -#: toggles.c:333 linux/connect.c:314 | |
| 2830 | +#: local/events.cc:163 | |
| 2831 | +msgid "disconnected" | |
| 2832 | +msgstr "" | |
| 2833 | + | |
| 2834 | +#: toggles.c:333 linux/connect.c:317 | |
| 2811 | 2835 | msgid "enable" |
| 2812 | 2836 | msgstr "" |
| 2813 | 2837 | |
| ... | ... | @@ -2819,15 +2843,15 @@ msgstr "" |
| 2819 | 2843 | msgid "ioctlsocket(FIONBIO) failed." |
| 2820 | 2844 | msgstr "" |
| 2821 | 2845 | |
| 2822 | -#: properties.c:397 | |
| 2846 | +#: properties.c:396 | |
| 2823 | 2847 | msgid "lib3270 revision" |
| 2824 | 2848 | msgstr "" |
| 2825 | 2849 | |
| 2826 | -#: properties.c:390 | |
| 2850 | +#: properties.c:389 | |
| 2827 | 2851 | msgid "lib3270 version" |
| 2828 | 2852 | msgstr "" |
| 2829 | 2853 | |
| 2830 | -#: linux/connect.c:303 | |
| 2854 | +#: linux/connect.c:304 | |
| 2831 | 2855 | msgid "setsockopt(SO_OOBINLINE) has failed" |
| 2832 | 2856 | msgstr "" |
| 2833 | 2857 | ... | ... |
src/pw3270/common/config.c
| ... | ... | @@ -562,131 +562,81 @@ gchar * build_data_filename(const gchar *first_element, ...) |
| 562 | 562 | |
| 563 | 563 | gchar * filename_from_va(const gchar *first_element, va_list args) |
| 564 | 564 | { |
| 565 | - static const gchar * datadir = NULL; | |
| 566 | - const gchar * appname[] = { g_get_application_name(), PACKAGE_NAME }; | |
| 567 | - GString * result = NULL; | |
| 568 | - const gchar * element; | |
| 565 | + const gchar * appname[] = { g_get_application_name(), PACKAGE_NAME }; | |
| 566 | + size_t p,f; | |
| 569 | 567 | |
| 570 | - if(datadir) | |
| 571 | - result = g_string_new(datadir); | |
| 568 | + // Make base path | |
| 569 | + const gchar *element; | |
| 570 | + GString * result = g_string_new(""); | |
| 571 | + for(element = first_element;element;element = va_arg(args, gchar *)) | |
| 572 | + { | |
| 573 | + g_string_append_c(result,G_DIR_SEPARATOR); | |
| 574 | + g_string_append(result,element); | |
| 575 | + } | |
| 572 | 576 | |
| 573 | -#if defined( HAVE_WIN_REGISTRY ) | |
| 577 | + g_autofree gchar * suffix = g_string_free(result, FALSE); | |
| 574 | 578 | |
| 575 | - if(!result) | |
| 579 | +#if defined( HAVE_WIN_REGISTRY ) | |
| 580 | + for(p=0;p<G_N_ELEMENTS(appname) && !result;p++) | |
| 576 | 581 | { |
| 577 | - // No predefined datadir, search registry | |
| 578 | - int p; | |
| 579 | - | |
| 580 | - for(p=0;p<G_N_ELEMENTS(appname) && !result;p++) | |
| 581 | - { | |
| 582 | - gchar * path = g_strconcat("Software\\",appname[p],NULL); | |
| 583 | - HKEY hKey = 0; | |
| 584 | - LONG rc = 0; | |
| 582 | + g_autofree gchar * path = g_strconcat("Software\\",appname[p],NULL); | |
| 585 | 583 | |
| 586 | - // Note: This could be needed: http://support.microsoft.com/kb/556009 | |
| 587 | - // http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129(v=vs.85).aspx | |
| 584 | + HKEY hKey = 0; | |
| 585 | + LONG rc = 0; | |
| 588 | 586 | |
| 589 | - rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE,path,0,KEY_QUERY_VALUE,&hKey); | |
| 590 | - SetLastError(rc); | |
| 591 | - | |
| 592 | - if(rc == ERROR_SUCCESS) | |
| 593 | - { | |
| 594 | - char data[4096]; | |
| 595 | - unsigned long datalen = sizeof(data); // data field length(in), data returned length(out) | |
| 596 | - unsigned long datatype; // #defined in winnt.h (predefined types 0-11) | |
| 597 | - | |
| 598 | - rc = RegQueryValueExA(hKey,"datadir",NULL,&datatype,(LPBYTE) data,&datalen); | |
| 599 | - if(rc == ERROR_SUCCESS) | |
| 600 | - { | |
| 601 | - result = g_string_new(g_strchomp(data)); | |
| 602 | - } | |
| 603 | - else | |
| 604 | - { | |
| 605 | - gchar *msg = g_win32_error_message(rc); | |
| 606 | -#ifndef DEBUG | |
| 607 | - g_message("Error \"%s\" when getting application datadir from registry",msg); | |
| 608 | -#endif // !DEBUG | |
| 609 | - g_free(msg); | |
| 610 | - } | |
| 611 | - RegCloseKey(hKey); | |
| 612 | - } | |
| 613 | - else | |
| 614 | - { | |
| 615 | - gchar *msg = g_win32_error_message(rc); | |
| 616 | -#ifndef DEBUG | |
| 617 | - g_message("Error \"%s\" when opening datadir key from registry",msg); | |
| 618 | -#endif // !DEBUG | |
| 619 | - g_free(msg); | |
| 620 | - } | |
| 621 | - | |
| 622 | - g_free(path); | |
| 623 | - } | |
| 624 | - } | |
| 625 | -#endif // HAVE_WIN_REGISTRY | |
| 587 | + // Note: This could be needed: http://support.microsoft.com/kb/556009 | |
| 588 | + // http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129(v=vs.85).aspx | |
| 626 | 589 | |
| 627 | - if(!result) | |
| 628 | - { | |
| 629 | - // Search for application folder on system data dirs | |
| 630 | - const gchar * const * dir = g_get_system_data_dirs(); | |
| 631 | - int p; | |
| 590 | + rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE,path,0,KEY_QUERY_VALUE,&hKey); | |
| 591 | + SetLastError(rc); | |
| 632 | 592 | |
| 633 | - for(p=0;p<G_N_ELEMENTS(appname) && !datadir;p++) | |
| 593 | + if(rc == ERROR_SUCCESS) | |
| 634 | 594 | { |
| 635 | - int f; | |
| 595 | + char data[4096]; | |
| 596 | + unsigned long datalen = sizeof(data); // data field length(in), data returned length(out) | |
| 597 | + unsigned long datatype; // #defined in winnt.h (predefined types 0-11) | |
| 636 | 598 | |
| 637 | - for(f=0;dir[f] && !datadir;f++) | |
| 599 | + rc = RegQueryValueExA(hKey,"datadir",NULL,&datatype,(LPBYTE) data,&datalen); | |
| 600 | + if(rc == ERROR_SUCCESS) | |
| 638 | 601 | { |
| 639 | - gchar *name = g_build_filename(dir[f],appname[p],NULL); | |
| 640 | -// trace("Searching for %s: %s",name,g_file_test(name,G_FILE_TEST_IS_DIR) ? "Ok" : "Not found"); | |
| 641 | - if(g_file_test(name,G_FILE_TEST_IS_DIR)) | |
| 642 | - result = g_string_new(datadir = name); | |
| 643 | - else | |
| 644 | - g_free(name); | |
| 602 | + gchar * path = g_build_filename(data,appname[p],suffix,NULL); | |
| 603 | + trace("searching \"%s\"",path); | |
| 604 | + if(g_file_test(path,G_FILE_TEST_EXISTS)) | |
| 605 | + return path; | |
| 606 | + g_free(path); | |
| 645 | 607 | } |
| 608 | + RegCloseKey(hKey); | |
| 646 | 609 | } |
| 647 | 610 | |
| 648 | 611 | } |
| 612 | +#endif // HAVE_WIN_REGISTRY | |
| 649 | 613 | |
| 650 | -#ifdef DEBUG | |
| 651 | - if(!result) | |
| 614 | + // Check system data dirs | |
| 615 | + const gchar * const * system_data_dirs = g_get_system_data_dirs(); | |
| 616 | + for(p=0;p<G_N_ELEMENTS(appname);p++) | |
| 652 | 617 | { |
| 653 | - int f; | |
| 654 | - gchar *dir = g_get_current_dir(); | |
| 655 | - | |
| 656 | - for(f=0;f<2 && dir;f++) | |
| 618 | + for(f=0;system_data_dirs[f];f++) | |
| 657 | 619 | { |
| 658 | - gchar *ptr = dir; | |
| 659 | - dir = g_path_get_dirname(ptr); | |
| 660 | - g_free(ptr); | |
| 661 | - } | |
| 662 | - | |
| 663 | - if(dir) | |
| 664 | - { | |
| 665 | - gchar *name = g_build_filename(dir,"ui",NULL); | |
| 666 | - if(g_file_test(name,G_FILE_TEST_IS_DIR)) | |
| 667 | - result = g_string_new(dir); | |
| 668 | - g_free(name); | |
| 669 | - g_free(dir); | |
| 620 | + gchar * path = g_build_filename(system_data_dirs[f],appname[p],suffix,NULL); | |
| 621 | + trace("searching \"%s\"",path); | |
| 622 | + if(g_file_test(path,G_FILE_TEST_EXISTS)) | |
| 623 | + return path; | |
| 624 | + g_free(path); | |
| 670 | 625 | } |
| 671 | 626 | |
| 672 | 627 | } |
| 673 | -#endif // DEBUG | |
| 674 | 628 | |
| 675 | - if(!result) | |
| 676 | - { | |
| 677 | - gchar *dir = g_get_current_dir(); | |
| 678 | - result = g_string_new(dir); | |
| 679 | - g_free(dir); | |
| 680 | - g_warning("Unable to find application datadir, using %s",result->str); | |
| 681 | - } | |
| 629 | + // Check current dir | |
| 630 | + g_autofree gchar *dir = g_get_current_dir(); | |
| 631 | + gchar * path = g_build_filename(dir,suffix,NULL); | |
| 632 | + trace("searching \"%s\"",path); | |
| 633 | + if(g_file_test(path,G_FILE_TEST_EXISTS)) | |
| 634 | + return path; | |
| 635 | + g_free(path); | |
| 682 | 636 | |
| 683 | - for(element = first_element;element;element = va_arg(args, gchar *)) | |
| 684 | - { | |
| 685 | - g_string_append_c(result,G_DIR_SEPARATOR); | |
| 686 | - g_string_append(result,element); | |
| 687 | - } | |
| 637 | + trace("Can't find \"%s\"",suffix); | |
| 688 | 638 | |
| 689 | - return g_string_free(result, FALSE); | |
| 639 | + return g_build_filename(".",suffix); | |
| 690 | 640 | } |
| 691 | 641 | |
| 692 | 642 | #ifdef HAVE_WIN_REGISTRY | ... | ... |