Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Aleksei Kanash 12 years ago
commit 8c4f818235
  1. 2
      Sankore_3.1.pro
  2. 25
      release.win7.vc9.bat
  3. 33
      resources/library/applications/Calculatrice.wgt/js/ubw-main.js
  4. 5
      src/board/UBFeaturesController.cpp

@ -14,7 +14,7 @@ linux-g++-64 {
VERSION_MAJ = 2 VERSION_MAJ = 2
VERSION_MIN = 00 VERSION_MIN = 00
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 01 VERSION_PATCH = 02
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "") VERSION = $$replace(VERSION, "\\.r", "")

@ -1,7 +1,7 @@
REM -------------------------------------------------------------------- REM --------------------------------------------------------------------
REM This program is free software: you can redistribute it and/or modify REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or REM the Free Software Foundation, either version 2 of the License, or
REM (at your option) any later version. REM (at your option) any later version.
REM REM
REM This program is distributed in the hope that it will be useful, REM This program is distributed in the hope that it will be useful,
@ -18,6 +18,7 @@ set QT_BIN=%QT_DIR%\bin
set PROGRAMS_FILE_PATH=C:\Program Files set PROGRAMS_FILE_PATH=C:\Program Files
set SEVEN_ZIP_EXE="%PROGRAMS_FILE_PATH%\7-Zip\7z.exe"
set GIT_BIN=%PROGRAMS_FILE_PATH%\Git\bin set GIT_BIN=%PROGRAMS_FILE_PATH%\Git\bin
set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 9.0\VC\bin set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 9.0\VC\bin
set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin
@ -37,7 +38,7 @@ REM is correct. This is important because installer
REM pick up dll from this directory REM pick up dll from this directory
IF NOT EXIST "%QT_DIR%\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR IF NOT EXIST "%QT_DIR%\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR
rmdir /S /Q %BUILD_DIR% REM rmdir /S /Q %BUILD_DIR%
set EDITION=MNEMIS_EDITION set EDITION=MNEMIS_EDITION
@ -46,7 +47,9 @@ set EDITION=MNEMIS_EDITION
%LRELEASE% Sankore_3.1.pro %LRELEASE% Sankore_3.1.pro
%LRELEASE% %BASE_QT_TRANSLATIONS_DIRECTORY%\translations.pro %LRELEASE% %BASE_QT_TRANSLATIONS_DIRECTORY%\translations.pro
REM set /p VERSION= < build\win32\release\version set /p VERSION= < build\win32\release\version
REM remove the last character that is a space
set VERSION=%VERSION: =%
REM git rev-list --tags --max-count=1 > tmp REM git rev-list --tags --max-count=1 > tmp
REM set /p LAST_TAG= < tmp REM set /p LAST_TAG= < tmp
REM erase tmp REM erase tmp
@ -78,3 +81,19 @@ set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe
call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%" call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%"
set INSTALL_DIRECTORY=install\win32\
xcopy *.pdf %INSTALL_DIRECTORY%
cd %INSTALL_DIRECTORY%
call %SEVEN_ZIP_EXE% a Open-Sankor‚_Windows_%VERSION%.zip *.exe *.pdf
cd ..\..\
GOTO END
:EXIT_WITH_ERROR
echo "Error found"
GOTO :EOF
:END
echo "Open-Sankore's build finished"
:EOF

