Commit aa4e04a76a2a7c68aa2965410bc104fdb667f4d5
1 parent
5421303d
Exists in
master
and in
4 other branches
Splitting UI settings based on OS.
Toolbar is now configurable.
Showing
8 changed files
with
167 additions
and
86 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -134,11 +134,11 @@ $(OBJDBG)/%.o: \ |
| 134 | 134 | @$(WINDRES) $< -O coff -o $@ |
| 135 | 135 | |
| 136 | 136 | gschemas.compiled: \ |
| 137 | - schemas/*.gschema.xml | |
| 137 | + schemas/@OSNAME@/*.gschema.xml | |
| 138 | 138 | |
| 139 | 139 | @glib-compile-schemas \ |
| 140 | 140 | --targetdir=$(@D) \ |
| 141 | - $(BASEDIR)/schemas | |
| 141 | + $(BASEDIR)/schemas/@OSNAME@ | |
| 142 | 142 | |
| 143 | 143 | #---[ Release Rules ]-------------------------------------------------------------------- |
| 144 | 144 | ... | ... |
configure.ac
| ... | ... | @@ -79,6 +79,8 @@ case "$host" in |
| 79 | 79 | AC_SUBST(WIN32_FILE_VERSION,$app_win32_file_version) |
| 80 | 80 | |
| 81 | 81 | AC_CONFIG_FILES(src/main/windows/resources.rc) |
| 82 | + AC_CONFIG_FILES(schemas/windows/application.gschema.xml) | |
| 83 | + | |
| 82 | 84 | ;; |
| 83 | 85 | |
| 84 | 86 | *) |
| ... | ... | @@ -90,6 +92,8 @@ case "$host" in |
| 90 | 92 | INSTALL_PACKAGES="linux-lib ${INSTALL_PACKAGES}" |
| 91 | 93 | |
| 92 | 94 | app_cv_static='no' |
| 95 | + AC_CONFIG_FILES(schemas/linux/application.gschema.xml) | |
| 96 | + | |
| 93 | 97 | |
| 94 | 98 | esac |
| 95 | 99 | |
| ... | ... | @@ -194,7 +198,6 @@ dnl --------------------------------------------------------------------------- |
| 194 | 198 | AC_SUBST(INSTALL_PACKAGES) |
| 195 | 199 | |
| 196 | 200 | AC_CONFIG_FILES(Makefile) |
| 197 | -AC_CONFIG_FILES(schemas/application.gschema.xml) | |
| 198 | 201 | |
| 199 | 202 | dnl --------------------------------------------------------------------------- |
| 200 | 203 | dnl Output the generated config.status script. | ... | ... |
pw3270.cbp
| ... | ... | @@ -42,6 +42,7 @@ |
| 42 | 42 | </Linker> |
| 43 | 43 | <Unit filename="Makefile.in" /> |
| 44 | 44 | <Unit filename="configure.ac" /> |
| 45 | + <Unit filename="schemas/linux/application.gschema.xml.in" /> | |
| 45 | 46 | <Unit filename="src/include/pw3270.h" /> |
| 46 | 47 | <Unit filename="src/include/pw3270/actions.h" /> |
| 47 | 48 | <Unit filename="src/include/pw3270/application.h" /> | ... | ... |
schemas/application.gschema.xml.in
| ... | ... | @@ -1,79 +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 id="br.com.bb.@PACKAGE_NAME@"> | |
| 34 | - | |
| 35 | - <key name="ui-style" type="u"> | |
| 36 | - <default>1</default> | |
| 37 | - <summary>UI Style</summary> | |
| 38 | - <description>The ID of the current user interface style</description> | |
| 39 | - </key> | |
| 40 | - | |
| 41 | - <key name="has-subtitle" type="b"> | |
| 42 | - <default>true</default> | |
| 43 | - <summary>Enable top window subtitle</summary> | |
| 44 | - <description>If TRUE, reserve space for a subtitle, even if none is currently set.</description> | |
| 45 | - </key> | |
| 46 | - | |
| 47 | - <key name="toolbar-style" type="i"> | |
| 48 | - <default>-1</default> | |
| 49 | - <summary>How to draw the toolbar.</summary> | |
| 50 | - <description></description> | |
| 51 | - </key> | |
| 52 | - | |
| 53 | - <key name="toolbar-icon-size" type="i"> | |
| 54 | - <default>0</default> | |
| 55 | - <summary>The size of the icons in a toolbar</summary> | |
| 56 | - <description></description> | |
| 57 | - </key> | |
| 58 | - | |
| 59 | - <key name="toolbar-visible" type="b"> | |
| 60 | - <default>true</default> | |
| 61 | - <summary>The toolbar visible state</summary> | |
| 62 | - <description></description> | |
| 63 | - </key> | |
| 64 | - | |
| 65 | - <key name="menubar-visible" type="b"> | |
| 66 | - <default>true</default> | |
| 67 | - <summary>The menubar visible state</summary> | |
| 68 | - <description></description> | |
| 69 | - </key> | |
| 70 | - | |
| 71 | - <key name="toolbar-action-names" type="s"> | |
| 72 | - <default>'win.copy,win.paste,win.select-all,separator,win.connect,win.disconnect,separator,win.session.properties,win.file.transfer,win.print,app.quit'</default> | |
| 73 | - <summary>The toolbar action list</summary> | |
| 74 | - <description></description> | |
| 75 | - </key> | |
| 76 | - | |
| 77 | - </schema> | |
| 78 | - | |
| 79 | -</schemalist> |
| ... | ... | @@ -0,0 +1,79 @@ |
| 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 id="br.com.bb.@PACKAGE_NAME@"> | |
| 34 | + | |
| 35 | + <key name="ui-style" type="u"> | |
| 36 | + <default>1</default> | |
| 37 | + <summary>UI Style</summary> | |
| 38 | + <description>The ID of the current user interface style</description> | |
| 39 | + </key> | |
| 40 | + | |
| 41 | + <key name="has-subtitle" type="b"> | |
| 42 | + <default>true</default> | |
| 43 | + <summary>Enable top window subtitle</summary> | |
| 44 | + <description>If TRUE, reserve space for a subtitle, even if none is currently set.</description> | |
| 45 | + </key> | |
| 46 | + | |
| 47 | + <key name="toolbar-style" type="i"> | |
| 48 | + <default>-1</default> | |
| 49 | + <summary>How to draw the toolbar.</summary> | |
| 50 | + <description></description> | |
| 51 | + </key> | |
| 52 | + | |
| 53 | + <key name="toolbar-icon-size" type="i"> | |
| 54 | + <default>0</default> | |
| 55 | + <summary>The size of the icons in a toolbar</summary> | |
| 56 | + <description></description> | |
| 57 | + </key> | |
| 58 | + | |
| 59 | + <key name="toolbar-visible" type="b"> | |
| 60 | + <default>true</default> | |
| 61 | + <summary>The toolbar visible state</summary> | |
| 62 | + <description></description> | |
| 63 | + </key> | |
| 64 | + | |
| 65 | + <key name="menubar-visible" type="b"> | |
| 66 | + <default>true</default> | |
| 67 | + <summary>The menubar visible state</summary> | |
| 68 | + <description></description> | |
| 69 | + </key> | |
| 70 | + | |
| 71 | + <key name="toolbar-action-names" type="s"> | |
| 72 | + <default>'win.copy,win.paste,win.select-all,separator,win.connect,win.disconnect,separator,win.session.properties,win.file.transfer,win.print,app.quit'</default> | |
| 73 | + <summary>The toolbar action list</summary> | |
| 74 | + <description></description> | |
| 75 | + </key> | |
| 76 | + | |
| 77 | + </schema> | |
| 78 | + | |
| 79 | +</schemalist> | ... | ... |
| ... | ... | @@ -0,0 +1,79 @@ |
| 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 id="br.com.bb.@PACKAGE_NAME@"> | |
| 34 | + | |
| 35 | + <key name="ui-style" type="u"> | |
| 36 | + <default>1</default> | |
| 37 | + <summary>UI Style</summary> | |
| 38 | + <description>The ID of the current user interface style</description> | |
| 39 | + </key> | |
| 40 | + | |
| 41 | + <key name="has-subtitle" type="b"> | |
| 42 | + <default>true</default> | |
| 43 | + <summary>Enable top window subtitle</summary> | |
| 44 | + <description>If TRUE, reserve space for a subtitle, even if none is currently set.</description> | |
| 45 | + </key> | |
| 46 | + | |
| 47 | + <key name="toolbar-style" type="i"> | |
| 48 | + <default>-1</default> | |
| 49 | + <summary>How to draw the toolbar.</summary> | |
| 50 | + <description></description> | |
| 51 | + </key> | |
| 52 | + | |
| 53 | + <key name="toolbar-icon-size" type="i"> | |
| 54 | + <default>0</default> | |
| 55 | + <summary>The size of the icons in a toolbar</summary> | |
| 56 | + <description></description> | |
| 57 | + </key> | |
| 58 | + | |
| 59 | + <key name="toolbar-visible" type="b"> | |
| 60 | + <default>true</default> | |
| 61 | + <summary>The toolbar visible state</summary> | |
| 62 | + <description></description> | |
| 63 | + </key> | |
| 64 | + | |
| 65 | + <key name="menubar-visible" type="b"> | |
| 66 | + <default>true</default> | |
| 67 | + <summary>The menubar visible state</summary> | |
| 68 | + <description></description> | |
| 69 | + </key> | |
| 70 | + | |
| 71 | + <key name="toolbar-action-names" type="s"> | |
| 72 | + <default>'win.copy,win.paste,win.select-all,separator,win.connect,win.disconnect,separator,win.session.properties,win.file.transfer,win.print,app.quit'</default> | |
| 73 | + <summary>The toolbar action list</summary> | |
| 74 | + <description></description> | |
| 75 | + </key> | |
| 76 | + | |
| 77 | + </schema> | |
| 78 | + | |
| 79 | +</schemalist> | ... | ... |
src/objects/toolbar/toolbar.c
src/objects/window/window.c
| ... | ... | @@ -185,8 +185,6 @@ |
| 185 | 185 | |
| 186 | 186 | g_autoptr(GSettings) settings = pw3270_application_get_settings(G_APPLICATION(application)); |
| 187 | 187 | |
| 188 | - debug("*************** settings=%p",settings); | |
| 189 | - | |
| 190 | 188 | g_return_val_if_fail(GTK_IS_APPLICATION(application), NULL); |
| 191 | 189 | pw3270ApplicationWindow * window = |
| 192 | 190 | g_object_new( |
| ... | ... | @@ -262,8 +260,6 @@ |
| 262 | 260 | } |
| 263 | 261 | |
| 264 | 262 | // Setup and show main window |
| 265 | - //gtk_application_window_set_show_menubar(GTK_APPLICATION_WINDOW(window),TRUE); | |
| 266 | - | |
| 267 | 263 | g_settings_bind( |
| 268 | 264 | settings, |
| 269 | 265 | "menubar-visible", | ... | ... |