From 0aec9cc4ae3bf20fc58bf0d1466df8009478b704 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 12 Oct 2012 10:45:52 +0200 Subject: [PATCH] fixed issue 765 --- resources/forms/preferences.ui | 168 +++++++++++++++------------ src/core/UBApplication.cpp | 2 + src/core/UBPreferencesController.cpp | 28 ++++- src/core/UBPreferencesController.h | 2 + src/core/UBSettings.cpp | 34 ++++-- src/core/UBSettings.h | 14 ++- 6 files changed, 157 insertions(+), 91 deletions(-) diff --git a/resources/forms/preferences.ui b/resources/forms/preferences.ui index 6e439559..3bb29323 100644 --- a/resources/forms/preferences.ui +++ b/resources/forms/preferences.ui @@ -24,7 +24,7 @@ - 3 + 0 @@ -608,19 +608,6 @@ - - - - Qt::Vertical - - - - 20 - 40 - - - - @@ -630,7 +617,7 @@ - Planète Sankoré ID + Planète Sankoré ID for exporting file @@ -693,9 +680,38 @@ + + + + + 0 + 0 + + + + Restore credentials on reboot + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -736,11 +752,11 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">The licences are in English to respect the official and legal approved translation.</span></p></td></tr></table></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">The licences are in English to respect the official and legal approved translation.</span></p></td></tr></table></body></html> Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -772,12 +788,12 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;">The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;">See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact </span><a href="mailto:openssl-core@openssl.org"><span style=" font-family:'Ubuntu'; font-size:9pt; text-decoration: underline; color:#0000ff;">openssl-core@openssl.org</span></a><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;">.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"> </span></p></td></tr></table></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#1a1a1a;">The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#1a1a1a;">See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact </span><a href="mailto:openssl-core@openssl.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">openssl-core@openssl.org</span></a><span style=" font-size:9pt; color:#1a1a1a;">.</span><span style=" font-size:9pt;"> </span></p></td></tr></table></body></html> @@ -794,11 +810,11 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;">Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler</span><span style=" font-family:'Ubuntu'; font-size:12pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 3. This notice may not be removed or altered from any source distribution.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"> </span></p></td></tr></table></body></html> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#1a1a1a;">Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler</span><span style=" font-size:12pt;"><br /><br /></span><span style=" font-size:9pt; color:#1a1a1a;"> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#1a1a1a;"> Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#1a1a1a;"> 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#1a1a1a;"> 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#1a1a1a;"> 3. This notice may not be removed or altered from any source distribution.</span><span style=" font-size:9pt;"> </span></p></td></tr></table></body></html> @@ -815,11 +831,11 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:9pt; color:#000000;">Xpdf is licensed under the GNU General Public License (GPL), version 2.</span></p></td></tr></table></body></html> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#000000;">Xpdf is licensed under the GNU General Public License (GPL), version 2.</span></p></td></tr></table></body></html> @@ -836,11 +852,11 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> -<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:9pt;">GNU Library or Lesser General Public License (LGPL), zlib/libpng License</span></p></td></tr></table></body></html> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt;">GNU Library or Lesser General Public License (LGPL), zlib/libpng License</span></p></td></tr></table></body></html> @@ -1321,12 +1337,12 @@ DAMAGES. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> <tr> <td style="border: none;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Open-Sankoré version 1.4 , Copyright (C) 2010-2012 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br /><br />Open-Sankoré est un logiciel libre : vous pouvez le redistribuer et/ou le modifier en respectant les termes de la Lesser GNU general Public Licence (GNU LGPL) telle que publiée par la Free Software Foundation en version 2 ou une version plus récente.<br />Vous pouvez consulter et charger le code source du logiciel sur </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER.<br />Veuillez consulter la licence Lesser GNU General Public Licence située dans l'onglet Licences ou consulter le site </span><a href="http://www.gnu.org/licenses/"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;http://www.gnu.org/licenses/&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">.<br /><br />Open-Sankoré is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. You can find the source code of this software at </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details.<br /><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Contact : <br />Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br />Délégation Interministérielle à l'Education Numérique en Afrique<br />20 Avenue Ségur Paris 75007<br />Téléphone : 01 43 17 68 08<br />email: </span><a href="mailto:contact@sankore.org"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">&quot;</span></p></td></tr></table></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Open-Sankoré version 1.4 , Copyright (C) 2010-2012 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br /><br />Open-Sankoré est un logiciel libre : vous pouvez le redistribuer et/ou le modifier en respectant les termes de la Lesser GNU general Public Licence (GNU LGPL) telle que publiée par la Free Software Foundation en version 2 ou une version plus récente.<br />Vous pouvez consulter et charger le code source du logiciel sur </span><a href="https://github.com/Sankore"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-size:11pt;"><br />Open-Sankoré est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER.<br />Veuillez consulter la licence Lesser GNU General Public Licence située dans l'onglet Licences ou consulter le site </span><a href="http://www.gnu.org/licenses/"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;http://www.gnu.org/licenses/&gt;</span></a><span style=" font-size:11pt;">.<br /><br />Open-Sankoré is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. You can find the source code of this software at </span><a href="https://github.com/Sankore"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-size:11pt;"><br />Open-Sankoré is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details.<br /><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Contact : <br />Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br />Délégation Interministérielle à l'Education Numérique en Afrique<br />20 Avenue Ségur Paris 75007<br />Téléphone : 01 43 17 68 08<br />email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:11pt;">&quot;</span></p></td></tr></table></body></html> @@ -1355,7 +1371,7 @@ p, li { white-space: pre-wrap; } 10 30 - 341 + 551 21 @@ -1381,52 +1397,52 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Crédits police scolaire Open-Sankoré : </span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">La police Andika Basic dispose d'une licence Open Font License </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Sil international</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=andika</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Licence OFL (traduction française non officielle) http://fontforge.sourceforge.net/OFL-Unofficial-fr.html</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence OFL : </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier Court </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier Ligne Court</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Jean-Marie Douteau (douteau.ecolier@sfr.fr)</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence Creative Commons BY NC ND :</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier lignes pointillés</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier pointillés</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier CP</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier CP pointillés</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Jean-Marie Douteau (douteau.ecolier@sfr.fr)</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Cursive sont l'oeuvre d'Antoine Fetet (antoine.fetet@laposte.net) à partir d'une police proposée par Jean-Claude Gineau</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://lps13.free.fr/contenu/construire/Cursive_standard.zip et http://fr.fontriver.com/font/gino_school_script/</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">L'auteur en autorise l'utilisation dans le cadre du logiciel open-Sankoré pour un usage non commercial</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Script (Ecole et CaseEcole) sont l'oeuvre d'Henri Rogelet</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/SCRIPTCO.zip</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/SCRIPTCA.zip</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Autorisation pour un usage non commercial</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices.html</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">La police phonétique, Alphonet est l'oeuvre d'Henri Rogelet</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/ALPHONET.zip</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Autorisation pour un usage non commercial</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices.html</span></p></body></html> +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Crédits police scolaire Open-Sankoré : </p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">La police Andika Basic dispose d'une licence Open Font License </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> © Sil international</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=andika</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Licence OFL (traduction française non officielle) http://fontforge.sourceforge.net/OFL-Unofficial-fr.html</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence OFL : </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Ecolier Court </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Ecolier Ligne Court</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> © Jean-Marie Douteau (douteau.ecolier@sfr.fr)</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence Creative Commons BY NC ND :</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Ecolier lignes pointillés</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Écolier pointillés</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Écolier CP</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Écolier CP pointillés</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> © Jean-Marie Douteau (douteau.ecolier@sfr.fr)</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Les polices Cursive sont l'oeuvre d'Antoine Fetet (antoine.fetet@laposte.net) à partir d'une police proposée par Jean-Claude Gineau</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : http://lps13.free.fr/contenu/construire/Cursive_standard.zip et http://fr.fontriver.com/font/gino_school_script/</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">L'auteur en autorise l'utilisation dans le cadre du logiciel open-Sankoré pour un usage non commercial</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Les polices Script (Ecole et CaseEcole) sont l'oeuvre d'Henri Rogelet</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : http://pointecole.free.fr/polices/SCRIPTCO.zip</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : http://pointecole.free.fr/polices/SCRIPTCA.zip</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Autorisation pour un usage non commercial</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : http://pointecole.free.fr/polices.html</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">La police phonétique, Alphonet est l'oeuvre d'Henri Rogelet</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : http://pointecole.free.fr/polices/ALPHONET.zip</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Autorisation pour un usage non commercial</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : http://pointecole.free.fr/polices.html</p></body></html> Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index 580ef897..f673cc35 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -476,6 +476,8 @@ void UBApplication::closing() if (webController) webController->closing(); + UBSettings::settings()->closing(); + UBSettings::settings()->appToolBarPositionedAtTop->set(mainWindow->toolBarArea(mainWindow->boardToolBar) == Qt::TopToolBarArea); quit(); diff --git a/src/core/UBPreferencesController.cpp b/src/core/UBPreferencesController.cpp index dae490b6..44879aaa 100644 --- a/src/core/UBPreferencesController.cpp +++ b/src/core/UBPreferencesController.cpp @@ -67,8 +67,6 @@ UBPreferencesController::UBPreferencesController(QWidget *parent) mPreferencesWindow = new UBPreferencesDialog(this,parent, Qt::Dialog); mPreferencesUI = new Ui::preferencesDialog(); // deleted in mPreferencesUI->setupUi(mPreferencesWindow); - connect(mPreferencesUI->Username_textBox, SIGNAL(editingFinished()), this, SLOT(onCommunityUsernameChanged())); - connect(mPreferencesUI->Password_textEdit, SIGNAL(editingFinished()), this, SLOT(onCommunityPasswordChanged())); wire(); } @@ -76,7 +74,7 @@ UBPreferencesController::UBPreferencesController(QWidget *parent) UBPreferencesController::~UBPreferencesController() { - delete mPreferencesWindow; + delete mPreferencesWindow; delete mPreferencesUI; @@ -161,6 +159,12 @@ void UBPreferencesController::wire() connect(mMarkerProperties->pressureSensitiveCheckBox, SIGNAL(clicked(bool)), settings, SLOT(setMarkerPressureSensitive(bool))); connect(mMarkerProperties->opacitySlider, SIGNAL(valueChanged(int)), this, SLOT(opacitySliderChanged(int))); + + //network + connect(mPreferencesUI->Username_textBox, SIGNAL(editingFinished()), this, SLOT(onCommunityUsernameChanged())); + connect(mPreferencesUI->Password_textEdit, SIGNAL(editingFinished()), this, SLOT(onCommunityPasswordChanged())); + connect(mPreferencesUI->PSDataPersistenceCheckBox,SIGNAL(clicked()),this, SLOT(onCommunityPersistenceChanged())); + // about tab connect(mPreferencesUI->checkSoftwareUpdateAtLaunchCheckBox, SIGNAL(clicked(bool)), settings->appEnableAutomaticSoftwareUpdates, SLOT(setBool(bool))); } @@ -212,18 +216,36 @@ void UBPreferencesController::init() mMarkerProperties->opacitySlider->setValue(settings->boardMarkerAlpha->get().toDouble() * 100); + //network + mPreferencesUI->PSDataPersistenceCheckBox->setChecked(settings->getCommunityDataPersistence()); + persistanceCheckboxUpdate(); + } void UBPreferencesController::onCommunityUsernameChanged() { UBSettings* settings = UBSettings::settings(); settings->setCommunityUsername(mPreferencesUI->Username_textBox->text()); + persistanceCheckboxUpdate(); } void UBPreferencesController::onCommunityPasswordChanged() { UBSettings* settings = UBSettings::settings(); settings->setCommunityPassword(mPreferencesUI->Password_textEdit->text()); + persistanceCheckboxUpdate(); +} + +void UBPreferencesController::onCommunityPersistenceChanged() +{ + UBSettings::settings()->setCommunityPersistence(mPreferencesUI->PSDataPersistenceCheckBox->isChecked()); +} + +void UBPreferencesController::persistanceCheckboxUpdate() +{ + bool checkBoxEnabled = mPreferencesUI->Username_textBox->text().length() || mPreferencesUI->Password_textEdit->text().length(); + mPreferencesUI->PSDataPersistenceCheckBox->setEnabled(checkBoxEnabled); + mPreferencesUI->PSDataPersistenceCheckBox->setStyleSheet(checkBoxEnabled ? "color:black;" : "color:lightgray;"); } diff --git a/src/core/UBPreferencesController.h b/src/core/UBPreferencesController.h index 3dc8c536..7ce7e0e9 100644 --- a/src/core/UBPreferencesController.h +++ b/src/core/UBPreferencesController.h @@ -83,12 +83,14 @@ class UBPreferencesController : public QObject void toolbarOrientationHorizontal(bool checked); void onCommunityUsernameChanged(); void onCommunityPasswordChanged(); + void onCommunityPersistenceChanged(); private: static qreal sSliderRatio; static qreal sMinPenWidth; static qreal sMaxPenWidth; + void persistanceCheckboxUpdate(); }; diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 5bc973a3..55a8e5f8 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -173,7 +173,7 @@ void UBSettings::ValidateKeyboardPaletteKeyBtnSize() { // if boardKeyboardPaletteKeyBtnSize is not initialized, or supportedKeyboardSizes not initialized or empty if( !boardKeyboardPaletteKeyBtnSize || - !supportedKeyboardSizes || + !supportedKeyboardSizes || supportedKeyboardSizes->size() == 0 ) return; // get original size value @@ -243,7 +243,7 @@ void UBSettings::init() pageSize = new UBSetting(this, "Board", "DefaultPageSize", documentSizes.value(DocumentSizeRatio::Ratio4_3)); pageDpi = new UBSetting(this, "Board", "pageDpi", 0); - + QStringList penLightBackgroundColors; penLightBackgroundColors << "#000000" << "#FF0000" <<"#004080" << "#008000" << "#C87400" << "#800040" << "#008080" << "#5F2D0A"; boardPenLightBackgroundColors = new UBColorListSetting(this, "Board", "PenLightBackgroundColors", penLightBackgroundColors, 1.0); @@ -357,6 +357,7 @@ void UBSettings::init() communityUser = new UBSetting(this, "Community", "Username", ""); communityPsw = new UBSetting(this, "Community", "Password", ""); + communityDataPersistence = new UBSetting(this,"Community", "DataPeristence",true); QStringList uris = UBToolsManager::manager()->allToolIDs(); @@ -383,7 +384,7 @@ void UBSettings::init() intranetPodcastPublishingUrl = new UBSetting(this, "IntranetPodcast", "PublishingUrl", ""); intranetPodcastAuthor = new UBSetting(this, "IntranetPodcast", "Author", ""); - KeyboardLocale = new UBSetting(this, "Board", "StartupKeyboardLocale", 0); + KeyboardLocale = new UBSetting(this, "Board", "StartupKeyboardLocale", 0); swapControlAndDisplayScreens = new UBSetting(this, "App", "SwapControlAndDisplayScreens", false); angleTolerance = new UBSetting(this, "App", "AngleTolerance", 4); @@ -392,6 +393,8 @@ void UBSettings::init() teacherGuideLessonPagesActivated = new UBSetting(this,"DockPalette","TeacherGuideActivateLessonPages",true); libIconSize = new UBSetting(this, "Library", "LibIconSize", defaultLibraryIconSize); + + cleanNonPersistentSettings(); } @@ -401,7 +404,7 @@ QVariant UBSettings::value ( const QString & key, const QVariant & defaultValue) { sAppSettings->setValue(key, defaultValue); } - + return mUserSettings->value(key, sAppSettings->value(key, defaultValue)); } @@ -944,7 +947,7 @@ QString UBSettings::applicationImageLibraryDirectory() { QString defaultRelativePath = QString("./library/pictures"); - QString configPath = value("Library/ImageDirectory", QVariant(defaultRelativePath)).toString(); + QString configPath = value("Library/ImageDirectory", QVariant(defaultRelativePath)).toString(); if (configPath.startsWith(".")) { return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1); @@ -1180,12 +1183,17 @@ void UBSettings::setCommunityPassword(const QString &password) communityPsw->set(QVariant(password)); } +void UBSettings::setCommunityPersistence(const bool persistence) +{ + communityDataPersistence->set(QVariant(persistence)); +} + int UBSettings::libraryIconSize(){ - return libIconSize->get().toInt(); + return libIconSize->get().toInt(); } void UBSettings::setLibraryIconsize(const int& size){ - libIconSize->set(QVariant(size)); + libIconSize->set(QVariant(size)); } bool UBSettings::checkDirectory(QString& dirPath) @@ -1218,3 +1226,15 @@ QString UBSettings::replaceWildcard(QString& path) return result; } +void UBSettings::closing() +{ + cleanNonPersistentSettings(); +} + +void UBSettings::cleanNonPersistentSettings() +{ + if(!communityDataPersistence->get().toBool()){ + communityPsw->set(QVariant("")); + communityUser->set(QVariant("")); + } +} diff --git a/src/core/UBSettings.h b/src/core/UBSettings.h index 1567acbf..a66de501 100644 --- a/src/core/UBSettings.h +++ b/src/core/UBSettings.h @@ -29,13 +29,14 @@ class UBSettings : public QObject UBSettings(QObject *parent = 0); virtual ~UBSettings(); + void cleanNonPersistentSettings(); public: QStringList* supportedKeyboardSizes; void InitKeyboardPaletteKeyBtnSizes(); void ValidateKeyboardPaletteKeyBtnSize(); - + void closing(); int penWidthIndex(); @@ -95,12 +96,14 @@ class UBSettings : public QObject void setCommunityUsername(const QString& username); QString communityPassword(); void setCommunityPassword(const QString& password); + bool getCommunityDataPersistence(){return communityDataPersistence->get().toBool();} + void setCommunityPersistence(const bool persistence); int libraryIconSize(); void setLibraryIconsize(const int& size); void init(); - + //user directories static QString userDataDirectory(); static QString userDocumentDirectory(); @@ -115,9 +118,9 @@ class UBSettings : public QObject static QString userInteractiveFavoritesDirectory(); static QString userPodcastRecordingDirectory(); - QString userGipLibraryDirectory(); - - //application directory + QString userGipLibraryDirectory(); + + //application directory QString applicationShapeLibraryDirectory(); QString applicationImageLibraryDirectory(); QString applicationApplicationsLibraryDirectory(); @@ -337,6 +340,7 @@ class UBSettings : public QObject UBSetting* communityUser; UBSetting* communityPsw; + UBSetting* communityDataPersistence; UBSetting* pageSize; UBSetting* pageDpi;