diff --git a/OpenBoard.pro b/OpenBoard.pro index 19a41053..4f63070d 100644 --- a/OpenBoard.pro +++ b/OpenBoard.pro @@ -22,6 +22,7 @@ macx:OSX_VERSION = "$${VERSION} (r$${SVN_VERSION})" VERSION_RC = $$VERSION_MAJ,$$VERSION_MIN,$$VERSION_TYPE,$$VERSION_PATCH VERSION_RC = $$replace(VERSION_RC, "a", "160") # 0xA0 VERSION_RC = $$replace(VERSION_RC, "b", "176") # 0xB0 +VERSION_RC = $$replace(VERSION_RC, "rc", "192" ) # 0xC0 VERSION_RC = $$replace(VERSION_RC, "r", "240") # 0xF0 QT += webkit diff --git a/plugins/cffadaptor/src/UBCFFConstants.h b/plugins/cffadaptor/src/UBCFFConstants.h index 588ea699..d10683fc 100644 --- a/plugins/cffadaptor/src/UBCFFConstants.h +++ b/plugins/cffadaptor/src/UBCFFConstants.h @@ -118,7 +118,7 @@ const QString aIWBContent = "content"; // Attribute values -const QString avIWBVersionNo = "1.0"; +const QString avIWBVersionNo = "1.0"; const QString avUBZText = "text"; const QString avFalse = "false"; const QString avTrue = "true"; @@ -126,7 +126,6 @@ const QString avTrue = "true"; // Namespaces and prefixes const QString svgRequiredExtensionPrefix = "http://www.imsglobal.org/iwb/"; const QString dcNS = "http://purl.org/dc/elements/1.1/"; -const QString ubNS = "http://uniboard.mnemis.com/document"; const QString svgUBZNS = "http://www.imsglobal.org/xsd/iwb_v1p0"; const QString svgIWBNS = "http://www.w3.org/2000/svg"; const QString xlinkNS = "http://www.w3.org/1999/xlink"; @@ -138,7 +137,6 @@ http://www.imsglobal.org/profile/iwb/iwbv1p0_v1p0.xsd \ http://www.w3.org/2000/svg http://www.imsglobal.org/profile/iwb/svgsubsetv1p0_v1p0.xsd \ http://www.w3.org/1999/xlink http://www.imsglobal.org/xsd/w3/1999/xlink.xsd"; const QString dcNSPrefix = "dc"; -const QString ubNSPrefix = "ub"; const QString svgIWBNSPrefix = "svg"; const QString xlinkNSPrefix = "xlink"; const QString iwbNsPrefix = "iwb"; diff --git a/resources/OpenBoard.qrc b/resources/OpenBoard.qrc index 38c1ba18..35dd8f34 100644 --- a/resources/OpenBoard.qrc +++ b/resources/OpenBoard.qrc @@ -1,7 +1,7 @@ images/OpenBoard.png - images/bigUniboard.png + images/bigOpenBoard.png images/close.svg images/increase.svg images/decrease.svg diff --git a/resources/forms/blackoutWidget.ui b/resources/forms/blackoutWidget.ui index 932e708d..372d5c90 100644 --- a/resources/forms/blackoutWidget.ui +++ b/resources/forms/blackoutWidget.ui @@ -82,7 +82,7 @@ - background: url(:/images/bigUniboard.png); border: none; + background: url(:/images/bigOpenBoard.png); border: none; diff --git a/resources/forms/documents.ui b/resources/forms/documents.ui index 66ff3935..aa03f3aa 100644 --- a/resources/forms/documents.ui +++ b/resources/forms/documents.ui @@ -23,7 +23,7 @@ Qt::DefaultContextMenu - Uniboard Documents + OpenBoard Documents diff --git a/resources/forms/mainWindow.ui b/resources/forms/mainWindow.ui index 71426908..d7b73c3c 100644 --- a/resources/forms/mainWindow.ui +++ b/resources/forms/mainWindow.ui @@ -590,10 +590,10 @@ :/images/toolbar/menu.png:/images/toolbar/menu.png - Open-Sankoré + OpenBoard - Open-Sankoré + OpenBoard @@ -1564,10 +1564,10 @@ :/images/toolbar/hide.png:/images/toolbar/hide.png - Hide Open-Sankoré + Hide OpenBoard - Hide Open-Sankoré Application + Hide OpenBoard Application Ctrl+H diff --git a/resources/forms/preferences.ui b/resources/forms/preferences.ui index dc374871..29f0ddef 100644 --- a/resources/forms/preferences.ui +++ b/resources/forms/preferences.ui @@ -623,69 +623,6 @@ - - - true - - - About - - - - - - <!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:'Cantarell'; 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 2.0, 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 GNU General Public Licence (GNU GPL) telle que publiée par la Free Software Foundation en version 3, avec une exception OpenSSL.<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 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 GNU General Public License as published by the Free Software Foundation, version 3 of the License, with a specific linking exception for the OpenSSL project's &quot;OpenSSL&quot; library (or with modified versions of it that use the same license as the &quot;OpenSSL&quot; library). 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 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> - - - - - - - - 0 - 70 - - - - - 16777215 - 70 - - - - Software Update - - - - true - - - - 10 - 30 - 551 - 21 - - - - Check software update at launch - - - true - - - - - - true @@ -2711,6 +2648,77 @@ Public License instead of this License. But first, please read <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Cantarell'; 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;"><span style=" font-size:12pt; font-weight:600;">Translations</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-size:12pt; font-weight:600;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A special thanks to:</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;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Alexander Angelov and Iva Ninova for Bulgarian</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Francesc Busquets and Toni Hortal for Catalan</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Christophe Gallego for Corsican</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Jaroslav Krejčí, Janek Wagner for Czech</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Geert Kraeye and Derk Klomp for Dutch</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Christian Oïhénart and François Bocquet for French</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Hans-Peter Zahno and Klaus Tenner for German</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Yannis Kaskamanidis for Greek</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Lalit Mohan for Hindi</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Antonello Comi and Marco Menardi for Italian</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Didier Clerc for Japanese</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Faraniaina Domoina Rabarijaona for Malagasy</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Patricia Fisch and César Marques for Portuguese</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Ilia Ryabokon for Russian</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Anki Chen for Traditional Chinese</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Jaroslav Ryník for Slovak</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Dorian Fuentes and Juan José Gutiérrez Aparicio for Spanish</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">• Ferhat Ozkasgarli for Turkish</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;"><br /></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;"><br /></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;"><br /></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:12pt; font-weight:600;">Fonts</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-size:12pt; font-weight:600;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">AndBasR.ttf </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sil 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;"><a href="http://scripts.sil.org/OFL"><span style=" text-decoration: underline; color:#0000ff;">http://scripts.sil.org/OFL</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2004-2008, SIL International (<a href="http://scripts.sil.org"><span style=" text-decoration: underline; color:#0000ff;">http://scripts.sil.org</span></a>), </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">with Reserved Font Names 'Andika' and 'SIL'.</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;"><br /></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;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ec_cour.ttf </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">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;"><a href="http://scripts.sil.org/OFL"><span style=" text-decoration: underline; color:#0000ff;">http://scripts.sil.org/OFL</span></a></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 (<a href="mailto:douteau.ecolier@sfr.fr"><span style=" text-decoration: underline; color:#0000ff;">douteau.ecolier@sfr.fr</span></a>)</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : <a href="http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm"><span style=" text-decoration: underline; color:#0000ff;">http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</span></a></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;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ecl_cour.ttf</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">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;"><a href="http://scripts.sil.org/OFL"><span style=" text-decoration: underline; color:#0000ff;">http://scripts.sil.org/OFL</span></a></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 (<a href="mailto:douteau.ecolier@sfr.fr"><span style=" text-decoration: underline; color:#0000ff;">douteau.ecolier@sfr.fr</span></a>)</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Source : <a href="http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm"><span style=" text-decoration: underline; color:#0000ff;">http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</span></a></p></body></html> + + + true + + + + + + + + true + + + About + + + + + + <!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:'Cantarell'; 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;">OpenBoard 1.00.00</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;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OpenBoard is copyright (c) 2013 . All rights reserved.</p> @@ -2728,13 +2736,51 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="openeducationfoundation.org"><span style=" text-decoration: underline; color:#0000ff;">openeducationfoundation.org</span></a></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="oe-f.org"><span style=" text-decoration: underline; color:#0000ff;">oe-f.org</span></a></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;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">email: <a href="mailto:contact@oe-f.org"><span style=" text-decoration: underline; color:#0000ff;">contact@oe-f.org</span></a></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">email: <a href="mailto:contact@oe-f.org"><span style=" text-decoration: underline; color:#0000ff;">contact@oe-f.org</span></a></p></td></tr></table></body></html> true + + + + + 0 + 70 + + + + + 16777215 + 70 + + + + Software Update + + + + true + + + + 10 + 30 + 551 + 21 + + + + Check software update at launch + + + true + + + + diff --git a/resources/forms/youTubePublishingDialog.ui b/resources/forms/youTubePublishingDialog.ui index b07f7994..e6a78c79 100644 --- a/resources/forms/youTubePublishingDialog.ui +++ b/resources/forms/youTubePublishingDialog.ui @@ -69,7 +69,7 @@ - Uniboard + OpenBoard diff --git a/src/adaptors/UBMetadataDcSubsetAdaptor.cpp b/src/adaptors/UBMetadataDcSubsetAdaptor.cpp index 8f59fb26..c8310796 100644 --- a/src/adaptors/UBMetadataDcSubsetAdaptor.cpp +++ b/src/adaptors/UBMetadataDcSubsetAdaptor.cpp @@ -222,7 +222,7 @@ QMap UBMetadataDcSubsetAdaptor::load(QString pPath) if (xml.hasError()) { - qWarning() << "error parsing sankore metadata.rdf file " << xml.errorString(); + qWarning() << "error parsing metadata.rdf file " << xml.errorString(); } } diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index de2f1a3e..3bc20888 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -830,7 +830,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() if (mXmlReader.hasError()) { - qWarning() << "error parsing Sankore file " << mXmlReader.errorString(); + qWarning() << "error parsing file " << mXmlReader.errorString(); } qDebug() << "Number of detected strokes: " << mStrokesList.count(); diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index 6014e7c9..05981231 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -159,7 +159,7 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing setStyle(new UBStyle()); // Style is owned and deleted by the application - QString css = UBFileSystemUtils::readTextFile(UBPlatformUtils::applicationResourcesDirectory() + "/etc/Uniboard.css"); + QString css = UBFileSystemUtils::readTextFile(UBPlatformUtils::applicationResourcesDirectory() + "/etc/"+ qApp->applicationName()+".css"); if (css.length() > 0) setStyleSheet(css); diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index 44ad5dfe..2841d01b 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -507,7 +507,7 @@ void UBApplicationController::downloadJsonFinished(QString currentJson) UBVersion installedVersion (qApp->applicationVersion().left(4)); UBVersion jsonVersion (scriptValue.property("version").toString().left(4)); - if (installedVersion.isValid() && jsonVersion.isValid() && jsonVersion > installedVersion) { + if (jsonVersion > installedVersion) { if (UBApplication::mainWindow->yesNoQuestion(tr("Update available"), tr ("New update available, would you go to the web page ?"))){ QUrl url(scriptValue.property ("url").toString()); QDesktopServices::openUrl (url); diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 0750c2dc..607fb9ba 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -131,8 +131,8 @@ QSettings* UBSettings::getAppSettings() { if (!UBSettings::sAppSettings) { - QString tmpSettings = QDir::tempPath() + "/Uniboard.config"; - QString appSettings = UBPlatformUtils::applicationResourcesDirectory() + "/etc/Uniboard.config"; + QString tmpSettings = QDir::tempPath() + "/" + qApp->applicationName() + ".config"; + QString appSettings = UBPlatformUtils::applicationResourcesDirectory() + "/etc/" + qApp->applicationName() + ".config"; // tmpSettings exists when upgrading Uniboard on Mac (see UBPlatformUtils_mac.mm updater:willInstallUpdate:) if (QFile::exists(tmpSettings)) @@ -154,7 +154,7 @@ UBSettings::UBSettings(QObject *parent) mAppSettings = UBSettings::getAppSettings(); - QString userSettingsFile = UBSettings::userDataDirectory() + "/UniboardUser.config"; + QString userSettingsFile = UBSettings::userDataDirectory() + "/"+qApp->applicationName()+"User.config"; mUserSettings = new QSettings(userSettingsFile, QSettings::IniFormat, parent); @@ -761,7 +761,6 @@ void UBSettings::setItalicFont(bool italic) QString UBSettings::userDataDirectory() { - static QString dataDirPath = ""; if(dataDirPath.isEmpty()){ if (sAppSettings && getAppSettings()->contains("App/DataDirectory")) { @@ -775,7 +774,7 @@ QString UBSettings::userDataDirectory() } dataDirPath = UBFileSystemUtils::normalizeFilePath(QDesktopServices::storageLocation(QDesktopServices::DataLocation)); - dataDirPath.replace(qApp->organizationName() + "/" + qApp->organizationDomain(), ""); + dataDirPath.replace(qApp->organizationName() + "/", ""); } return dataDirPath; } diff --git a/src/core/main.cpp b/src/core/main.cpp index 3110849e..808ac9ce 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -59,7 +59,7 @@ void ub_message_output(QtMsgType type, const char *msg) { #endif if (UBApplication::app() && UBApplication::app()->isVerbose()) { - QString logFileNamePath = UBSettings::userDataDirectory() + "/log/uniboard.log"; + QString logFileNamePath = UBSettings::userDataDirectory() + "/log/"+ qApp->applicationName() + ".log"; QFile logFile(logFileNamePath); if (logFile.exists() && logFile.size() > 10000000) @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) UBApplication app("OpenBoard", argc, argv); //BUGFIX: - //when importing a sankore file that contains a non standard character + //when importing a OpenBoard file that contains a non standard character //the codecForLocale or the codecForCString is used to convert the file path //into a const char*. This is why in french windows setup the codec name shouldn't be //set to UTF-8. For example, setting UTF-8, will convert "Haïti" into "HaÂ-ti. diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index dbda4d5f..3ce2588a 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -694,7 +694,7 @@ void UBGraphicsScene::DisposeMagnifierQWidgets() magniferDisplayViewWidget = NULL; } - // some time have crash here on access to app (when call from destructor when close sankore app) + // some time have crash here on access to app (when call from destructor when close OpenBoard app) // so i just add try/catch section here try { diff --git a/src/frameworks/UBPlatformUtils.h b/src/frameworks/UBPlatformUtils.h index 27b3ed34..dad94076 100644 --- a/src/frameworks/UBPlatformUtils.h +++ b/src/frameworks/UBPlatformUtils.h @@ -127,8 +127,8 @@ struct KEYBT ~KEYBT() {} }; - - + + class UBKeyboardLocale { @@ -191,8 +191,6 @@ public: static QString translationPath(QString pFilePrefix, QString pLanguage); static QString systemLanguage(); static bool hasVirtualKeyboard(); - //static void showVirtualKeyboard(); - static void runInstaller(const QString &installerFilePath); static void bringPreviousProcessToFront(); static QString osUserLoginName(); static void setDesktopMode(bool desktop); diff --git a/src/frameworks/UBPlatformUtils_linux.cpp b/src/frameworks/UBPlatformUtils_linux.cpp index b429a3b4..fa1be75c 100644 --- a/src/frameworks/UBPlatformUtils_linux.cpp +++ b/src/frameworks/UBPlatformUtils_linux.cpp @@ -86,13 +86,6 @@ QString UBPlatformUtils::systemLanguage() return QLocale::system().name(); } -void UBPlatformUtils::runInstaller(const QString &installerFilePath) -{ - // TODO UB 4.x - auto update & installer are deactivated on Linux - Q_UNUSED(installerFilePath); - -} - void UBPlatformUtils::bringPreviousProcessToFront() { // Mac only diff --git a/src/frameworks/UBPlatformUtils_mac.mm b/src/frameworks/UBPlatformUtils_mac.mm index 44af5869..1db80252 100644 --- a/src/frameworks/UBPlatformUtils_mac.mm +++ b/src/frameworks/UBPlatformUtils_mac.mm @@ -32,13 +32,6 @@ #import #import -/* -// commented because Sankore crashes on Java Script. It seems to backends dependencies. -#import -#import -*/ - - NSString* bundleShortVersion(NSBundle *bundle) { return [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; @@ -237,60 +230,6 @@ QString UBPlatformUtils::systemLanguage() return result; } -void UBPlatformUtils::runInstaller(const QString &installerFilePath) -{ - UBApplication::setDisabled(true); - - // Save app config file to temp directory (will be restored at launch) - QString appSettings = UBPlatformUtils::applicationResourcesDirectory() + "/etc/Uniboard.config"; - QString tmpSettings = QDir::tempPath() + "/Uniboard.config"; - QFile::remove(tmpSettings); - QFile::copy(appSettings, tmpSettings); - - QString updateFilePath = QDir::tempPath() + "/upgrade.sh"; - - QFile file(":/macx/upgrade.sh"); - QFile updateFile(updateFilePath); - if (file.open(QIODevice::ReadOnly) && updateFile.open(QIODevice::WriteOnly)) - { - QByteArray payload = file.readAll(); - - updateFile.write(payload); - updateFile.close(); - - QString uniboardAndVersion = QApplication::applicationName() + QString(" ") + QApplication::applicationVersion(); - - QFileInfo fi(installerFilePath); - uniboardAndVersion = fi.fileName().remove(".dmg"); - - QString bundlePath; - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSString *nssBundlePath = [[NSBundle mainBundle] bundlePath]; - - bundlePath = QString::fromUtf8([nssBundlePath fileSystemRepresentation], strlen([nssBundlePath fileSystemRepresentation])); - [pool drain]; - - QString escaped = QString("/bin/sh \"%1\" \"%2\" \"%3\" \"%4\"") - .arg(updateFilePath) - .arg(uniboardAndVersion) - .arg(installerFilePath) - .arg(bundlePath); - - qDebug() << "Installing New Version" << escaped; - - QProcess process; - bool success = process.startDetached(escaped); - - if(success) - return; - } - - // did not work .. lets load the dmg ... - QDesktopServices::openUrl(QUrl::fromLocalFile(installerFilePath)); - -} - - void UBPlatformUtils::bringPreviousProcessToFront() { ProcessSerialNumber previousProcessPSN = {0, kNoProcess}; @@ -580,15 +519,7 @@ void UBPlatformUtils::destroyKeyboardLayouts() QString UBPlatformUtils::urlFromClipboard() { QString qsRet; -/* - // commented because Sankore crashes on Java Script. It seems to backends dependencies. - NSPasteboard* pPasteboard = [NSPasteboard pasteboardWithName:@"Apple CFPasteboard drag"]; - WebArchive* pArchive = [[WebArchive alloc] initWithData:[pPasteboard dataForType:@"com.apple.webarchive"]]; - - qsRet = [[[[pArchive mainResource] URL] absoluteString] UTF8String]; - [pArchive release]; -*/ return qsRet; } diff --git a/src/frameworks/UBPlatformUtils_win.cpp b/src/frameworks/UBPlatformUtils_win.cpp index 3d512080..03faca3e 100644 --- a/src/frameworks/UBPlatformUtils_win.cpp +++ b/src/frameworks/UBPlatformUtils_win.cpp @@ -88,22 +88,6 @@ QString UBPlatformUtils::systemLanguage() return QLocale::system().name(); } -void UBPlatformUtils::runInstaller(const QString &installerFilePath) -{ - QProcess process; - - QString escaped = QString("\"") + installerFilePath + QString("\" /SILENT"); - - bool success = process.startDetached(escaped); - if (!success) - { - qWarning() << "Running '" << installerFilePath << "' failed (error=" << process.error() << ")"; - QString verb = "runas"; - ::ShellExecute(NULL, verb.utf16(), installerFilePath.utf16(), NULL, NULL, SW_HIDE); - } -} - - void UBPlatformUtils::bringPreviousProcessToFront() { // Mac only diff --git a/src/frameworks/UBVersion.cpp b/src/frameworks/UBVersion.cpp index 854101dd..29d057d9 100644 --- a/src/frameworks/UBVersion.cpp +++ b/src/frameworks/UBVersion.cpp @@ -29,159 +29,200 @@ #include "core/memcheck.h" -UBVersion::UBVersion() - : mIsValid(false) - , mPlatform(-1) - , mMajor(-1) - , mMinor(-1) -{ - // NOOP -} +//UBVersion::UBVersion() +// : mIsValid(false) +// , mPlatform(-1) +// , mMajor(-1) +// , mMinor(-1) +//{ +// // NOOP +//} UBVersion::UBVersion(const QString &string) { - setString(string); -} - - -UBVersion::~UBVersion() -{ - // NOOP -} - - -QString UBVersion::toString() const -{ - return isValid() ? mString : "INVALID"; + mString = string; } -void UBVersion::setString(const QString &string) +uint UBVersion::toUInt() const { - mIsValid = true; - mString = string; - QStringList versionParts = string.split("."); - int count = versionParts.count(); - - if (count < 2) - { - mIsValid = false; - return; + uint result = 0; + QStringList list = mString.split("."); + switch (list.count()) { + case 2: + //short version 1.0 + result = (list.at(0).toUInt() * 1000000) + (list.at(1).toUInt() * 10000); + break; + case 3: + //release version 1.0.0 + result = (list.at(0).toUInt() * 1000000) + (list.at(1).toUInt() * 10000) + list.at(2).toUInt(); + break; + case 4:{ + //standard version 1.0.a/b/r.0 + uint releaseStage = list.at(2).startsWith("a") ? Alpha :(list.at(2).startsWith("b") ? Beta : ReleaseCandidate); + result = (list.at(0).toUInt() * 1000000) + (list.at(1).toUInt() * 10000) + (releaseStage * 100) + list.at(3).toUInt(); + break; } - - mPlatform = versionParts.at(0).toInt(&mIsValid); - if (!isValid()) return; - mMajor = versionParts.at(1).toInt(&mIsValid); - if (!isValid()) return; - - if (count == 2) - { - mMinor = 0; - mReleaseStage = ReleaseCandidate; - } - else if (count == 3) - { - // Format 4.1.2 (implicitly release) - mMinor = versionParts.at(2).toInt(&mIsValid); - if (!isValid()) return; - mReleaseStage = ReleaseCandidate; - } - else if (count >= 4) - { - // Format 4.1.x.2 (where x = a|b|r|) - if ("a" == versionParts.at(2)) - { - mReleaseStage = Alpha; - } - else if ("b" == versionParts.at(2)) - { - mReleaseStage = Beta; - } - else if ("r" == versionParts.at(2)) - { - mReleaseStage = ReleaseCandidate; - } - else - { - mMinor = versionParts.at(2).toInt(&mIsValid); - if (!isValid()) return; - mReleaseStage = ReleaseCandidate; - return; - } - - QStringList lastParts = versionParts.at(3).split(" "); - mMinor = lastParts.at(0).toInt(); + default: + qWarning() << "Unknown version format."; + break; } + return result; } -bool UBVersion::isValid() const -{ - return mIsValid; -} - -int UBVersion::platformNumber() const +UBVersion::~UBVersion() { - Q_ASSERT(isValid()); - return mPlatform; + // NOOP } -int UBVersion::majorNumber() const -{ - Q_ASSERT(isValid()); - return mMajor; -} -ReleaseStage UBVersion::releaseStage() const -{ - Q_ASSERT(isValid()); - return mReleaseStage; -} +//QString UBVersion::toString() const +//{ +// return isValid() ? mString : "INVALID"; +//} + +//void UBVersion::setString(const QString &string) +//{ +// mIsValid = true; +// mString = string; +// QStringList versionParts = string.split("."); +// int count = versionParts.count(); + +// if (count < 2) +// { +// mIsValid = false; +// return; +// } + +// mPlatform = versionParts.at(0).toInt(&mIsValid); +// if (!isValid()) return; +// mMajor = versionParts.at(1).toInt(&mIsValid); +// if (!isValid()) return; + +// if (count == 2) +// { +// mMinor = 0; +// mReleaseStage = ReleaseCandidate; +// } +// else if (count == 3) +// { +// // Format 4.1.2 (implicitly release) +// mMinor = versionParts.at(2).toInt(&mIsValid); +// if (!isValid()) return; +// mReleaseStage = ReleaseCandidate; +// } +// else if (count >= 4) +// { +// // Format 4.1.x.2 (where x = a|b|r|) +// if ("a" == versionParts.at(2)) +// { +// mReleaseStage = Alpha; +// } +// else if ("b" == versionParts.at(2)) +// { +// mReleaseStage = Beta; +// } +// else if ("r" == versionParts.at(2)) +// { +// mReleaseStage = ReleaseCandidate; +// } +// else +// { +// mMinor = versionParts.at(2).toInt(&mIsValid); +// if (!isValid()) return; +// mReleaseStage = ReleaseCandidate; +// return; +// } + +// QStringList lastParts = versionParts.at(3).split(" "); +// mMinor = lastParts.at(0).toInt(); +// } +//} + +//bool UBVersion::isValid() const +//{ +// return mIsValid; +//} + +//int UBVersion::platformNumber() const +//{ +// Q_ASSERT(isValid()); +// return mPlatform; +//} + +//int UBVersion::majorNumber() const +//{ +// Q_ASSERT(isValid()); +// return mMajor; +//} + +//ReleaseStage UBVersion::releaseStage() const +//{ +// Q_ASSERT(isValid()); +// return mReleaseStage; +//} + +//int UBVersion::minorNumber() const +//{ +// Q_ASSERT(isValid()); +// return mMinor; +//} + +//bool UBVersion::operator < (const UBVersion &otherVersion) const +//{ +// Q_ASSERT(isValid()); +// Q_ASSERT(otherVersion.isValid()); + +// if (platformNumber() != otherVersion.platformNumber()) +// return platformNumber() < otherVersion.platformNumber(); +// if (majorNumber() != otherVersion.majorNumber()) +// return majorNumber() < otherVersion.majorNumber(); +// if (releaseStage() != otherVersion.releaseStage()) +// return releaseStage() < otherVersion.releaseStage(); +// if (minorNumber() != otherVersion.minorNumber()) +// return minorNumber() < otherVersion.minorNumber(); +// return false; +//} + +//bool UBVersion::operator == (const UBVersion &otherVersion) const +//{ +// Q_ASSERT(isValid()); +// Q_ASSERT(otherVersion.isValid()); + +// return (platformNumber() == otherVersion.platformNumber() && +// majorNumber() == otherVersion.majorNumber() && +// releaseStage() == otherVersion.releaseStage() && +// minorNumber() == otherVersion.minorNumber()); +//} + +//bool UBVersion::operator > (const UBVersion &otherVersion) const +//{ +// Q_ASSERT(isValid()); +// Q_ASSERT(otherVersion.isValid()); + +// if (platformNumber() != otherVersion.platformNumber()) +// return platformNumber() > otherVersion.platformNumber(); +// if (majorNumber() != otherVersion.majorNumber()) +// return majorNumber() > otherVersion.majorNumber(); +// if (releaseStage() != otherVersion.releaseStage()) +// return releaseStage() > otherVersion.releaseStage(); +// if (minorNumber() != otherVersion.minorNumber()) +// return minorNumber() > otherVersion.minorNumber(); +// return false; +//} -int UBVersion::minorNumber() const -{ - Q_ASSERT(isValid()); - return mMinor; -} bool UBVersion::operator < (const UBVersion &otherVersion) const { - Q_ASSERT(isValid()); - Q_ASSERT(otherVersion.isValid()); - - if (platformNumber() != otherVersion.platformNumber()) - return platformNumber() < otherVersion.platformNumber(); - if (majorNumber() != otherVersion.majorNumber()) - return majorNumber() < otherVersion.majorNumber(); - if (releaseStage() != otherVersion.releaseStage()) - return releaseStage() < otherVersion.releaseStage(); - if (minorNumber() != otherVersion.minorNumber()) - return minorNumber() < otherVersion.minorNumber(); - return false; + return toUInt() < otherVersion.toUInt(); } bool UBVersion::operator == (const UBVersion &otherVersion) const { - Q_ASSERT(isValid()); - Q_ASSERT(otherVersion.isValid()); - - return (platformNumber() == otherVersion.platformNumber() && - majorNumber() == otherVersion.majorNumber() && - releaseStage() == otherVersion.releaseStage() && - minorNumber() == otherVersion.minorNumber()); + return toUInt() == otherVersion.toUInt(); } bool UBVersion::operator > (const UBVersion &otherVersion) const { - Q_ASSERT(isValid()); - Q_ASSERT(otherVersion.isValid()); - - if (platformNumber() != otherVersion.platformNumber()) - return platformNumber() > otherVersion.platformNumber(); - if (majorNumber() != otherVersion.majorNumber()) - return majorNumber() > otherVersion.majorNumber(); - if (releaseStage() != otherVersion.releaseStage()) - return releaseStage() > otherVersion.releaseStage(); - if (minorNumber() != otherVersion.minorNumber()) - return minorNumber() > otherVersion.minorNumber(); - return false; + return toUInt() > otherVersion.toUInt(); } diff --git a/src/frameworks/UBVersion.h b/src/frameworks/UBVersion.h index b2aed9bc..3ef74ba9 100644 --- a/src/frameworks/UBVersion.h +++ b/src/frameworks/UBVersion.h @@ -31,18 +31,20 @@ enum ReleaseStage { Alpha = 10, Beta = 11, ReleaseCandidate = 15 }; class UBVersion { public: - UBVersion(); +// UBVersion(); UBVersion(const QString &string); virtual ~UBVersion(); - void setString(const QString &string); - QString toString() const; + uint toUInt() const; - bool isValid() const; - int platformNumber() const; - int majorNumber() const; - ReleaseStage releaseStage() const; - int minorNumber() const; +// void setString(const QString &string); +// QString toString() const; + +// bool isValid() const; +// int platformNumber() const; +// int majorNumber() const; +// ReleaseStage releaseStage() const; +// int minorNumber() const; bool operator < (const UBVersion &otherVersion) const; bool operator == (const UBVersion &otherVersion) const; @@ -51,11 +53,11 @@ class UBVersion private: QString mString; - bool mIsValid; - int mPlatform; - int mMajor; - int mMinor; - ReleaseStage mReleaseStage; +// bool mIsValid; +// int mPlatform; +// int mMajor; +// int mMinor; +// ReleaseStage mReleaseStage; }; #endif // UBVERSION_H_