@ -350,7 +350,6 @@ function init(){
function compute(){ function compute(){
var result; var result;
//alert(calc)
if(calc.length <= 1) if(calc.length <= 1)
result = eval(calc); result = eval(calc);
else{ else{
@ -362,7 +361,6 @@ function init(){
operation = (calc.indexOf("+", 0) != -1)?calc.charAt(calc.indexOf("+", 0)):((calc.indexOf("*", 0) != -1)?calc.charAt(calc.indexOf("*", 0)):((calc.indexOf("/", 0) != -1)?calc.charAt(calc.indexOf("/", 0)):((calc.indexOf("-", 0) != -1)?calc.charAt(calc.indexOf("-", 0)):""))); operation = (calc.indexOf("+", 0) != -1)?calc.charAt(calc.indexOf("+", 0)):((calc.indexOf("*", 0) != -1)?calc.charAt(calc.indexOf("*", 0)):((calc.indexOf("/", 0) != -1)?calc.charAt(calc.indexOf("/", 0)):((calc.indexOf("-", 0) != -1)?calc.charAt(calc.indexOf("-", 0)):"")));
fNumber = fMinus + calc.substring(0, calc.indexOf(operation, 0)); fNumber = fMinus + calc.substring(0, calc.indexOf(operation, 0));
lNumber = calc.substring(calc.indexOf(operation, 0)+1, calc.length); lNumber = calc.substring(calc.indexOf(operation, 0)+1, calc.length);
//alert(fNumber + " | " + operation + " | " + lNumber)
result = calcIt(fNumber, operation, lNumber); result = calcIt(fNumber, operation, lNumber);
} }
@ -391,10 +389,10 @@ function init(){
lCount = (lNumber.indexOf(".", 0) != -1)?lNumber.substring(lNumber.indexOf(".", 0)+1, lNumber.length):""; lCount = (lNumber.indexOf(".", 0) != -1)?lNumber.substring(lNumber.indexOf(".", 0)+1, lNumber.length):"";
length = (fCount.length >= lCount.length)?fCount.length:lCount.length; length = (fCount.length >= lCount.length)?fCount.length:lCount.length;
length = Math.pow(10, length); length = Math.pow(10, length);
fNumber = fNumber * length; fNumber = Math.round(fNumber * length);
lNumber = lNumber * length; lNumber = Math.round(lNumber * length);
switch(operation){ switch(operation){
case "+": case "+":
result = (fNumber + lNumber)/length; result = (fNumber + lNumber)/length;
break; break;
case "-": case "-":
@ -516,10 +514,27 @@ function init(){
displayTrunk = displayTrunk.substr(0, displayTrunk.length-1); displayTrunk = displayTrunk.substr(0, displayTrunk.length-1);
}; };
calc += String(char); if(calc == "0"){
displayTrunk += String(char); if(char != "0"){
historyTrunk += String(char); if(char != "."){
lastchar.type = "Number"; calc = String(char);
displayTrunk = String(char);
historyTrunk = String(char);
lastchar.type = "Number";
} else{
calc += String(char);
displayTrunk += String(char);
historyTrunk += String(char);
lastchar.type = "Number";
}
}
} else {
char = (char == ".")?((displayTrunk.indexOf(".", 0) != -1)?"":"."):char;
calc += String(char);
displayTrunk += String(char);
historyTrunk += String(char);
lastchar.type = "Number";
}
} }
// char is an operator // char is an operator
else { else {

@ -99,12 +99,17 @@ UBFeaturesController::UBFeaturesController(QWidget *pParentWidget) :
mUserAnimationDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userAnimationDirectory()); mUserAnimationDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userAnimationDirectory());
mLibPicturesDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationImageLibraryDirectory()); mLibPicturesDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationImageLibraryDirectory());
mLibAudiosDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationAudiosLibraryDirectory());
mLibVideosDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationVideosLibraryDirectory());
mLibAnimationsDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationAnimationsLibraryDirectory());
mLibInteractiveDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationInteractivesDirectory()); mLibInteractiveDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationInteractivesDirectory());
mLibApplicationsDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationApplicationsLibraryDirectory()); mLibApplicationsDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationApplicationsLibraryDirectory());
mLibShapesDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationShapeLibraryDirectory()); mLibShapesDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationShapeLibraryDirectory());
mLibSearchDirectoryPath =QUrl::fromLocalFile(UBSettings::settings()->userSearchDirectory()); mLibSearchDirectoryPath =QUrl::fromLocalFile(UBSettings::settings()->userSearchDirectory());
trashDirectoryPath = QUrl::fromLocalFile(UBSettings::userTrashDirPath()); trashDirectoryPath = QUrl::fromLocalFile(UBSettings::userTrashDirPath());
rootElement = UBFeature(QString(), QPixmap( ":images/libpalette/home.png" ), "root", QUrl()); rootElement = UBFeature(QString(), QPixmap( ":images/libpalette/home.png" ), "root", QUrl());
audiosElement = UBFeature( rootPath, QPixmap(":images/libpalette/AudiosCategory.svg"), "Audios" , mUserAudioDirectoryPath, FEATURE_CATEGORY); audiosElement = UBFeature( rootPath, QPixmap(":images/libpalette/AudiosCategory.svg"), "Audios" , mUserAudioDirectoryPath, FEATURE_CATEGORY);
moviesElement = UBFeature( rootPath, QPixmap(":images/libpalette/MoviesCategory.svg"), "Movies" , mUserVideoDirectoryPath, FEATURE_CATEGORY); moviesElement = UBFeature( rootPath, QPixmap(":images/libpalette/MoviesCategory.svg"), "Movies" , mUserVideoDirectoryPath, FEATURE_CATEGORY);

Loading…
Cancel
Save