Commit 22f7837413a8fe36ec0e75a85023045bd1dbfb63
1 parent
45efe865
Exists in
master
and in
5 other branches
Versão win64 passa a instalar o plugin rexx caso o ooRexx também esteja instalado
Showing
8 changed files
with
153 additions
and
83 deletions
Show diff stats
po/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: 2013-06-03 08:12-0300\n" | 8 | +"POT-Creation-Date: 2013-06-03 15:24-0300\n" |
| 9 | "PO-Revision-Date: 2013-05-08 14:30-0300\n" | 9 | "PO-Revision-Date: 2013-05-08 14:30-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" |
| @@ -43,7 +43,7 @@ msgstr "Ação %s precisa de um valor válido" | @@ -43,7 +43,7 @@ msgstr "Ação %s precisa de um valor válido" | ||
| 43 | msgid "%s action needs src attribute" | 43 | msgid "%s action needs src attribute" |
| 44 | msgstr "Ação %s precisa do atributo src" | 44 | msgstr "Ação %s precisa do atributo src" |
| 45 | 45 | ||
| 46 | -#: main.c:88 | 46 | +#: main.c:89 |
| 47 | #, c-format | 47 | #, c-format |
| 48 | msgid "%s requires GTK version %d.%d.%d" | 48 | msgid "%s requires GTK version %d.%d.%d" |
| 49 | msgstr "%s requer GTK versão %d.%d.%d" | 49 | msgstr "%s requer GTK versão %d.%d.%d" |
| @@ -88,7 +88,7 @@ msgstr "%s: Familia %d é inválida" | @@ -88,7 +88,7 @@ msgstr "%s: Familia %d é inválida" | ||
| 88 | msgid "%s:%d" | 88 | msgid "%s:%d" |
| 89 | msgstr "%s:%d" | 89 | msgstr "%s:%d" |
| 90 | 90 | ||
| 91 | -#: main.c:323 | 91 | +#: main.c:339 |
| 92 | msgid "- 3270 Emulator for Gtk" | 92 | msgid "- 3270 Emulator for Gtk" |
| 93 | msgstr "- Emulador 3270 para GTK" | 93 | msgstr "- Emulador 3270 para GTK" |
| 94 | 94 | ||
| @@ -169,7 +169,7 @@ msgstr "" | @@ -169,7 +169,7 @@ msgstr "" | ||
| 169 | msgid "<b>SSL state is undefined</b>Unexpected SSL status %ld" | 169 | msgid "<b>SSL state is undefined</b>Unexpected SSL status %ld" |
| 170 | msgstr "<b>Estado do SSL é indefinido</b>Estado SSL inesperado %ld" | 170 | msgstr "<b>Estado do SSL é indefinido</b>Estado SSL inesperado %ld" |
| 171 | 171 | ||
| 172 | -#: main.c:343 | 172 | +#: main.c:359 |
| 173 | msgid "" | 173 | msgid "" |
| 174 | "<b>Valid options:</b>\n" | 174 | "<b>Valid options:</b>\n" |
| 175 | "\n" | 175 | "\n" |
| @@ -222,7 +222,7 @@ msgid "An error occurred trying to allocate memory. This should never happen." | @@ -222,7 +222,7 @@ msgid "An error occurred trying to allocate memory. This should never happen." | ||
| 222 | msgstr "" | 222 | msgstr "" |
| 223 | "Ocorreu um erro ao tentar alocar memória. Isso nunca deveria acontecer." | 223 | "Ocorreu um erro ao tentar alocar memória. Isso nunca deveria acontecer." |
| 224 | 224 | ||
| 225 | -#: main.c:304 main.c:306 | 225 | +#: main.c:319 main.c:321 |
| 226 | msgid "Application name" | 226 | msgid "Application name" |
| 227 | msgstr "Nome da aplicação" | 227 | msgstr "Nome da aplicação" |
| 228 | 228 | ||
| @@ -675,7 +675,7 @@ msgstr "Erro ao resolver %s: %s" | @@ -675,7 +675,7 @@ msgstr "Erro ao resolver %s: %s" | ||
| 675 | msgid "Event Trace" | 675 | msgid "Event Trace" |
| 676 | msgstr "Trace de eventos" | 676 | msgstr "Trace de eventos" |
| 677 | 677 | ||
| 678 | -#: ui/rexx.xml:260 | 678 | +#: ui/80rexx.xml:260 |
| 679 | msgid "External Rexx script" | 679 | msgid "External Rexx script" |
| 680 | msgstr "Script rexx externo" | 680 | msgstr "Script rexx externo" |
| 681 | 681 | ||
| @@ -731,7 +731,7 @@ msgstr "Tela cheia" | @@ -731,7 +731,7 @@ msgstr "Tela cheia" | ||
| 731 | msgid "Function bar" | 731 | msgid "Function bar" |
| 732 | msgstr "Barra de funções" | 732 | msgstr "Barra de funções" |
| 733 | 733 | ||
| 734 | -#: main.c:92 main.c:384 | 734 | +#: main.c:93 main.c:406 |
| 735 | msgid "GTK Version mismatch" | 735 | msgid "GTK Version mismatch" |
| 736 | msgstr "Divergência de versão GTK" | 736 | msgstr "Divergência de versão GTK" |
| 737 | 737 | ||
| @@ -800,11 +800,11 @@ msgstr "Servidor rejeitou o tipo de dispositivo ou requisição" | @@ -800,11 +800,11 @@ msgstr "Servidor rejeitou o tipo de dispositivo ou requisição" | ||
| 800 | msgid "Host rejected resource(s)" | 800 | msgid "Host rejected resource(s)" |
| 801 | msgstr "Servidor rejeitou recurso(s)" | 801 | msgstr "Servidor rejeitou recurso(s)" |
| 802 | 802 | ||
| 803 | -#: main.c:312 | 803 | +#: main.c:327 |
| 804 | msgid "Host system type" | 804 | msgid "Host system type" |
| 805 | msgstr "Tipo do sistema no servidor" | 805 | msgstr "Tipo do sistema no servidor" |
| 806 | 806 | ||
| 807 | -#: main.c:310 | 807 | +#: main.c:325 |
| 808 | msgid "Host to connect" | 808 | msgid "Host to connect" |
| 809 | msgstr "Servidor a conectar" | 809 | msgstr "Servidor a conectar" |
| 810 | 810 | ||
| @@ -900,6 +900,11 @@ msgstr "LRECL:" | @@ -900,6 +900,11 @@ msgstr "LRECL:" | ||
| 900 | msgid "Lateral keypad" | 900 | msgid "Lateral keypad" |
| 901 | msgstr "Barra lateral" | 901 | msgstr "Barra lateral" |
| 902 | 902 | ||
| 903 | +#: main.c:334 | ||
| 904 | +#, fuzzy | ||
| 905 | +msgid "Log to file" | ||
| 906 | +msgstr "Salvar cópia para arquivo" | ||
| 907 | + | ||
| 903 | #: colors.c:388 | 908 | #: colors.c:388 |
| 904 | msgid "Misc colors" | 909 | msgid "Misc colors" |
| 905 | msgstr "Cores diversas" | 910 | msgstr "Cores diversas" |
| @@ -1134,7 +1139,7 @@ msgstr "PF8" | @@ -1134,7 +1139,7 @@ msgstr "PF8" | ||
| 1134 | msgid "PF9" | 1139 | msgid "PF9" |
| 1135 | msgstr "PF9" | 1140 | msgstr "PF9" |
| 1136 | 1141 | ||
| 1137 | -#: main.c:341 | 1142 | +#: main.c:357 |
| 1138 | msgid "Parse error" | 1143 | msgid "Parse error" |
| 1139 | msgstr "Erro de interpretação" | 1144 | msgstr "Erro de interpretação" |
| 1140 | 1145 | ||
| @@ -1171,7 +1176,7 @@ msgstr "Colar com margem esquerda" | @@ -1171,7 +1176,7 @@ msgstr "Colar com margem esquerda" | ||
| 1171 | msgid "Path length constraint exceeded" | 1176 | msgid "Path length constraint exceeded" |
| 1172 | msgstr "Path length constraint exceeded" | 1177 | msgstr "Path length constraint exceeded" |
| 1173 | 1178 | ||
| 1174 | -#: main.c:307 | 1179 | +#: main.c:322 |
| 1175 | msgid "Path to application data files" | 1180 | msgid "Path to application data files" |
| 1176 | msgstr "Caminho para os arquivos de dados da aplicação" | 1181 | msgstr "Caminho para os arquivos de dados da aplicação" |
| 1177 | 1182 | ||
| @@ -1524,7 +1529,7 @@ msgstr "Trace de tela" | @@ -1524,7 +1529,7 @@ msgstr "Trace de tela" | ||
| 1524 | msgid "Screen size" | 1529 | msgid "Screen size" |
| 1525 | msgstr "Tamanho da tela" | 1530 | msgstr "Tamanho da tela" |
| 1526 | 1531 | ||
| 1527 | -#: ui/rexx.xml:260 | 1532 | +#: ui/80rexx.xml:260 |
| 1528 | msgid "Scripts" | 1533 | msgid "Scripts" |
| 1529 | msgstr "Scripts" | 1534 | msgstr "Scripts" |
| 1530 | 1535 | ||
| @@ -1588,7 +1593,7 @@ msgstr "Enviar arquivo" | @@ -1588,7 +1593,7 @@ msgstr "Enviar arquivo" | ||
| 1588 | msgid "Send file to host" | 1593 | msgid "Send file to host" |
| 1589 | msgstr "Enviar arquivo para o servidor" | 1594 | msgstr "Enviar arquivo para o servidor" |
| 1590 | 1595 | ||
| 1591 | -#: main.c:317 | 1596 | +#: main.c:332 |
| 1592 | msgid "Send messages to syslog" | 1597 | msgid "Send messages to syslog" |
| 1593 | msgstr "Enviar mensagens para o log do sistema" | 1598 | msgstr "Enviar mensagens para o log do sistema" |
| 1594 | 1599 | ||
| @@ -1596,7 +1601,7 @@ msgstr "Enviar mensagens para o log do sistema" | @@ -1596,7 +1601,7 @@ msgstr "Enviar mensagens para o log do sistema" | ||
| 1596 | msgid "Send/Receive" | 1601 | msgid "Send/Receive" |
| 1597 | msgstr "Enviar/Receber" | 1602 | msgstr "Enviar/Receber" |
| 1598 | 1603 | ||
| 1599 | -#: main.c:309 | 1604 | +#: main.c:324 |
| 1600 | msgid "Session name" | 1605 | msgid "Session name" |
| 1601 | msgstr "Nome da sessão" | 1606 | msgstr "Nome da sessão" |
| 1602 | 1607 | ||
| @@ -1604,15 +1609,15 @@ msgstr "Nome da sessão" | @@ -1604,15 +1609,15 @@ msgstr "Nome da sessão" | ||
| 1604 | msgid "Set hostname" | 1609 | msgid "Set hostname" |
| 1605 | msgstr "Selecione servidor" | 1610 | msgstr "Selecione servidor" |
| 1606 | 1611 | ||
| 1607 | -#: main.c:311 | 1612 | +#: main.c:326 |
| 1608 | msgid "Set reported colors (8/16)" | 1613 | msgid "Set reported colors (8/16)" |
| 1609 | msgstr "Define número de cores informadas (8/16)" | 1614 | msgstr "Define número de cores informadas (8/16)" |
| 1610 | 1615 | ||
| 1611 | -#: main.c:314 | 1616 | +#: main.c:329 |
| 1612 | msgid "Set toggles OFF" | 1617 | msgid "Set toggles OFF" |
| 1613 | msgstr "Desativa toggles" | 1618 | msgstr "Desativa toggles" |
| 1614 | 1619 | ||
| 1615 | -#: main.c:313 | 1620 | +#: main.c:328 |
| 1616 | msgid "Set toggles ON" | 1621 | msgid "Set toggles ON" |
| 1617 | msgstr "Ativa toggles" | 1622 | msgstr "Ativa toggles" |
| 1618 | 1623 | ||
| @@ -1896,7 +1901,7 @@ msgstr "" | @@ -1896,7 +1901,7 @@ msgstr "" | ||
| 1896 | "programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple " | 1901 | "programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple " |
| 1897 | "Place, Suite 330, Boston, MA, 02111-1307, USA" | 1902 | "Place, Suite 330, Boston, MA, 02111-1307, USA" |
| 1898 | 1903 | ||
| 1899 | -#: main.c:380 | 1904 | +#: main.c:402 |
| 1900 | #, c-format | 1905 | #, c-format |
| 1901 | msgid "This program requires GTK version %d.%d.%d" | 1906 | msgid "This program requires GTK version %d.%d.%d" |
| 1902 | msgstr "Este programa precisa do GTK versão %d.%d.%d" | 1907 | msgstr "Este programa precisa do GTK versão %d.%d.%d" |
| @@ -2039,7 +2044,7 @@ msgstr "Atributo %s inesperado ou inválido: \"%s\"" | @@ -2039,7 +2044,7 @@ msgstr "Atributo %s inesperado ou inválido: \"%s\"" | ||
| 2039 | msgid "Unexpected or invalid attribute value \"%s\"" | 2044 | msgid "Unexpected or invalid attribute value \"%s\"" |
| 2040 | msgstr "Valor de attributo inesperado ou inválido: \"%s\"" | 2045 | msgstr "Valor de attributo inesperado ou inválido: \"%s\"" |
| 2041 | 2046 | ||
| 2042 | -#: main.c:193 | 2047 | +#: main.c:194 |
| 2043 | #, c-format | 2048 | #, c-format |
| 2044 | msgid "Unexpected or invalid color value \"%s\"" | 2049 | msgid "Unexpected or invalid color value \"%s\"" |
| 2045 | msgstr "Valor de cor inválido ou inesperado: \"%s\"" | 2050 | msgstr "Valor de cor inválido ou inesperado: \"%s\"" |
| @@ -2249,7 +2254,7 @@ msgstr "_Desconectar" | @@ -2249,7 +2254,7 @@ msgstr "_Desconectar" | ||
| 2249 | msgid "_Edit" | 2254 | msgid "_Edit" |
| 2250 | msgstr "_Editar" | 2255 | msgstr "_Editar" |
| 2251 | 2256 | ||
| 2252 | -#: ui/rexx.xml:256 | 2257 | +#: ui/80rexx.xml:256 |
| 2253 | msgid "_File" | 2258 | msgid "_File" |
| 2254 | msgstr "_Arquivo" | 2259 | msgstr "_Arquivo" |
| 2255 | 2260 | ||
| @@ -2309,7 +2314,7 @@ msgstr "Arquivo _texto" | @@ -2309,7 +2314,7 @@ msgstr "Arquivo _texto" | ||
| 2309 | msgid "_To" | 2314 | msgid "_To" |
| 2310 | msgstr "_Para" | 2315 | msgstr "_Para" |
| 2311 | 2316 | ||
| 2312 | -#: ui/rexx.xml:258 | 2317 | +#: ui/80rexx.xml:258 |
| 2313 | msgid "_View" | 2318 | msgid "_View" |
| 2314 | msgstr "_Exibir" | 2319 | msgstr "_Exibir" |
| 2315 | 2320 | ||
| @@ -2355,6 +2360,17 @@ msgstr "translator-credits" | @@ -2355,6 +2360,17 @@ msgstr "translator-credits" | ||
| 2355 | msgid "unknown error" | 2360 | msgid "unknown error" |
| 2356 | msgstr "Erro desconhecido" | 2361 | msgstr "Erro desconhecido" |
| 2357 | 2362 | ||
| 2363 | +#~ msgid "<b>%s</b>\n" | ||
| 2364 | +#~ msgstr "<b>%s</b>\n" | ||
| 2365 | + | ||
| 2366 | +#, fuzzy | ||
| 2367 | +#~ msgid "Can't load plugin" | ||
| 2368 | +#~ msgstr "Não foi possível carregar arquivo" | ||
| 2369 | + | ||
| 2370 | +#, fuzzy | ||
| 2371 | +#~ msgid "Can't load plugin %s" | ||
| 2372 | +#~ msgstr "Não foi possível carregar %s" | ||
| 2373 | + | ||
| 2358 | #, fuzzy | 2374 | #, fuzzy |
| 2359 | #~ msgid "Script" | 2375 | #~ msgid "Script" |
| 2360 | #~ msgstr "Scripts" | 2376 | #~ msgstr "Scripts" |
pw3270-x86_64.nsi.in
| @@ -128,19 +128,19 @@ SubSection "@PACKAGE@" SecMain | @@ -128,19 +128,19 @@ SubSection "@PACKAGE@" SecMain | ||
| 128 | 128 | ||
| 129 | sectionEnd | 129 | sectionEnd |
| 130 | 130 | ||
| 131 | -# | ||
| 132 | -# Section /o "Rexx" RexxPlugin | ||
| 133 | -# setOutPath $INSTDIR | ||
| 134 | -# | ||
| 135 | -# CreateDirectory "$INSTDIR" | ||
| 136 | -# file src\plugins\rexx\rx3270.cls | ||
| 137 | -# | ||
| 138 | -# CreateDirectory "$INSTDIR\plugins" | ||
| 139 | -# file "/oname=$INSTDIR\plugins\rx3270.dll" ".bin\Release\plugins\rx3270.dll" | ||
| 140 | -# file "/oname=$INSTDIR\ui\rexx.xml" ui\rexx.xml | ||
| 141 | -# | ||
| 142 | -# sectionEnd | ||
| 143 | -# | 131 | + Section /o "Rexx" RexxPlugin |
| 132 | + | ||
| 133 | + setOutPath $INSTDIR | ||
| 134 | + | ||
| 135 | + file "/oname=$INSTDIR\plugins\rxplug.dll" ".bin\Release\plugins\rx3270.dll" | ||
| 136 | + file "/oname=$INSTDIR\ui\80rexx.xml" "ui\80rexx.xml" | ||
| 137 | + | ||
| 138 | + file "/oname=$PROGRAMFILES64\ooRexx\rx3270.cls" "src/plugins/rx3270/rx3270.cls" | ||
| 139 | + file "/oname=$INSTDIR\rx3270.dll.@PACKAGE_VERSION@" ".bin\Release\rx3270.dll.@PACKAGE_VERSION@" | ||
| 140 | + file "/oname=$PROGRAMFILES64\ooRexx\rx3270.dll" ".bin\Release\rx3270.dll" | ||
| 141 | + | ||
| 142 | + sectionEnd | ||
| 143 | + | ||
| 144 | SubSectionEnd | 144 | SubSectionEnd |
| 145 | 145 | ||
| 146 | SubSectionEnd | 146 | SubSectionEnd |
| @@ -205,7 +205,8 @@ section "Uninstall" | @@ -205,7 +205,8 @@ section "Uninstall" | ||
| 205 | delete $SYSDIR\libhllapi.dll | 205 | delete $SYSDIR\libhllapi.dll |
| 206 | 206 | ||
| 207 | # Delete extension libraries | 207 | # Delete extension libraries |
| 208 | -# delete $PROGRAMFILES\ooRexx\rx3270.dll | 208 | + delete "$PROGRAMFILES64\ooRexx\rx3270.cls" |
| 209 | + delete "$PROGRAMFILES64\ooRexx\rx3270.dll" | ||
| 209 | 210 | ||
| 210 | RMDir /r "$INSTDIR" | 211 | RMDir /r "$INSTDIR" |
| 211 | 212 | ||
| @@ -213,6 +214,16 @@ sectionEnd | @@ -213,6 +214,16 @@ sectionEnd | ||
| 213 | 214 | ||
| 214 | Function .onInit | 215 | Function .onInit |
| 215 | 216 | ||
| 217 | +IfFileExists $PROGRAMFILES64\ooRexx\rexx.exe EnableRexx RexxSET | ||
| 218 | + | ||
| 219 | +EnableRexx: | ||
| 220 | + SectionGetFlags "${RexxPlugin}" $0 | ||
| 221 | + IntOp $0 $0 | ${SF_SELECTED} | ||
| 222 | + SectionSetFlags "${RexxPlugin}" $0 | ||
| 223 | + | ||
| 224 | +RexxSET: | ||
| 225 | + | ||
| 226 | + | ||
| 216 | 227 | ||
| 217 | FunctionEnd | 228 | FunctionEnd |
| 218 | 229 |
src/include/plugin.mak.in
| @@ -72,8 +72,8 @@ DLL_FLAGS=@DLL_FLAGS@ | @@ -72,8 +72,8 @@ DLL_FLAGS=@DLL_FLAGS@ | ||
| 72 | DLL_CFLAGS=@DLL_CFLAGS@ | 72 | DLL_CFLAGS=@DLL_CFLAGS@ |
| 73 | DEBUG_CFLAGS=-DDEBUG=1 -g -Wall | 73 | DEBUG_CFLAGS=-DDEBUG=1 -g -Wall |
| 74 | LIB3270_MODE ?= Default | 74 | LIB3270_MODE ?= Default |
| 75 | -DLL_NAME=@DLLDIR@/@DLLPREFIX@$(MODULE_NAME)@DLLEXT@ | ||
| 76 | -PLUGIN_NAME=plugins/$(MODULE_NAME)@DLLEXT@ | 75 | +DLL_NAME ?= @DLLDIR@/@DLLPREFIX@$(MODULE_NAME)@DLLEXT@ |
| 76 | +PLUGIN_NAME ?= plugins/$(MODULE_NAME)@DLLEXT@ | ||
| 77 | 77 | ||
| 78 | ifeq ($(LIB3270_MODE),Debug) | 78 | ifeq ($(LIB3270_MODE),Debug) |
| 79 | PW3270_LIBS=-L../../../.bin/Debug@DLLDIR@ -l$(PACKAGE_TARNAME) | 79 | PW3270_LIBS=-L../../../.bin/Debug@DLLDIR@ -l$(PACKAGE_TARNAME) |
| @@ -122,11 +122,11 @@ $(OBJRLS)/%.o: %.cc $(DEPENDS) | @@ -122,11 +122,11 @@ $(OBJRLS)/%.o: %.cc $(DEPENDS) | ||
| 122 | 122 | ||
| 123 | #---[ Targets ]---------------------------------------------------------------- | 123 | #---[ Targets ]---------------------------------------------------------------- |
| 124 | 124 | ||
| 125 | -all: $(BINRLS)/plugins/$(MODULE_NAME)@DLLEXT@ | 125 | +all: $(BINRLS)/$(PLUGIN_NAME) |
| 126 | 126 | ||
| 127 | -Release: $(BINRLS)/plugins/$(MODULE_NAME)@DLLEXT@ | 127 | +Release: $(BINRLS)/$(PLUGIN_NAME) |
| 128 | 128 | ||
| 129 | -Debug: $(BINDBG)/plugins/$(MODULE_NAME)@DLLEXT@ | 129 | +Debug: $(BINDBG)/$(PLUGIN_NAME) |
| 130 | 130 | ||
| 131 | $(BINDBG)$(DLL_NAME): $(BINDBG)$(DLL_NAME).$(VERSION) | 131 | $(BINDBG)$(DLL_NAME): $(BINDBG)$(DLL_NAME).$(VERSION) |
| 132 | @rm -f $@ | 132 | @rm -f $@ |
src/plugins/hllapi/hllapi.c
| @@ -114,7 +114,7 @@ static int connect_ps(char *buffer, unsigned short *length, unsigned short *rc) | @@ -114,7 +114,7 @@ static int connect_ps(char *buffer, unsigned short *length, unsigned short *rc) | ||
| 114 | { | 114 | { |
| 115 | char *tempbuffer = NULL; | 115 | char *tempbuffer = NULL; |
| 116 | 116 | ||
| 117 | - trace("%s: len=%d buflen=%d",__FUNCTION__,*length,strlen(buffer)); | 117 | + trace("%s: len=%d buflen=%d",__FUNCTION__,*length,(int) strlen(buffer)); |
| 118 | 118 | ||
| 119 | if(strlen(buffer) > *length) | 119 | if(strlen(buffer) > *length) |
| 120 | buffer[*length] = 0; | 120 | buffer[*length] = 0; |
src/pw3270/main.c
| @@ -55,6 +55,7 @@ | @@ -55,6 +55,7 @@ | ||
| 55 | static const gchar * systype = NULL; | 55 | static const gchar * systype = NULL; |
| 56 | static const gchar * toggleset = NULL; | 56 | static const gchar * toggleset = NULL; |
| 57 | static const gchar * togglereset = NULL; | 57 | static const gchar * togglereset = NULL; |
| 58 | + static const gchar * logfile = NULL; | ||
| 58 | 59 | ||
| 59 | #ifdef HAVE_GTKMAC | 60 | #ifdef HAVE_GTKMAC |
| 60 | GtkOSXApplication * osxapp = NULL; | 61 | GtkOSXApplication * osxapp = NULL; |
| @@ -240,6 +241,20 @@ static void g_syslog(const gchar *log_domain,GLogLevelFlags log_level,const gcha | @@ -240,6 +241,20 @@ static void g_syslog(const gchar *log_domain,GLogLevelFlags log_level,const gcha | ||
| 240 | } | 241 | } |
| 241 | #endif // HAVE_SYSLOG | 242 | #endif // HAVE_SYSLOG |
| 242 | 243 | ||
| 244 | +static void g_logfile(const gchar *log_domain,GLogLevelFlags log_level,const gchar *message,gpointer user_data) | ||
| 245 | +{ | ||
| 246 | + FILE *out = fopen(logfile,"a"); | ||
| 247 | + if(out) | ||
| 248 | + { | ||
| 249 | + time_t ltime; | ||
| 250 | + char wrk[40]; | ||
| 251 | + time(<ime); | ||
| 252 | + strftime(wrk, 39, "%d/%m/%Y %H:%M:%S", localtime(<ime)); | ||
| 253 | + fprintf(out,"%s\t%s\n",wrk,message); | ||
| 254 | + fclose(out); | ||
| 255 | + } | ||
| 256 | +} | ||
| 257 | + | ||
| 243 | int main(int argc, char *argv[]) | 258 | int main(int argc, char *argv[]) |
| 244 | { | 259 | { |
| 245 | static const gchar * session_name = PACKAGE_NAME; | 260 | static const gchar * session_name = PACKAGE_NAME; |
| @@ -316,6 +331,7 @@ int main(int argc, char *argv[]) | @@ -316,6 +331,7 @@ int main(int argc, char *argv[]) | ||
| 316 | #if defined( HAVE_SYSLOG ) | 331 | #if defined( HAVE_SYSLOG ) |
| 317 | { "syslog", 'l', 0, G_OPTION_ARG_NONE, &log_to_syslog, N_( "Send messages to syslog" ), NULL }, | 332 | { "syslog", 'l', 0, G_OPTION_ARG_NONE, &log_to_syslog, N_( "Send messages to syslog" ), NULL }, |
| 318 | #endif | 333 | #endif |
| 334 | + { "log", 'L', 0, G_OPTION_ARG_STRING, &logfile, N_( "Log to file" ), NULL }, | ||
| 319 | 335 | ||
| 320 | { NULL } | 336 | { NULL } |
| 321 | }; | 337 | }; |
| @@ -362,7 +378,13 @@ int main(int argc, char *argv[]) | @@ -362,7 +378,13 @@ int main(int argc, char *argv[]) | ||
| 362 | openlog(g_get_prgname(), LOG_NDELAY, LOG_USER); | 378 | openlog(g_get_prgname(), LOG_NDELAY, LOG_USER); |
| 363 | g_log_set_default_handler(g_syslog,NULL); | 379 | g_log_set_default_handler(g_syslog,NULL); |
| 364 | } | 380 | } |
| 381 | + else if(logfile) | ||
| 382 | +#else | ||
| 383 | + if(logfile) | ||
| 365 | #endif // HAVE_SYSLOG | 384 | #endif // HAVE_SYSLOG |
| 385 | + { | ||
| 386 | + g_log_set_default_handler(g_logfile,NULL); | ||
| 387 | + } | ||
| 366 | 388 | ||
| 367 | } | 389 | } |
| 368 | 390 |
src/pw3270/plugin.c
| @@ -82,6 +82,27 @@ | @@ -82,6 +82,27 @@ | ||
| 82 | if(!handle) | 82 | if(!handle) |
| 83 | { | 83 | { |
| 84 | g_message("Error \"%s\" loading %s",g_module_error(),filename); | 84 | g_message("Error \"%s\" loading %s",g_module_error(),filename); |
| 85 | +/* | ||
| 86 | + gchar * text = g_strdup(g_module_error()); | ||
| 87 | + gchar * name = g_path_get_basename(filename); | ||
| 88 | + GtkWidget * popup = gtk_message_dialog_new_with_markup( | ||
| 89 | + NULL, | ||
| 90 | + GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, | ||
| 91 | + GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, | ||
| 92 | + _( "Can't load plugin %s" ),name); | ||
| 93 | + | ||
| 94 | + gtk_window_set_title(GTK_WINDOW(popup),_("Can't load plugin")); | ||
| 95 | + | ||
| 96 | + g_message("Error \"%s\" loading %s",text,filename); | ||
| 97 | + | ||
| 98 | + gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(popup),_( "<b>%s</b>\n" ),text); | ||
| 99 | + | ||
| 100 | + gtk_dialog_run(GTK_DIALOG(popup)); | ||
| 101 | + gtk_widget_destroy(popup); | ||
| 102 | + | ||
| 103 | + g_free(text); | ||
| 104 | + g_free(name); | ||
| 105 | +*/ | ||
| 85 | } | 106 | } |
| 86 | else | 107 | else |
| 87 | { | 108 | { |
| @@ -0,0 +1,42 @@ | @@ -0,0 +1,42 @@ | ||
| 1 | +<!----------------------------------------------------------------------------- | ||
| 2 | + | ||
| 3 | + Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
| 4 | + (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
| 5 | + aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
| 6 | + | ||
| 7 | + Copyright (C) <2008> <Banco do Brasil S.A.> | ||
| 8 | + | ||
| 9 | + Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
| 10 | + os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
| 11 | + Free Software Foundation. | ||
| 12 | + | ||
| 13 | + Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
| 14 | + GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
| 15 | + A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
| 16 | + obter mais detalhes. | ||
| 17 | + | ||
| 18 | + Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
| 19 | + programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
| 20 | + St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + Contatos: | ||
| 24 | + | ||
| 25 | + perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
| 26 | + erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
| 27 | + licinio@bb.com.br (Licínio Luis Branco) | ||
| 28 | + kraucer@bb.com.br (Kraucer Fernandes Mazuco) | ||
| 29 | + | ||
| 30 | +------------------------------------------------------------------------------> | ||
| 31 | + | ||
| 32 | +<ui> | ||
| 33 | + <menubar name='topmenu' topmenu='yes'> | ||
| 34 | + <menu name='FileMenu' label='_File' /> | ||
| 35 | + <menu name='EditMenu' label='_Edit' /> | ||
| 36 | + <menu name='View' label='_View' /> | ||
| 37 | + <menu name='ScriptsMenu' label='Scripts' visible='yes' > | ||
| 38 | + <menuitem action='rexx' label='External Rexx script'/> | ||
| 39 | + </menu> | ||
| 40 | + </menubar> | ||
| 41 | +</ui> | ||
| 42 | + |
ui/rexx.xml
| @@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
| 1 | -<!----------------------------------------------------------------------------- | ||
| 2 | - | ||
| 3 | - Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
| 4 | - (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
| 5 | - aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
| 6 | - | ||
| 7 | - Copyright (C) <2008> <Banco do Brasil S.A.> | ||
| 8 | - | ||
| 9 | - Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
| 10 | - os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
| 11 | - Free Software Foundation. | ||
| 12 | - | ||
| 13 | - Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
| 14 | - GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
| 15 | - A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
| 16 | - obter mais detalhes. | ||
| 17 | - | ||
| 18 | - Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
| 19 | - programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
| 20 | - St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 21 | - | ||
| 22 | - | ||
| 23 | - Contatos: | ||
| 24 | - | ||
| 25 | - perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
| 26 | - erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
| 27 | - licinio@bb.com.br (Licínio Luis Branco) | ||
| 28 | - kraucer@bb.com.br (Kraucer Fernandes Mazuco) | ||
| 29 | - | ||
| 30 | -------------------------------------------------------------------------------> | ||
| 31 | - | ||
| 32 | -<ui> | ||
| 33 | - <menubar name='topmenu' topmenu='yes'> | ||
| 34 | - <menu name='FileMenu' label='_File' /> | ||
| 35 | - <menu name='EditMenu' label='_Edit' /> | ||
| 36 | - <menu name='View' label='_View' /> | ||
| 37 | - <menu name='ScriptsMenu' label='Scripts' visible='yes' > | ||
| 38 | - <menuitem action='rexx' label='External Rexx script'/> | ||
| 39 | - </menu> | ||
| 40 | - </menubar> | ||
| 41 | -</ui> | ||
| 42 | - |