Commit cb1d845a01affcffe1e25f84cad2e5201c3f0b43

Authored by Perry Werneck
2 parents 48011f4e 712d9e8c
Exists in develop

Merge branch 'develop' into winpkg

Better icon search.
@@ -29,6 +29,7 @@ datarootdir=@datarootdir@ @@ -29,6 +29,7 @@ datarootdir=@datarootdir@
29 localedir=@localedir@ 29 localedir=@localedir@
30 docdir=@docdir@ 30 docdir=@docdir@
31 sysconfdir=@sysconfdir@ 31 sysconfdir=@sysconfdir@
  32 +datadir=$(datarootdir)/@PRODUCT_NAME@
32 33
33 #---[ Configuration ]-------------------------------------------------------------------- 34 #---[ Configuration ]--------------------------------------------------------------------
34 35
@@ -55,8 +56,8 @@ SOURCES= \ @@ -55,8 +56,8 @@ SOURCES= \
55 $(wildcard $(srcdir)/src/main/@OSNAME@/*.rc) 56 $(wildcard $(srcdir)/src/main/@OSNAME@/*.rc)
56 57
57 SCHEMAS= \ 58 SCHEMAS= \
58 - $(wildcard schemas/@OSNAME@/*.gschema.xml) \  
59 - $(wildcard schemas/common/*.gschema.xml) 59 + $(wildcard schemas/*.gschema.xml) \
  60 + $(wildcard schemas/*.gschema.xml)
60 61
61 #---[ Tools ]---------------------------------------------------------------------------- 62 #---[ Tools ]----------------------------------------------------------------------------
62 63
@@ -96,6 +97,7 @@ CFLAGS= \ @@ -96,6 +97,7 @@ CFLAGS= \
96 -Isrc/include \ 97 -Isrc/include \
97 -I$(srcdir)/src/include \ 98 -I$(srcdir)/src/include \
98 -DBUILD_DATE=`date +%Y%m%d` \ 99 -DBUILD_DATE=`date +%Y%m%d` \
  100 + -DDATADIR=$(datadir) \
99 @LIBV3270_CFLAGS@ \ 101 @LIBV3270_CFLAGS@ \
100 @GTK_CFLAGS@ 102 @GTK_CFLAGS@
101 103
@@ -204,7 +206,7 @@ $(POTDIR)/%.pot: \ @@ -204,7 +206,7 @@ $(POTDIR)/%.pot: \
204 @touch $@ 206 @touch $@
205 207
206 $(OBJDIR)/schemas/%.xml: \ 208 $(OBJDIR)/schemas/%.xml: \
207 - schemas/@OSNAME@/%.xml 209 + schemas/%.xml
208 210
209 @$(MKDIR) $(@D) 211 @$(MKDIR) $(@D)
210 @cp "$^" "$@" 212 @cp "$^" "$@"
@@ -75,8 +75,6 @@ case "$host" in @@ -75,8 +75,6 @@ case "$host" in
75 AC_CONFIG_FILES(src/main/windows/app-manifest.xml) 75 AC_CONFIG_FILES(src/main/windows/app-manifest.xml)
76 76
77 # Windows and linux doesn't use the same defaults. 77 # Windows and linux doesn't use the same defaults.
78 - AC_CONFIG_FILES(schemas/windows/application.gschema.xml)  
79 - AC_CONFIG_FILES(schemas/windows/window.gschema.xml)  
80 AC_CONFIG_FILES(win/makeruntime.sh) 78 AC_CONFIG_FILES(win/makeruntime.sh)
81 AC_CONFIG_FILES(win/pw3270.nsi) 79 AC_CONFIG_FILES(win/pw3270.nsi)
82 80
@@ -93,7 +91,7 @@ case "$host" in @@ -93,7 +91,7 @@ case "$host" in
93 AC_SUBST(PROGRAMFILES,$app_cv_programfiles) 91 AC_SUBST(PROGRAMFILES,$app_cv_programfiles)
94 AC_SUBST(WINARCH,$app_cv_winarch) 92 AC_SUBST(WINARCH,$app_cv_winarch)
95 AC_SUBST(NSISREDIR,$app_cv_nsisredir) 93 AC_SUBST(NSISREDIR,$app_cv_nsisredir)
96 - 94 + AC_SUBST(DEFAULT_UI_STYLE,0)
97 ;; 95 ;;
98 96
99 *-apple-darwin*) 97 *-apple-darwin*)
@@ -102,9 +100,7 @@ case "$host" in @@ -102,9 +100,7 @@ case "$host" in
102 100
103 CFLAGS="$CFLAGS -pthread" 101 CFLAGS="$CFLAGS -pthread"
104 LDFLAGS="$LDFLAGS -pthread" 102 LDFLAGS="$LDFLAGS -pthread"
105 -  
106 - AC_CONFIG_FILES(schemas/macos/application.gschema.xml)  
107 - AC_CONFIG_FILES(schemas/macos/window.gschema.xml) 103 + AC_SUBST(DEFAULT_UI_STYLE,0)
108 ;; 104 ;;
109 105
110 *) 106 *)
@@ -113,9 +109,7 @@ case "$host" in @@ -113,9 +109,7 @@ case "$host" in
113 109
114 CFLAGS="$CFLAGS -pthread -DLIBDIR=\$(libdir)" 110 CFLAGS="$CFLAGS -pthread -DLIBDIR=\$(libdir)"
115 LDFLAGS="$LDFLAGS -pthread" 111 LDFLAGS="$LDFLAGS -pthread"
116 -  
117 - AC_CONFIG_FILES(schemas/linux/application.gschema.xml)  
118 - AC_CONFIG_FILES(schemas/linux/window.gschema.xml) 112 + AC_SUBST(DEFAULT_UI_STYLE,0)
119 113
120 esac 114 esac
121 115
@@ -201,8 +195,15 @@ AC_ARG_WITH([product-name], [AS_HELP_STRING([--with-product-name], [Set product @@ -201,8 +195,15 @@ AC_ARG_WITH([product-name], [AS_HELP_STRING([--with-product-name], [Set product
201 AC_DEFINE_UNQUOTED(PRODUCT_NAME, $app_cv_product,[The product name]) 195 AC_DEFINE_UNQUOTED(PRODUCT_NAME, $app_cv_product,[The product name])
202 AC_SUBST(PRODUCT_NAME,$app_cv_product) 196 AC_SUBST(PRODUCT_NAME,$app_cv_product)
203 197
204 -AC_ARG_WITH([application-id], [AS_HELP_STRING([--application-id], [Set the application ID])], [ app_cv_application_id="$withval" ],[ app_cv_application_id=`pkg-config --variable=product_id lib3270`.terminal ]) 198 +AC_ARG_WITH([product-id], [AS_HELP_STRING([--product-id], [Set the product ID])], [ app_cv_product_id="$withval" ],[ app_cv_product_id=`$PKG_CONFIG --variable=product_id lib3270` ])
  199 +AC_DEFINE_UNQUOTED(PRODUCT_ID, $app_cv_product_id,[The product ID])
  200 +AC_SUBST(PRODUCT_ID,$app_cv_product_id)
205 201
  202 +app_cv_object_path="/"`echo $app_cv_product_id | sed -e "s@\.@/@g"`"/"
  203 +AC_DEFINE_UNQUOTED(PRODUCT_PATH, "$app_cv_object_path",[The schema path])
  204 +AC_SUBST(PRODUCT_PATH,$app_cv_object_path)
  205 +
  206 +AC_ARG_WITH([application-id], [AS_HELP_STRING([--application-id], [Set the application ID])], [ app_cv_application_id="$withval" ],[ app_cv_application_id=$app_cv_product_id.terminal ])
206 AC_DEFINE_UNQUOTED(APPLICATION_ID, $app_cv_application_id,[The application ID]) 207 AC_DEFINE_UNQUOTED(APPLICATION_ID, $app_cv_application_id,[The application ID])
207 AC_SUBST(APPLICATION_ID,$app_cv_application_id) 208 AC_SUBST(APPLICATION_ID,$app_cv_application_id)
208 209
@@ -293,7 +294,11 @@ dnl Configure which files to generate. @@ -293,7 +294,11 @@ dnl Configure which files to generate.
293 dnl --------------------------------------------------------------------------- 294 dnl ---------------------------------------------------------------------------
294 295
295 AC_CONFIG_FILES(Makefile) 296 AC_CONFIG_FILES(Makefile)
  297 +
  298 +AC_CONFIG_FILES(schemas/application.gschema.xml)
  299 +AC_CONFIG_FILES(schemas/window.gschema.xml)
296 AC_CONFIG_FILES(schemas/Makefile) 300 AC_CONFIG_FILES(schemas/Makefile)
  301 +
297 AC_CONFIG_FILES(locale/Makefile) 302 AC_CONFIG_FILES(locale/Makefile)
298 303
299 AC_CONFIG_FILES(branding/Makefile) 304 AC_CONFIG_FILES(branding/Makefile)
@@ -58,6 +58,9 @@ @@ -58,6 +58,9 @@
58 <Unit filename="src/main/builder.c"> 58 <Unit filename="src/main/builder.c">
59 <Option compilerVar="CC" /> 59 <Option compilerVar="CC" />
60 </Unit> 60 </Unit>
  61 + <Unit filename="src/main/linux/tools.c">
  62 + <Option compilerVar="CC" />
  63 + </Unit>
61 <Unit filename="src/main/main.c"> 64 <Unit filename="src/main/main.c">
62 <Option compilerVar="CC" /> 65 <Option compilerVar="CC" />
63 </Unit> 66 </Unit>
@@ -69,6 +72,9 @@ @@ -69,6 +72,9 @@
69 <Option compilerVar="CC" /> 72 <Option compilerVar="CC" />
70 </Unit> 73 </Unit>
71 <Unit filename="src/main/windows/resources.rc" /> 74 <Unit filename="src/main/windows/resources.rc" />
  75 + <Unit filename="src/main/windows/tools.c">
  76 + <Option compilerVar="CC" />
  77 + </Unit>
72 <Unit filename="src/objects/actions/abstract.c"> 78 <Unit filename="src/objects/actions/abstract.c">
73 <Option compilerVar="CC" /> 79 <Option compilerVar="CC" />
74 </Unit> 80 </Unit>
schemas/Makefile.in
@@ -50,18 +50,18 @@ all: @@ -50,18 +50,18 @@ all:
50 @$(MKDIR) $(BINDIR) 50 @$(MKDIR) $(BINDIR)
51 @$(GLIB_SCHEMA_COMPILER) \ 51 @$(GLIB_SCHEMA_COMPILER) \
52 --targetdir=$(BINDIR) \ 52 --targetdir=$(BINDIR) \
53 - ./@OSNAME@ 53 + .
54 54
55 install: \ 55 install: \
56 all 56 all
57 57
58 @$(MKDIR) $(DESTDIR)$(schemadir) 58 @$(MKDIR) $(DESTDIR)$(schemadir)
59 @$(INSTALL_DATA) \ 59 @$(INSTALL_DATA) \
60 - @OSNAME@/application.gschema.xml \ 60 + application.gschema.xml \
61 $(DESTDIR)$(schemadir)/$(PRODUCT_NAME)-application.gschema.xml 61 $(DESTDIR)$(schemadir)/$(PRODUCT_NAME)-application.gschema.xml
62 62
63 @$(INSTALL_DATA) \ 63 @$(INSTALL_DATA) \
64 - @OSNAME@/window.gschema.xml \ 64 + window.gschema.xml \
65 $(DESTDIR)$(schemadir)/$(PRODUCT_NAME)-window.gschema.xml 65 $(DESTDIR)$(schemadir)/$(PRODUCT_NAME)-window.gschema.xml
66 66
67 @$(GLIB_SCHEMA_COMPILER) \ 67 @$(GLIB_SCHEMA_COMPILER) \
schemas/application.gschema.xml.in 0 → 100644
@@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!--
  3 +
  4 + SPDX-License-Identifier: LGPL-3.0-or-later
  5 +
  6 + Copyright (C) 2008 Banco do Brasil S.A.
  7 +
  8 + This program is free software: you can redistribute it and/or modify
  9 + it under the terms of the GNU Lesser General Public License as published
  10 + by the Free Software Foundation, either version 3 of the License, or
  11 + (at your option) any later version.
  12 +
  13 + This program is distributed in the hope that it will be useful,
  14 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16 + GNU General Public License for more details.
  17 +
  18 + You should have received a copy of the GNU Lesser General Public License
  19 + along with this program. If not, see <https://www.gnu.org/licenses/>.
  20 +
  21 +-->
  22 +
  23 +<schemalist>
  24 +
  25 + <schema path="@PRODUCT_PATH@" id="@PRODUCT_ID@">
  26 +
  27 + <key name="ui-style" type="u">
  28 + <default>@DEFAULT_UI_STYLE@</default>
  29 + <summary>UI Style</summary>
  30 + <description>The ID of the current user interface style</description>
  31 + </key>
  32 +
  33 + <key name="gtk-csd" type="i">
  34 + <default>0</default>
  35 + <summary>GTK CSD</summary>
  36 + <description>Gtk Client side decorations (win32 only)</description>
  37 + </key>
  38 +
  39 + <key name="allow-host-settings" type="b">
  40 + <default>true</default>
  41 + <summary>Allow host settings</summary>
  42 + <description>Allow changing of host session properties</description>
  43 + </key>
  44 +
  45 + <key name="allow-open-session-actions" type="b">
  46 + <default>true</default>
  47 + <summary>Enable open session actions actions</summary>
  48 + <description>Enable open session actions</description>
  49 + </key>
  50 +
  51 + <key name="allow-new-tab-actions" type="b">
  52 + <default>true</default>
  53 + <summary>Enable new tab actions</summary>
  54 + <description>Enable new tab actions</description>
  55 + </key>
  56 +
  57 + <key name="allow-new-window-actions" type="b">
  58 + <default>true</default>
  59 + <summary>Enable new window actions</summary>
  60 + <description>Enable new window actions</description>
  61 + </key>
  62 +
  63 + <key name="default-session-file" type="s">
  64 + <default>'~/.config/default.3270'</default>
  65 + <summary>Path of the default session file</summary>
  66 + <description></description>
  67 + </key>
  68 +
  69 + <key name="update-default-session-file" type="b">
  70 + <default>false</default>
  71 + <summary>Update default session time from command line</summary>
  72 + <description></description>
  73 + </key>
  74 +
  75 + <key name="add-session-to-recent-manager" type="b">
  76 + <default>true</default>
  77 + <summary>Add session file to recent file list</summary>
  78 + <description></description>
  79 + </key>
  80 +
  81 + </schema>
  82 +
  83 +</schemalist>
  84 +
schemas/linux/application.gschema.xml.in
@@ -1,87 +0,0 @@ @@ -1,87 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<!--  
3 -  
4 - Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
5 - (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
6 - aplicativos mainframe. Registro no INPI sob o nome G3270.  
7 -  
8 - Copyright (C) <2008> <Banco do Brasil S.A.>  
9 -  
10 - Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
11 - os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
12 - Free Software Foundation.  
13 -  
14 - Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
15 - GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
16 - A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
17 - obter mais detalhes.  
18 -  
19 - Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
20 - programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin  
21 - St, Fifth Floor, Boston, MA 02110-1301 USA  
22 -  
23 -  
24 - Contatos:  
25 -  
26 - perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
27 - erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
28 -  
29 --->  
30 -  
31 -<schemalist>  
32 -  
33 - <schema path="/br/app/@PRODUCT_NAME@/" id="br.app.@PRODUCT_NAME@">  
34 -  
35 - <key name="ui-style" type="u">  
36 - <default>2</default>  
37 - <summary>UI Style</summary>  
38 - <description>The ID of the current user interface style</description>  
39 - </key>  
40 -  
41 -  
42 - <key name="allow-host-settings" type="b">  
43 - <default>true</default>  
44 - <summary>Allow host settings</summary>  
45 - <description>Allow changing of host session properties</description>  
46 - </key>  
47 -  
48 - <key name="allow-open-session-actions" type="b">  
49 - <default>true</default>  
50 - <summary>Enable open session actions actions</summary>  
51 - <description>Enable open session actions</description>  
52 - </key>  
53 -  
54 - <key name="allow-new-tab-actions" type="b">  
55 - <default>true</default>  
56 - <summary>Enable new tab actions</summary>  
57 - <description>Enable new tab actions</description>  
58 - </key>  
59 -  
60 - <key name="allow-new-window-actions" type="b">  
61 - <default>true</default>  
62 - <summary>Enable new window actions</summary>  
63 - <description>Enable new window actions</description>  
64 - </key>  
65 -  
66 - <key name="default-session-file" type="s">  
67 - <default>'~/.config/default.3270'</default>  
68 - <summary>Path of the default session file</summary>  
69 - <description></description>  
70 - </key>  
71 -  
72 - <key name="update-default-session-file" type="b">  
73 - <default>false</default>  
74 - <summary>Update default session time from command line</summary>  
75 - <description></description>  
76 - </key>  
77 -  
78 - <key name="add-session-to-recent-manager" type="b">  
79 - <default>true</default>  
80 - <summary>Add session file to recent file list</summary>  
81 - <description></description>  
82 - </key>  
83 -  
84 - </schema>  
85 -  
86 -</schemalist>  
87 -  
schemas/linux/window.gschema.xml.in
@@ -1,127 +0,0 @@ @@ -1,127 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<!--  
3 -  
4 - Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
5 - (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
6 - aplicativos mainframe. Registro no INPI sob o nome G3270.  
7 -  
8 - Copyright (C) <2008> <Banco do Brasil S.A.>  
9 -  
10 - Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
11 - os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
12 - Free Software Foundation.  
13 -  
14 - Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
15 - GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
16 - A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
17 - obter mais detalhes.  
18 -  
19 - Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
20 - programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin  
21 - St, Fifth Floor, Boston, MA 02110-1301 USA  
22 -  
23 -  
24 - Contatos:  
25 -  
26 - perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
27 - erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
28 -  
29 --->  
30 -  
31 -<schemalist>  
32 -  
33 - <schema path="/br/app/@PRODUCT_NAME@/window/" id="br.app.@PRODUCT_NAME@.window">  
34 -  
35 - <key name="width" type="i">  
36 - <default>-1</default>  
37 - <summary>The window width.</summary>  
38 - <description></description>  
39 - </key>  
40 -  
41 - <key name="height" type="i">  
42 - <default>-1</default>  
43 - <summary>The window height.</summary>  
44 - <description></description>  
45 - </key>  
46 -  
47 - <key name="is-maximized" type="b">  
48 - <default>false</default>  
49 - <summary>Is the window maximized?</summary>  
50 - <description></description>  
51 - </key>  
52 -  
53 - <key name="is-fullscreen" type="b">  
54 - <default>false</default>  
55 - <summary>Is the window in full screen mode?</summary>  
56 - <description></description>  
57 - </key>  
58 -  
59 - <key name="has-subtitle" type="b">  
60 - <default>false</default>  
61 - <summary>Enable top window subtitle</summary>  
62 - <description>If TRUE, reserve space for a subtitle, even if none is currently set.</description>  
63 - </key>  
64 -  
65 - <key name="toolbar-visible" type="b">  
66 - <default>false</default>  
67 - <summary>The toolbar visible state</summary>  
68 - <description></description>  
69 - </key>  
70 -  
71 - <key name="menubar-visible" type="b">  
72 - <default>false</default>  
73 - <summary>The menubar visible state</summary>  
74 - <description></description>  
75 - </key>  
76 -  
77 - <key name="toolbar-style" type="i">  
78 - <default>-1</default>  
79 - <summary>How to draw the toolbar.</summary>  
80 - <description></description>  
81 - </key>  
82 -  
83 - <key name="toolbar-icon-size" type="i">  
84 - <default>0</default>  
85 - <summary>The size of the toolbar icons</summary>  
86 - <description></description>  
87 - </key>  
88 -  
89 - <key name="toolbar-icon-type" type="i">  
90 - <default>0</default>  
91 - <summary>Use symbolic icons on toolbar</summary>  
92 - <description></description>  
93 - </key>  
94 -  
95 - <key name="header-icon-type" type="i">  
96 - <default>0</default>  
97 - <summary>Use symbolic icons on title bar</summary>  
98 - <description></description>  
99 - </key>  
100 -  
101 - <key name="toolbar-position" type="i">  
102 - <default>0</default>  
103 - <summary>The toolbar position</summary>  
104 - <description></description>  
105 - </key>  
106 -  
107 - <key name="toolbar-action-names" type="s">  
108 - <default>'win.copy,win.paste,win.select-all,separator,win.clear,win.erase-input,separator,win.print,separator,win.zoom-out,win.zoom-fit-best,win.zoom-in'</default>  
109 - <summary>The toolbar action list</summary>  
110 - <description></description>  
111 - </key>  
112 -  
113 - <key name="header-action-names" type="s">  
114 - <default>'menu.open-menu,win.disconnect,win.reconnect:'</default>  
115 - <summary>The title bar action list</summary>  
116 - <description></description>  
117 - </key>  
118 -  
119 - <key name="default-session-file" type="s">  
120 - <default>''</default>  
121 - <summary>Path of the default session file</summary>  
122 - <description></description>  
123 - </key>  
124 -  
125 - </schema>  
126 -  
127 -</schemalist>  
schemas/macos/application.gschema.xml.in
@@ -1,87 +0,0 @@ @@ -1,87 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<!--  
3 -  
4 - Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
5 - (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
6 - aplicativos mainframe. Registro no INPI sob o nome G3270.  
7 -  
8 - Copyright (C) <2008> <Banco do Brasil S.A.>  
9 -  
10 - Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
11 - os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
12 - Free Software Foundation.  
13 -  
14 - Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
15 - GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
16 - A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
17 - obter mais detalhes.  
18 -  
19 - Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
20 - programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin  
21 - St, Fifth Floor, Boston, MA 02110-1301 USA  
22 -  
23 -  
24 - Contatos:  
25 -  
26 - perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
27 - erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
28 -  
29 --->  
30 -  
31 -<schemalist>  
32 -  
33 - <schema path="/br/app/@PRODUCT_NAME@/" id="br.app.@PRODUCT_NAME@">  
34 -  
35 - <key name="ui-style" type="u">  
36 - <default>2</default>  
37 - <summary>UI Style</summary>  
38 - <description>The ID of the current user interface style</description>  
39 - </key>  
40 -  
41 -  
42 - <key name="allow-host-settings" type="b">  
43 - <default>true</default>  
44 - <summary>Allow host settings</summary>  
45 - <description>Allow changing of host session properties</description>  
46 - </key>  
47 -  
48 - <key name="allow-open-session-actions" type="b">  
49 - <default>true</default>  
50 - <summary>Enable open session actions actions</summary>  
51 - <description>Enable open session actions</description>  
52 - </key>  
53 -  
54 - <key name="allow-new-tab-actions" type="b">  
55 - <default>true</default>  
56 - <summary>Enable new tab actions</summary>  
57 - <description>Enable new tab actions</description>  
58 - </key>  
59 -  
60 - <key name="allow-new-window-actions" type="b">  
61 - <default>true</default>  
62 - <summary>Enable new window actions</summary>  
63 - <description>Enable new window actions</description>  
64 - </key>  
65 -  
66 - <key name="default-session-file" type="s">  
67 - <default>'~/.config/default.3270'</default>  
68 - <summary>Path of the default session file</summary>  
69 - <description></description>  
70 - </key>  
71 -  
72 - <key name="update-default-session-file" type="b">  
73 - <default>false</default>  
74 - <summary>Update default session time from command line</summary>  
75 - <description></description>  
76 - </key>  
77 -  
78 - <key name="add-session-to-recent-manager" type="b">  
79 - <default>true</default>  
80 - <summary>Add session file to recent file list</summary>  
81 - <description></description>  
82 - </key>  
83 -  
84 - </schema>  
85 -  
86 -</schemalist>  
87 -  
schemas/macos/window.gschema.xml.in
@@ -1,121 +0,0 @@ @@ -1,121 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<!--  
3 -  
4 - Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
5 - (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
6 - aplicativos mainframe. Registro no INPI sob o nome G3270.  
7 -  
8 - Copyright (C) <2008> <Banco do Brasil S.A.>  
9 -  
10 - Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
11 - os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
12 - Free Software Foundation.  
13 -  
14 - Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
15 - GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
16 - A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
17 - obter mais detalhes.  
18 -  
19 - Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
20 - programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin  
21 - St, Fifth Floor, Boston, MA 02110-1301 USA  
22 -  
23 -  
24 - Contatos:  
25 -  
26 - perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
27 - erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
28 -  
29 --->  
30 -  
31 -<schemalist>  
32 -  
33 - <schema path="/br/app/@PRODUCT_NAME@/window/" id="br.app.@PRODUCT_NAME@.window">  
34 -  
35 - <key name="width" type="i">  
36 - <default>-1</default>  
37 - <summary>The window width.</summary>  
38 - <description></description>  
39 - </key>  
40 -  
41 - <key name="height" type="i">  
42 - <default>-1</default>  
43 - <summary>The window height.</summary>  
44 - <description></description>  
45 - </key>  
46 -  
47 - <key name="is-maximized" type="b">  
48 - <default>false</default>  
49 - <summary>Is the window maximized?</summary>  
50 - <description></description>  
51 - </key>  
52 -  
53 - <key name="is-fullscreen" type="b">  
54 - <default>false</default>  
55 - <summary>Is the window in full screen mode?</summary>  
56 - <description></description>  
57 - </key>  
58 -  
59 - <key name="has-subtitle" type="b">  
60 - <default>false</default>  
61 - <summary>Enable top window subtitle</summary>  
62 - <description>If TRUE, reserve space for a subtitle, even if none is currently set.</description>  
63 - </key>  
64 -  
65 - <key name="toolbar-visible" type="b">  
66 - <default>false</default>  
67 - <summary>The toolbar visible state</summary>  
68 - <description></description>  
69 - </key>  
70 -  
71 - <key name="toolbar-style" type="i">  
72 - <default>-1</default>  
73 - <summary>How to draw the toolbar.</summary>  
74 - <description></description>  
75 - </key>  
76 -  
77 - <key name="toolbar-icon-size" type="i">  
78 - <default>0</default>  
79 - <summary>The size of the toolbar icons</summary>  
80 - <description></description>  
81 - </key>  
82 -  
83 - <key name="toolbar-icon-type" type="i">  
84 - <default>0</default>  
85 - <summary>Use symbolic icons on toolbar</summary>  
86 - <description></description>  
87 - </key>  
88 -  
89 - <key name="header-icon-type" type="i">  
90 - <default>0</default>  
91 - <summary>Use symbolic icons on title bar</summary>  
92 - <description></description>  
93 - </key>  
94 -  
95 - <key name="toolbar-position" type="i">  
96 - <default>0</default>  
97 - <summary>The toolbar position</summary>  
98 - <description></description>  
99 - </key>  
100 -  
101 - <key name="toolbar-action-names" type="s">  
102 - <default>'win.copy,win.paste,win.select-all,separator,win.clear,win.erase-input,separator,win.print,separator,win.zoom-out,win.zoom-fit-best,win.zoom-in'</default>  
103 - <summary>The toolbar action list</summary>  
104 - <description></description>  
105 - </key>  
106 -  
107 - <key name="header-action-names" type="s">  
108 - <default>'app.tab.new:menu.open-menu,win.disconnect,win.reconnect'</default>  
109 - <summary>The title bar action list</summary>  
110 - <description></description>  
111 - </key>  
112 -  
113 - <key name="default-session-file" type="s">  
114 - <default>''</default>  
115 - <summary>Path of the default session file</summary>  
116 - <description></description>  
117 - </key>  
118 -  
119 - </schema>  
120 -  
121 -</schemalist>  
schemas/window.gschema.xml.in 0 → 100644
@@ -0,0 +1,119 @@ @@ -0,0 +1,119 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!--
  3 +
  4 + SPDX-License-Identifier: LGPL-3.0-or-later
  5 +
  6 + Copyright (C) 2008 Banco do Brasil S.A.
  7 +
  8 + This program is free software: you can redistribute it and/or modify
  9 + it under the terms of the GNU Lesser General Public License as published
  10 + by the Free Software Foundation, either version 3 of the License, or
  11 + (at your option) any later version.
  12 +
  13 + This program is distributed in the hope that it will be useful,
  14 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16 + GNU General Public License for more details.
  17 +
  18 + You should have received a copy of the GNU Lesser General Public License
  19 + along with this program. If not, see <https://www.gnu.org/licenses/>.
  20 +
  21 +-->
  22 +
  23 +<schemalist>
  24 +
  25 + <schema path="@PRODUCT_PATH@window/" id="@PRODUCT_ID@.window">
  26 +
  27 + <key name="width" type="i">
  28 + <default>-1</default>
  29 + <summary>The window width.</summary>
  30 + <description></description>
  31 + </key>
  32 +
  33 + <key name="height" type="i">
  34 + <default>-1</default>
  35 + <summary>The window height.</summary>
  36 + <description></description>
  37 + </key>
  38 +
  39 + <key name="is-maximized" type="b">
  40 + <default>false</default>
  41 + <summary>Is the window maximized?</summary>
  42 + <description></description>
  43 + </key>
  44 +
  45 + <key name="is-fullscreen" type="b">
  46 + <default>false</default>
  47 + <summary>Is the window in full screen mode?</summary>
  48 + <description></description>
  49 + </key>
  50 +
  51 + <key name="has-subtitle" type="b">
  52 + <default>false</default>
  53 + <summary>Enable top window subtitle</summary>
  54 + <description>If TRUE, reserve space for a subtitle, even if none is currently set.</description>
  55 + </key>
  56 +
  57 + <key name="toolbar-visible" type="b">
  58 + <default>false</default>
  59 + <summary>The toolbar visible state</summary>
  60 + <description></description>
  61 + </key>
  62 +
  63 + <key name="menubar-visible" type="b">
  64 + <default>false</default>
  65 + <summary>The menubar visible state</summary>
  66 + <description></description>
  67 + </key>
  68 +
  69 + <key name="toolbar-style" type="i">
  70 + <default>-1</default>
  71 + <summary>How to draw the toolbar.</summary>
  72 + <description></description>
  73 + </key>
  74 +
  75 + <key name="toolbar-icon-size" type="i">
  76 + <default>0</default>
  77 + <summary>The size of the toolbar icons</summary>
  78 + <description></description>
  79 + </key>
  80 +
  81 + <key name="toolbar-icon-type" type="i">
  82 + <default>0</default>
  83 + <summary>Use symbolic icons on toolbar</summary>
  84 + <description></description>
  85 + </key>
  86 +
  87 + <key name="header-icon-type" type="i">
  88 + <default>0</default>
  89 + <summary>Use symbolic icons on title bar</summary>
  90 + <description></description>
  91 + </key>
  92 +
  93 + <key name="toolbar-position" type="i">
  94 + <default>0</default>
  95 + <summary>The toolbar position</summary>
  96 + <description></description>
  97 + </key>
  98 +
  99 + <key name="toolbar-action-names" type="s">
  100 + <default>'win.copy,win.paste,win.select-all,separator,win.clear,win.erase-input,separator,win.print,separator,win.zoom-out,win.zoom-fit-best,win.zoom-in'</default>
  101 + <summary>The toolbar action list</summary>
  102 + <description></description>
  103 + </key>
  104 +
  105 + <key name="header-action-names" type="s">
  106 + <default>'menu.open-menu,win.disconnect,win.reconnect:'</default>
  107 + <summary>The title bar action list</summary>
  108 + <description></description>
  109 + </key>
  110 +
  111 + <key name="default-session-file" type="s">
  112 + <default>''</default>
  113 + <summary>Path of the default session file</summary>
  114 + <description></description>
  115 + </key>
  116 +
  117 + </schema>
  118 +
  119 +</schemalist>
schemas/windows/application.gschema.xml.in
@@ -1,92 +0,0 @@ @@ -1,92 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<!--  
3 -  
4 - Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
5 - (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
6 - aplicativos mainframe. Registro no INPI sob o nome G3270.  
7 -  
8 - Copyright (C) <2008> <Banco do Brasil S.A.>  
9 -  
10 - Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
11 - os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
12 - Free Software Foundation.  
13 -  
14 - Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
15 - GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
16 - A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
17 - obter mais detalhes.  
18 -  
19 - Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
20 - programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin  
21 - St, Fifth Floor, Boston, MA 02110-1301 USA  
22 -  
23 -  
24 - Contatos:  
25 -  
26 - perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
27 - erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
28 -  
29 --->  
30 -  
31 -<schemalist>  
32 -  
33 - <schema path="/br/app/@PRODUCT_NAME@/" id="br.app.@PRODUCT_NAME@">  
34 -  
35 - <key name="ui-style" type="u">  
36 - <default>0</default>  
37 - <summary>UI Style</summary>  
38 - <description>The ID of the current user interface style</description>  
39 - </key>  
40 -  
41 - <key name="gtk-csd" type="i">  
42 - <default>0</default>  
43 - <summary>GTK CSD</summary>  
44 - <description>Gtk Client side decorations</description>  
45 - </key>  
46 -  
47 - <key name="allow-host-settings" type="b">  
48 - <default>true</default>  
49 - <summary>Allow host settings</summary>  
50 - <description>Allow changing of host session properties</description>  
51 - </key>  
52 -  
53 - <key name="allow-open-session-actions" type="b">  
54 - <default>true</default>  
55 - <summary>Enable open session actions actions</summary>  
56 - <description>Enable open session actions</description>  
57 - </key>  
58 -  
59 - <key name="allow-new-tab-actions" type="b">  
60 - <default>true</default>  
61 - <summary>Enable new tab actions</summary>  
62 - <description>Enable new tab actions</description>  
63 - </key>  
64 -  
65 - <key name="allow-new-window-actions" type="b">  
66 - <default>true</default>  
67 - <summary>Enable new window actions</summary>  
68 - <description>Enable new window actions</description>  
69 - </key>  
70 -  
71 - <key name="default-session-file" type="s">  
72 - <default>'~/.config/default.3270'</default>  
73 - <summary>Path of the default session file</summary>  
74 - <description></description>  
75 - </key>  
76 -  
77 - <key name="update-default-session-file" type="b">  
78 - <default>false</default>  
79 - <summary>Update default session time from command line</summary>  
80 - <description></description>  
81 - </key>  
82 -  
83 - <key name="add-session-to-recent-manager" type="b">  
84 - <default>true</default>  
85 - <summary>Add session file to recent file list</summary>  
86 - <description></description>  
87 - </key>  
88 -  
89 - </schema>  
90 -  
91 -</schemalist>  
92 -  
schemas/windows/window.gschema.xml.in
@@ -1,127 +0,0 @@ @@ -1,127 +0,0 @@
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<!--  
3 -  
4 - Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270  
5 - (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a  
6 - aplicativos mainframe. Registro no INPI sob o nome G3270.  
7 -  
8 - Copyright (C) <2008> <Banco do Brasil S.A.>  
9 -  
10 - Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob  
11 - os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela  
12 - Free Software Foundation.  
13 -  
14 - Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER  
15 - GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO  
16 - A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para  
17 - obter mais detalhes.  
18 -  
19 - Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este  
20 - programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin  
21 - St, Fifth Floor, Boston, MA 02110-1301 USA  
22 -  
23 -  
24 - Contatos:  
25 -  
26 - perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
27 - erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
28 -  
29 --->  
30 -  
31 -<schemalist>  
32 -  
33 - <schema path="/br/app/@PRODUCT_NAME@/window/" id="br.app.@PRODUCT_NAME@.window">  
34 -  
35 - <key name="width" type="i">  
36 - <default>-1</default>  
37 - <summary>The window width.</summary>  
38 - <description></description>  
39 - </key>  
40 -  
41 - <key name="height" type="i">  
42 - <default>-1</default>  
43 - <summary>The window height.</summary>  
44 - <description></description>  
45 - </key>  
46 -  
47 - <key name="is-maximized" type="b">  
48 - <default>false</default>  
49 - <summary>Is the window maximized?</summary>  
50 - <description></description>  
51 - </key>  
52 -  
53 - <key name="is-fullscreen" type="b">  
54 - <default>false</default>  
55 - <summary>Is the window in full screen mode?</summary>  
56 - <description></description>  
57 - </key>  
58 -  
59 - <key name="has-subtitle" type="b">  
60 - <default>false</default>  
61 - <summary>Enable top window subtitle</summary>  
62 - <description>If TRUE, reserve space for a subtitle, even if none is currently set.</description>  
63 - </key>  
64 -  
65 - <key name="toolbar-visible" type="b">  
66 - <default>true</default>  
67 - <summary>The toolbar visible state</summary>  
68 - <description></description>  
69 - </key>  
70 -  
71 - <key name="menubar-visible" type="b">  
72 - <default>true</default>  
73 - <summary>The menubar visible state</summary>  
74 - <description></description>  
75 - </key>  
76 -  
77 - <key name="toolbar-style" type="i">  
78 - <default>0</default>  
79 - <summary>How to draw the toolbar.</summary>  
80 - <description></description>  
81 - </key>  
82 -  
83 - <key name="toolbar-icon-size" type="i">  
84 - <default>2</default>  
85 - <summary>The size of the toolbar icons</summary>  
86 - <description></description>  
87 - </key>  
88 -  
89 - <key name="toolbar-icon-type" type="i">  
90 - <default>0</default>  
91 - <summary>Use symbolic icons on toolbar</summary>  
92 - <description></description>  
93 - </key>  
94 -  
95 - <key name="header-icon-type" type="i">  
96 - <default>0</default>  
97 - <summary>Use symbolic icons on title bar</summary>  
98 - <description></description>  
99 - </key>  
100 -  
101 - <key name="toolbar-position" type="i">  
102 - <default>0</default>  
103 - <summary>The toolbar position</summary>  
104 - <description></description>  
105 - </key>  
106 -  
107 - <key name="toolbar-action-names" type="s">  
108 - <default>'win.copy,win.paste,win.select-all,separator,win.clear,win.erase-input,separator,win.print,separator,win.zoom-out,win.zoom-fit-best,win.zoom-in'</default>  
109 - <summary>The toolbar action list</summary>  
110 - <description></description>  
111 - </key>  
112 -  
113 - <key name="header-action-names" type="s">  
114 - <default>'menu.open-menu,win.disconnect,win.reconnect:'</default>  
115 - <summary>The title bar action list</summary>  
116 - <description></description>  
117 - </key>  
118 -  
119 - <key name="default-session-file" type="s">  
120 - <default>''</default>  
121 - <summary>Path of the default session file</summary>  
122 - <description></description>  
123 - </key>  
124 -  
125 - </schema>  
126 -  
127 -</schemalist>  
src/include/config.h.in
@@ -24,12 +24,12 @@ @@ -24,12 +24,12 @@
24 /* do we have malloc.h? */ 24 /* do we have malloc.h? */
25 #undef HAVE_MALLOC_H 25 #undef HAVE_MALLOC_H
26 26
  27 +/* Define to 1 if you have the <memory.h> header file. */
  28 +#undef HAVE_MEMORY_H
  29 +
27 /* Define to 1 if you have the <stdint.h> header file. */ 30 /* Define to 1 if you have the <stdint.h> header file. */
28 #undef HAVE_STDINT_H 31 #undef HAVE_STDINT_H
29 32
30 -/* Define to 1 if you have the <stdio.h> header file. */  
31 -#undef HAVE_STDIO_H  
32 -  
33 /* Define to 1 if you have the <stdlib.h> header file. */ 33 /* Define to 1 if you have the <stdlib.h> header file. */
34 #undef HAVE_STDLIB_H 34 #undef HAVE_STDLIB_H
35 35
@@ -96,12 +96,16 @@ @@ -96,12 +96,16 @@
96 /* The product name */ 96 /* The product name */
97 #undef PLUGIN_DIR 97 #undef PLUGIN_DIR
98 98
  99 +/* The product ID */
  100 +#undef PRODUCT_ID
  101 +
99 /* The product name */ 102 /* The product name */
100 #undef PRODUCT_NAME 103 #undef PRODUCT_NAME
101 104
102 -/* Define to 1 if all of the C90 standard headers exist (not just the ones  
103 - required in a freestanding environment). This macro is provided for  
104 - backward compatibility; new code need not use it. */ 105 +/* The schema path */
  106 +#undef PRODUCT_PATH
  107 +
  108 +/* Define to 1 if you have the ANSI C header files. */
105 #undef STDC_HEADERS 109 #undef STDC_HEADERS
106 110
107 /* Version number of package */ 111 /* Version number of package */
src/main/builder.c
@@ -22,26 +22,6 @@ @@ -22,26 +22,6 @@
22 #include <pw3270/keypad.h> 22 #include <pw3270/keypad.h>
23 #include <pw3270.h> 23 #include <pw3270.h>
24 24
25 - gchar * pw3270_build_data_filename(const char *filename) {  
26 -  
27 - g_autofree gchar * pkgdir = g_win32_get_package_installation_directory_of_module(NULL);  
28 -  
29 - gchar * path = g_build_filename(pkgdir,filename,NULL);  
30 - if(g_file_test(path,G_FILE_TEST_IS_REGULAR)) {  
31 - return path;  
32 - }  
33 - g_free(path);  
34 -  
35 - path = g_build_filename(pkgdir,"share",G_STRINGIFY(PRODUCT_NAME),filename,NULL);  
36 - if(g_file_test(path,G_FILE_TEST_IS_REGULAR)) {  
37 - return path;  
38 - }  
39 - g_free(path);  
40 -  
41 - g_error("Cant find '%s'",filename);  
42 - return NULL;  
43 - }  
44 -  
45 GtkBuilder * pw3270_application_builder_new(GApplication *application) { 25 GtkBuilder * pw3270_application_builder_new(GApplication *application) {
46 26
47 #if !defined(DEBUG) 27 #if !defined(DEBUG)
src/main/linux/tools.c 0 → 100644
@@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
  3 +/*
  4 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  5 + *
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 + #include <config.h>
  21 + #include <pw3270.h>
  22 +
  23 + gchar * pw3270_build_data_filename(const char *filename) {
  24 +
  25 + gchar * path = g_build_filename(G_STRINGIFY(DATADIR),filename,NULL);
  26 +
  27 + printf("\n\n\n%s\n\n\n",path);
  28 +
  29 + if(g_file_test(path,G_FILE_TEST_IS_REGULAR)) {
  30 + return path;
  31 + }
  32 + g_free(path);
  33 +
  34 + g_error("Cant find '%s'",filename);
  35 + return NULL;
  36 + }
  37 +
src/main/windows/tools.c 0 → 100644
@@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
  3 +/*
  4 + * Copyright (C) <2008> <Banco do Brasil S.A.>
  5 + *
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18 + */
  19 +
  20 + #include <config.h>
  21 + #include <pw3270.h>
  22 +
  23 + gchar * pw3270_build_data_filename(const char *filename) {
  24 +
  25 + g_autofree gchar * pkgdir = g_win32_get_package_installation_directory_of_module(NULL);
  26 +
  27 + gchar * path = g_build_filename(pkgdir,filename,NULL);
  28 + if(g_file_test(path,G_FILE_TEST_IS_REGULAR)) {
  29 + return path;
  30 + }
  31 + g_free(path);
  32 +
  33 + path = g_build_filename(pkgdir,"share",G_STRINGIFY(PRODUCT_NAME),filename,NULL);
  34 + if(g_file_test(path,G_FILE_TEST_IS_REGULAR)) {
  35 + return path;
  36 + }
  37 +
  38 + g_free(path);
  39 + g_error("Cant find '%s'",filename);
  40 + return NULL;
  41 + }
src/objects/window/window.c
@@ -138,15 +138,16 @@ static void pw3270ApplicationWindow_class_init(pw3270ApplicationWindowClass *kla @@ -138,15 +138,16 @@ static void pw3270ApplicationWindow_class_init(pw3270ApplicationWindowClass *kla
138 #ifdef _WIN32 138 #ifdef _WIN32
139 "share/icons", 139 "share/icons",
140 #endif // _WIN32 140 #endif // _WIN32
  141 + "share/" G_STRINGIFY(PRODUCT_NAME) "/icons"
141 }; 142 };
142 143
143 size_t ix; 144 size_t ix;
144 for(ix = 0; ix < G_N_ELEMENTS(icon_search_paths); ix++) { 145 for(ix = 0; ix < G_N_ELEMENTS(icon_search_paths); ix++) {
145 #if defined(DEBUG) 146 #if defined(DEBUG)
146 - lib3270_autoptr(char) path = g_build_filename(g_get_current_dir(),icon_search_paths[ix],NULL); 147 + g_autofree gchar * path = g_build_filename(g_get_current_dir(),icon_search_paths[ix],NULL);
147 #elif defined(_WIN32) 148 #elif defined(_WIN32)
148 g_autofree gchar * appdir = g_win32_get_package_installation_directory_of_module(NULL); 149 g_autofree gchar * appdir = g_win32_get_package_installation_directory_of_module(NULL);
149 - lib3270_autoptr(char) path = g_build_filename(appdir,icon_search_paths[ix],NULL); 150 + g_autofree gchar * path = g_build_filename(appdir,icon_search_paths[ix],NULL);
150 #else 151 #else
151 lib3270_autoptr(char) path = lib3270_build_data_filename(icon_search_paths[ix],NULL); 152 lib3270_autoptr(char) path = lib3270_build_data_filename(icon_search_paths[ix],NULL);
152 #endif 153 #endif