Commit 35d8292f6d656945f2f60cf06c3749b3c6b7fbc8
1 parent
05292584
Exists in
master
and in
5 other branches
Preparando para empacotamento do plugin dbus
Showing
14 changed files
with
114 additions
and
53 deletions
Show diff stats
Makefile.in
... | ... | @@ -76,6 +76,8 @@ AMTAR=@AMTAR@ |
76 | 76 | DBGCMDPREFIX=@DBGCMDPREFIX@ |
77 | 77 | MAKENSIS=@MAKENSIS@ |
78 | 78 | |
79 | +PLUGIN_RELEASE_ARGS=LIB3270_MODE=Release | |
80 | + | |
79 | 81 | #---[ Rules ]------------------------------------------------------------------ |
80 | 82 | |
81 | 83 | %.tar.bz2: %.tar |
... | ... | @@ -130,7 +132,7 @@ $(BINDIR)/Debug/plugins/%@DLLEXT@: src/plugins/%/* $(BINDIR)/Debug/$(PACKAGE_TAR |
130 | 132 | @make BINDIR="../../../$(BINDIR)" PW3270_LIBS="-L../../../$(BINDIR)/Debug@DLLDIR@ -l3270 -lpw3270" PW3270_CFLAGS="-I../../../src/include" -C $(dir $<) Debug |
131 | 133 | |
132 | 134 | $(BINDIR)/Release/plugins/%@DLLEXT@: src/plugins/%/* $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) |
133 | - @make BINDIR="../../../$(BINDIR)" PW3270_LIBS="-L../../../$(BINDIR)/Release@DLLDIR@ -l3270 -lpw3270" PW3270_CFLAGS="-I../../../src/include" -C $(dir $<) Release | |
135 | + @make $(PLUGIN_RELEASE_ARGS) -C $(dir $<) Release | |
134 | 136 | |
135 | 137 | #---[ Release targets ]-------------------------------------------------------- |
136 | 138 | |
... | ... | @@ -262,7 +264,7 @@ $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar: clean pixmaps filelist |
262 | 264 | @rm -fr $(TMPDIR)/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) |
263 | 265 | @echo $@ |
264 | 266 | |
265 | -install: install-sdk install-lib install-app install-man | |
267 | +install: install-sdk install-lib install-app install-man install-plugins | |
266 | 268 | |
267 | 269 | install-app: $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) install-locale |
268 | 270 | @$(MAKE) BINDIR="../../$(BINDIR)" LIB3270_LIBS="$(RLSLIB)" LIB3270_CFLAGS="-I../../src/include" -C src/pw3270 install |
... | ... | @@ -270,6 +272,9 @@ install-app: $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) install-locale |
270 | 272 | @$(INSTALL_DATA) colors.conf $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME) |
271 | 273 | @$(INSTALL_DATA) ui/*.xml $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/ui |
272 | 274 | |
275 | +install-plugins: $(foreach PLUGIN, $(PLUGINS), $(BINDIR)/Release/plugins/$(PLUGIN)@DLLEXT@) | |
276 | + @echo -e $(foreach PLUGIN, $(PLUGINS), $(MAKE) DESTDIR=$(DESTDIR) $(PLUGIN_RELEASE_ARGS) -C src/plugins/$(PLUGIN) install\\n ) | $(SHELL) | |
277 | + | |
273 | 278 | install-lib: $(BINDIR)/Release@DLLDIR@/@DLLPREFIX@3270@DLLEXT@ |
274 | 279 | @$(MAKE) BINRLS="../../.bin/Release@DLLDIR@" -C src/lib3270 install |
275 | 280 | |
... | ... | @@ -278,14 +283,12 @@ locale: $(foreach MO, $(basename $(LANG_FILES)), $(BINDIR)/Release/$(localedir)/ |
278 | 283 | install-locale: $(foreach MO, $(basename $(LANG_FILES)), $(BINDIR)/Release/$(localedir)/$(notdir $(MO))/LC_MESSAGES/$(PACKAGE_NAME).mo) |
279 | 284 | @echo -e $(foreach MO, $(notdir $(basename $(LANG_FILES))), mkdir -p $(DESTDIR)/$(localedir)/$(MO)/LC_MESSAGES\\n$(INSTALL_DATA) $(BINDIR)/Release/$(localedir)/$(MO)/LC_MESSAGES/$(PACKAGE_NAME).mo $(DESTDIR)/$(localedir)/$(MO)/LC_MESSAGES/$(PACKAGE_NAME).mo \\n ) | $(SHELL) |
280 | 285 | |
281 | - | |
282 | 286 | install-man: |
283 | 287 | @$(MKDIR) $(DESTDIR)$(mandir)/man1 |
284 | 288 | @$(INSTALL_DATA) man/man1/pw3270.1 $(DESTDIR)/$(mandir)/man1/pw3270.1 |
285 | 289 | @$(MKDIR) $(DESTDIR)$(mandir)/man5 |
286 | 290 | @$(INSTALL_DATA) man/man5/pw3270.5 $(DESTDIR)/$(mandir)/man5/pw3270.5 |
287 | 291 | |
288 | - | |
289 | 292 | install-sdk: |
290 | 293 | @$(MKDIR) $(DESTDIR)$(includedir)/lib3270 |
291 | 294 | @$(INSTALL_DATA) src/include/lib3270.h $(DESTDIR)/$(includedir) |
... | ... | @@ -349,16 +352,16 @@ $(BINDIR)/Debug/plugins/remotectl@DLLEXT@: src/plugins/remotectl/* $(BINDIR)/Deb |
349 | 352 | @make BINDIR="../../../$(BINDIR)" PW3270_LIBS="-L../../../$(BINDIR)/Debug@DLLDIR@ -l3270 -lpw3270" PW3270_CFLAGS="-I../../../src/include" -C $(dir $<) Debug |
350 | 353 | |
351 | 354 | $(BINDIR)/Release/plugins/remotectl@DLLEXT@: src/plugins/remotectl/* $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) |
352 | - @make BINDIR="../../../$(BINDIR)" PW3270_LIBS="-L../../../$(BINDIR)/Release@DLLDIR@ -l3270 -lpw3270" PW3270_CFLAGS="-I../../../src/include" -C $(dir $<) Release | |
355 | + @make $(PLUGIN_RELEASE_ARGS) -C $(dir $<) Release | |
353 | 356 | |
354 | 357 | $(BINDIR)/Debug/plugins/rx3270@DLLEXT@: src/plugins/rx3270/* $(BINDIR)/Debug/$(PACKAGE_TARNAME)$(EXEEXT) |
355 | 358 | @make BINDIR="../../../$(BINDIR)" LIB3270_MODE=Debug -C $(dir $<) Debug |
356 | 359 | |
357 | 360 | $(BINDIR)/Release/plugins/rx3270@DLLEXT@: src/plugins/rx3270/* $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) |
358 | - @make BINDIR="../../../$(BINDIR)" LIB3270_MODE=Release -C $(dir $<) Release | |
361 | + @make $(PLUGIN_RELEASE_ARGS) -C $(dir $<) Release | |
359 | 362 | |
360 | 363 | $(BINDIR)/Debug/plugins/dbus3270@DLLEXT@: src/plugins/dbus3270/* $(BINDIR)/Debug/$(PACKAGE_TARNAME)$(EXEEXT) |
361 | 364 | @make BINDIR="../../../$(BINDIR)" LIB3270_MODE=Debug -C $(dir $<) Debug |
362 | 365 | |
363 | 366 | $(BINDIR)/Release/plugins/dbus3270@DLLEXT@: src/plugins/dbus3270/* $(BINDIR)/Release/$(PACKAGE_TARNAME)$(EXEEXT) |
364 | - @make BINDIR="../../../$(BINDIR)" LIB3270_MODE=Release -C $(dir $<) Release | |
367 | + @make $(PLUGIN_RELEASE_ARGS) -C $(dir $<) Release | ... | ... |
configure.ac
... | ... | @@ -353,9 +353,9 @@ PKG_CHECK_MODULES( [DBUS], [dbus-glib-1], app_cv_dbus=yes, AC_MSG_NOTICE([No DBU |
353 | 353 | AC_SUBST(DBUS_LIBS) |
354 | 354 | AC_SUBST(DBUS_CFLAGS) |
355 | 355 | |
356 | -#if test "$app_cv_dbus" == "yes"; then | |
357 | -# PLUGINS="$PLUGINS dbus3270" | |
358 | -#fi | |
356 | +if test "$app_cv_dbus" == "yes"; then | |
357 | + PLUGINS="$PLUGINS dbus3270" | |
358 | +fi | |
359 | 359 | |
360 | 360 | #--[ SSL ]---------------------------------------------------------------------------------------------------------------------------------------------------- |
361 | 361 | ... | ... |
man/man1/pw3270.1
... | ... | @@ -7,23 +7,23 @@ pw3270 \- a modern tn3270 emulator |
7 | 7 | .SH SYNOPSIS |
8 | 8 | .B pw3270 [-a |
9 | 9 | .I application-name |
10 | -.B ] [-h | |
10 | +.B ] [-h | |
11 | 11 | .I hostname:port |
12 | -.B ] [-s | |
12 | +.B ] [-s | |
13 | 13 | .I session name |
14 | 14 | .B ] |
15 | -.B ] [-c | |
15 | +.B ] [-c | |
16 | 16 | .I session colors |
17 | -.B ] [-t | |
17 | +.B ] [-t | |
18 | 18 | .I system type |
19 | -.B ] [-a | |
19 | +.B ] [-a | |
20 | 20 | .I application name |
21 | 21 | .B ] |
22 | 22 | .SH DESCRIPTION |
23 | -.B pw3270 | |
24 | -is a modern, GTK-based, completely free tn3270 emulator. | |
23 | +.B pw3270 | |
24 | +is a modern, GTK-based, completely free tn3270 emulator. | |
25 | 25 | |
26 | -Based on the original x3270 code by Paul Mattes, it was created originally for Banco do Brasil. It's now an official Brazilian Government Public Software project, and is used worldwide. | |
26 | +Based on the original x3270 code by Paul Mattes, it was created originally for Banco do Brasil. It's now an official Brazilian Government Public Software project, and is used worldwide. | |
27 | 27 | |
28 | 28 | pw3270 is fully themable, and each element on the screen can be individually customized through the configuration files. It also supports all kinds of monospaced TrueType and bitmap fonts your system already supports. |
29 | 29 | |
... | ... | @@ -34,7 +34,7 @@ File transfers are supported, for uploads and downloads. |
34 | 34 | Printing is implemented using the native GTK print dialogs. |
35 | 35 | |
36 | 36 | |
37 | -In addition to the modern GUI, a development library | |
37 | +In addition to the modern GUI, a development library | |
38 | 38 | .BR lib3270 (3) |
39 | 39 | has been created to allow you to create your own programs using the 3270 protocol. |
40 | 40 | |
... | ... | @@ -42,13 +42,13 @@ has been created to allow you to create your own programs using the 3270 protoco |
42 | 42 | .IP "--help" |
43 | 43 | Shows the available options. |
44 | 44 | .IP "-h hostname:port" |
45 | -Connects to the host and port specified. Use the form | |
46 | -.I "s:hostname:port" | |
45 | +Connects to the host and port specified. Use the form | |
46 | +.I "s:hostname:port" | |
47 | 47 | for a secure (SSL) connection. |
48 | 48 | .IP "-a application-name" |
49 | -Specifies an alternate window title. This is useful if you want to name each host window differently (with the service name or host address, for example). The default is to always name the window "pw3270". | |
49 | +Specifies an alternate window title. This is useful if you want to name each host window differently (with the service name or host address, for example). The default is to always name the window "pw3270". | |
50 | 50 | .IP "-s session-name" |
51 | -Specifies an anternate session-name. This affects some plugins who does IPC communications | |
51 | +Specifies an anternate session-name. This affects some plugins who does IPC communications, like the dbus one. | |
52 | 52 | .IP "-c Change the reported colors" |
53 | 53 | Change the response to a Query(Color); when 8 pw3270 will respond with a list of 8 supported colors; when 16 the response will be a list of the 16 standard colors. |
54 | 54 | .IP "-t Change systemtype" |
... | ... | @@ -70,7 +70,7 @@ Perry Werneck <perry.werneck at gmail dot com> |
70 | 70 | |
71 | 71 | Erico Mendonca <erico.mendonca at gmail dot com> |
72 | 72 | |
73 | -The official project page is located at http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270 . | |
73 | +The official project page is located at http://www.softwarepublico.gov.br/dotlrn/clubs/pw3270 . | |
74 | 74 | |
75 | 75 | .SH "SEE ALSO" |
76 | 76 | .BR pw3270 (5) | ... | ... |
po/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: 2013-02-21 10:43-0300\n" | |
8 | +"POT-Creation-Date: 2013-02-21 17:02-0300\n" | |
9 | 9 | "PO-Revision-Date: 2013-01-14 09:49-0200\n" |
10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
11 | 11 | "Language-Team: Português <>\n" |
... | ... | @@ -334,7 +334,7 @@ msgstr "Não foi possível conectar ao servidor" |
334 | 334 | msgid "Can't convert line %d from %s to %s" |
335 | 335 | msgstr "Não foi possível converter a linha %d de %s para %s" |
336 | 336 | |
337 | -#: selection.c:631 | |
337 | +#: selection.c:634 | |
338 | 338 | msgid "Can't cut rectangular regions" |
339 | 339 | msgstr "Recortar não permitido em seleção retangular" |
340 | 340 | |
... | ... | @@ -855,7 +855,7 @@ msgstr "Invalid CGCSGID '%s', ignoring" |
855 | 855 | msgid "Invalid charset entry '%s' (#%d)" |
856 | 856 | msgstr "Invalid charset entry '%s' (#%d)" |
857 | 857 | |
858 | -#: selection.c:631 | |
858 | +#: selection.c:634 | |
859 | 859 | msgid "Invalid cut action" |
860 | 860 | msgstr "Ação recortar inválida" |
861 | 861 | |
... | ... | @@ -961,7 +961,7 @@ msgstr "Normal/Protegido" |
961 | 961 | msgid "Normal/Unprotected" |
962 | 962 | msgstr "Normal/Desprotegido" |
963 | 963 | |
964 | -#: selection.c:631 | |
964 | +#: selection.c:634 | |
965 | 965 | msgid "Not available" |
966 | 966 | msgstr "Não disponível" |
967 | 967 | ... | ... |
pw3270.cbp
... | ... | @@ -54,6 +54,7 @@ |
54 | 54 | <Unit filename="configure.ac" /> |
55 | 55 | <Unit filename="debian.rules" /> |
56 | 56 | <Unit filename="makegtkruntime.sh.in" /> |
57 | + <Unit filename="man/man1/pw3270.1" /> | |
57 | 58 | <Unit filename="pw3270.nsi.in" /> |
58 | 59 | <Unit filename="pw3270.spec.in" /> |
59 | 60 | <Unit filename="src/include/lib3270.h" /> | ... | ... |
src/include/plugin.mak.in
... | ... | @@ -59,16 +59,17 @@ DLL_NAME=@DLLDIR@/@DLLPREFIX@$(MODULE_NAME)@DLLEXT@ |
59 | 59 | PLUGIN_NAME=plugins/$(MODULE_NAME)@DLLEXT@ |
60 | 60 | |
61 | 61 | ifeq ($(LIB3270_MODE),Debug) |
62 | - PW3270_LIBS=-L$(BINDBG)@DLLDIR@ -l3270 | |
63 | - PW3270_CFLAGS=-I../../../src/include | |
64 | - LIB3270_LIBS=-L$(BINDBG)@DLLDIR@ -l3270 | |
62 | + PW3270_LIBS="-L../../../.bin/Debug@DLLDIR@ -lpw3270" | |
63 | + PW3270_CFLAGS="-I../../../src/include" | |
64 | + LIB3270_LIBS="-L../../../.bin/Debug@DLLDIR@ -l3270" | |
65 | 65 | LIB270_CFLAGS=-I../../../src/include |
66 | 66 | endif |
67 | 67 | |
68 | 68 | ifeq ($(LIB3270_MODE),Release) |
69 | - PW3270_LIBS=-L$(BINRLS)@DLLDIR@ -l3270 | |
69 | + BINRLS=../../../.bin/Release | |
70 | + PW3270_LIBS=-L$(BINRLS)@DLLDIR@ -lpw3270 | |
70 | 71 | PW3270_CFLAGS=-I../../../src/include |
71 | - LIB3270_LIBS=-L$(BINRLS)@DLLDIR@ -l3270 | |
72 | + LIB3270_LIBS=-L$(BINRLS)@DLLDIR@ -l3270 | |
72 | 73 | LIB270_CFLAGS=-I../../../src/include |
73 | 74 | endif |
74 | 75 | ... | ... |
src/lib3270/selection.c
... | ... | @@ -380,7 +380,10 @@ static char * get_text(H3270 *hSession,unsigned char all) |
380 | 380 | size_t sz = 0; |
381 | 381 | |
382 | 382 | if(!(lib3270_connected(hSession) && hSession->text)) |
383 | + { | |
384 | + errno = ENOTCONN; | |
383 | 385 | return NULL; |
386 | + } | |
384 | 387 | |
385 | 388 | ret = lib3270_malloc(buflen); |
386 | 389 | |
... | ... | @@ -406,6 +409,7 @@ static char * get_text(H3270 *hSession,unsigned char all) |
406 | 409 | if(!sz) |
407 | 410 | { |
408 | 411 | lib3270_free(ret); |
412 | + errno = ENOENT; | |
409 | 413 | return NULL; |
410 | 414 | } |
411 | 415 | else if(sz > 1 && ret[sz-1] == '\n') // Remove ending \n |
... | ... | @@ -462,7 +466,10 @@ LIB3270_EXPORT char * lib3270_get_text(H3270 *h, int offset, int len) |
462 | 466 | CHECK_SESSION_HANDLE(h); |
463 | 467 | |
464 | 468 | if(!lib3270_connected(h)) |
469 | + { | |
470 | + errno = ENOTCONN; | |
465 | 471 | return NULL; |
472 | + } | |
466 | 473 | |
467 | 474 | maxlen = (h->rows * (h->cols+1)) - offset; |
468 | 475 | if(maxlen <= 0 || offset < 0) |
... | ... | @@ -505,10 +512,6 @@ LIB3270_EXPORT char * lib3270_get_text(H3270 *h, int offset, int len) |
505 | 512 | LIB3270_EXPORT char * lib3270_get_text_at(H3270 *h, int row, int col, int len) |
506 | 513 | { |
507 | 514 | CHECK_SESSION_HANDLE(h); |
508 | - | |
509 | - if(!lib3270_connected(h)) | |
510 | - return NULL; | |
511 | - | |
512 | 515 | return lib3270_get_text(h, ((row-1) * h->cols) + (col-1), len); |
513 | 516 | } |
514 | 517 | ... | ... |
src/plugins/dbus3270/Makefile.in
... | ... | @@ -26,9 +26,18 @@ |
26 | 26 | # kraucer@bb.com.br (Kraucer Fernandes Mazuco) |
27 | 27 | # |
28 | 28 | |
29 | +PACKAGE_NAME=@PACKAGE_NAME@ | |
30 | +MODULE_NAME=dbus3270 | |
31 | + | |
32 | +prefix=@prefix@ | |
33 | +exec_prefix=@exec_prefix@ | |
34 | +bindir=@bindir@ | |
35 | +libdir=@libdir@ | |
36 | +datarootdir=@datarootdir@ | |
37 | +localedir=@localedir@ | |
38 | + | |
29 | 39 | #---[ Sources ]---------------------------------------------------------------- |
30 | 40 | |
31 | -MODULE_NAME=dbus3270 | |
32 | 41 | DEPENDS=Makefile dbus-glue.h |
33 | 42 | PLUGIN_SRC=main.c gobject.c misc.c |
34 | 43 | DAEMON_SRC=daemon.c gobject.c iocallback.c misc.c |
... | ... | @@ -51,6 +60,9 @@ MKDIR=@MKDIR_P@ |
51 | 60 | CC=@CC@ |
52 | 61 | LD=@CC@ |
53 | 62 | DBUSBINDINGTOOL=@DBUSBINDINGTOOL@ |
63 | +INSTALL=@INSTALL@ | |
64 | +INSTALL_PROGRAM=@INSTALL_PROGRAM@ | |
65 | +INSTALL_DATA=@INSTALL_DATA@ | |
54 | 66 | |
55 | 67 | #---[ Flags ]------------------------------------------------------------------ |
56 | 68 | |
... | ... | @@ -69,27 +81,26 @@ GLIB_LIBS=@GLIB_LIBS@ |
69 | 81 | GTK_LIBS=@GTK_LIBS@ |
70 | 82 | |
71 | 83 | ifeq ($(LIB3270_MODE),Debug) |
72 | - PW3270_LIBS=-L$(BINDBG)@DLLDIR@ -lpw3270 | |
73 | - PW3270_CFLAGS=-I../../../src/include | |
74 | - LIB3270_LIBS=-L$(BINDBG)@DLLDIR@ -l3270 | |
84 | + PW3270_LIBS="-L../../../.bin/Debug@DLLDIR@ -lpw3270" | |
85 | + PW3270_CFLAGS="-I../../../src/include" | |
86 | + LIB3270_LIBS="-L../../../.bin/Debug@DLLDIR@ -l3270" | |
75 | 87 | LIB270_CFLAGS=-I../../../src/include |
76 | 88 | endif |
77 | 89 | |
78 | 90 | ifeq ($(LIB3270_MODE),Release) |
79 | - PW3270_LIBS=-L$(BINRLS)@DLLDIR@ -lṕw3270 | |
80 | - PW3270_CFLAGS=-I../../../src/include | |
81 | - LIB3270_LIBS=-L$(BINRLS)@DLLDIR@ -l3270 | |
91 | + PW3270_LIBS="-L../../../.bin/Release@DLLDIR@ -lpw3270" | |
92 | + PW3270_CFLAGS="-I../../../src/include" | |
93 | + LIB3270_LIBS="-L../../../.bin/Release@DLLDIR@ -l3270" | |
82 | 94 | LIB270_CFLAGS=-I../../../src/include |
83 | 95 | endif |
84 | 96 | |
85 | 97 | ifeq ($(LIB3270_MODE),Default) |
86 | 98 | LIB3270_LIBS ?= `pkg-config --libs lib3270` |
87 | 99 | LIB3270_CFLAGS ?= `pkg-config --cflags lib3270` |
88 | - PW3270_LIBS ?= `pkg-config --libs pw3270` | |
89 | - PW3270_CFLAGS ?= `pkg-config --cflags pw3270` | |
100 | + PW3270_LIBS ?= `pkg-config --libs pw3270 lib3270` | |
101 | + PW3270_CFLAGS ?= `pkg-config --cflags pw3270 lib3270` | |
90 | 102 | endif |
91 | 103 | |
92 | - | |
93 | 104 | #---[ Rules ]------------------------------------------------------------------ |
94 | 105 | |
95 | 106 | $(OBJDBG)/%.o: %.c $(DEPENDS) |
... | ... | @@ -110,7 +121,7 @@ Release: $(BINRLS)/plugins/$(MODULE_NAME).so |
110 | 121 | $(BINRLS)/plugins/$(MODULE_NAME).so: $(foreach SRC, $(basename $(PLUGIN_SRC)), $(OBJRLS)/$(SRC).o) |
111 | 122 | @echo " CCLD `basename $@`" |
112 | 123 | @$(MKDIR) `dirname $@` |
113 | - @$(LD) $(DLL_FLAGS) -Wl,-soname,`basename $@` $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) $(PW3270_LIBS) $(GLIB_LIBS) $(GTK_LIBS) $(DBUS_LIBS) | |
124 | + $(LD) $(DLL_FLAGS) -Wl,-soname,`basename $@` $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) $(PW3270_LIBS) $(GLIB_LIBS) $(GTK_LIBS) $(DBUS_LIBS) | |
114 | 125 | |
115 | 126 | #---[ Debug targets ]---------------------------------------------------------- |
116 | 127 | |
... | ... | @@ -123,6 +134,10 @@ $(BINDBG)/plugins/$(MODULE_NAME).so: $(foreach SRC, $(basename $(PLUGIN_SRC)), $ |
123 | 134 | |
124 | 135 | #---[ Misc targets ]----------------------------------------------------------- |
125 | 136 | |
137 | +install: $(BINRLS)/plugins/$(MODULE_NAME).so | |
138 | + @$(MKDIR) $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/plugins | |
139 | + @$(INSTALL_PROGRAM) $(BINRLS)/plugins/$(MODULE_NAME).so $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME)/plugins | |
140 | + | |
126 | 141 | debug-service: $(BINDBG)/@PACKAGE_NAME@d |
127 | 142 | |
128 | 143 | dbus-glue.h: pw3270dbus.xml | ... | ... |
src/plugins/dbus3270/gobject.c
... | ... | @@ -214,3 +214,34 @@ void pw3270_dbus_set_text_at(PW3270Dbus *object, int row, int col, const gchar * |
214 | 214 | |
215 | 215 | g_free(text); |
216 | 216 | } |
217 | + | |
218 | +void pw3270_dbus_get_text_at(PW3270Dbus *object, int row, int col, int len, DBusGMethodInvocation *context) | |
219 | +{ | |
220 | + gchar * text; | |
221 | + H3270 * hSession = pw3270_dbus_get_session_handle(object); | |
222 | + | |
223 | + trace("%s object=%p context=%p",__FUNCTION__,object,context); | |
224 | + if(pw3270_dbus_check_valid_state(object,context)) | |
225 | + return; | |
226 | + | |
227 | + text = lib3270_get_text_at(hSession, row, col, len); | |
228 | + if(!text) | |
229 | + { | |
230 | + GError *error = pw3270_dbus_get_error_from_errno(errno); | |
231 | + dbus_g_method_return_error(context,error); | |
232 | + g_error_free(error); | |
233 | + } | |
234 | + else | |
235 | + { | |
236 | + gchar * utftext = g_convert_with_fallback(text,-1,"UTF-8",lib3270_get_charset(hSession),"?",NULL,NULL,NULL); | |
237 | + | |
238 | + lib3270_free(text); | |
239 | + | |
240 | + dbus_g_method_return(context,utftext); | |
241 | + | |
242 | + g_free(utftext); | |
243 | + } | |
244 | + | |
245 | + | |
246 | +} | |
247 | + | ... | ... |
src/plugins/dbus3270/pw3270dbus.xml
... | ... | @@ -36,5 +36,11 @@ |
36 | 36 | <arg type="i" name="col" direction="in" /> |
37 | 37 | <arg type="s" name="text" direction="in" /> |
38 | 38 | </method> |
39 | + <method name="getTextAt"> | |
40 | + <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> | |
41 | + <arg type="i" name="row" direction="in" /> | |
42 | + <arg type="i" name="col" direction="in" /> | |
43 | + <arg type="i" name="len" direction="in" /> | |
44 | + </method> | |
39 | 45 | </interface> |
40 | 46 | </node> | ... | ... |
src/plugins/dbus3270/service.h
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | // Actions |
76 | 76 | void pw3270_dbus_enter(PW3270Dbus *object, DBusGMethodInvocation *context); |
77 | 77 | void pw3270_dbus_set_text_at(PW3270Dbus *object, int row, int col, const gchar *text, DBusGMethodInvocation *context); |
78 | - | |
78 | + void pw3270_dbus_get_text_at(PW3270Dbus *object, int row, int col, int len, DBusGMethodInvocation *context); | |
79 | 79 | |
80 | 80 | G_END_DECLS |
81 | 81 | ... | ... |
src/plugins/rx3270/Makefile.in
... | ... | @@ -60,10 +60,11 @@ $(BINDBG)$(DLL_NAME).$(VERSION): $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJ |
60 | 60 | $(BINRLS)/$(PLUGIN_NAME): $(foreach SRC, $(basename $(PLUGIN_SRC)), $(OBJRLS)/$(SRC).o) $(BINRLS)$(DLL_NAME) |
61 | 61 | @echo " CCLD `basename $@`" |
62 | 62 | @$(MKDIR) `dirname $@` |
63 | - @$(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) -o $@ $^ $(LIBS) $(PW3270_LIBS) $(GTK_LIBS) | |
63 | + $(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) -o $@ $^ $(LIBS) $(PW3270_LIBS) $(GTK_LIBS) | |
64 | 64 | |
65 | 65 | $(BINRLS)$(DLL_NAME).$(VERSION): $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJRLS)/$(SRC).o) |
66 | 66 | @echo " CCLD `basename $@`" |
67 | 67 | @$(MKDIR) `dirname $@` |
68 | - @$(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) | |
68 | + $(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) | |
69 | 69 | |
70 | +install: | ... | ... |
src/pw3270/uiparser/keypad.c
src/pw3270/uiparser/parsefile.c