Commit 0a1799a5 authored by Ivan Ilin's avatar Ivan Ilin

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

parents 26ae8fb2 f0d153fe
...@@ -54,6 +54,14 @@ Makefile ...@@ -54,6 +54,14 @@ Makefile
Makefile.Debug Makefile.Debug
Makefile.Release Makefile.Release
# plugins #
###########
plugins/cffadaptor/lib
plugins/cffadaptor/moc
plugins/cffadaptor/objects
# Translation files # # Translation files #
##################### #####################
*.qm *.qm
......
...@@ -84,10 +84,9 @@ Source: "..\Qt-sankore3.1\plugins\phonon_backend\phonon_ds94.dll"; DestDir: "{ap ...@@ -84,10 +84,9 @@ Source: "..\Qt-sankore3.1\plugins\phonon_backend\phonon_ds94.dll"; DestDir: "{ap
[Icons] [Icons]
Name: "{group}\Open-Sankore"; Filename: "{app}\Open-Sankore.exe" Name: "{group}\Open-Sankore"; Filename: "{app}\Open-Sankore.exe"
Name: "{group}\{cm:UninstallProgram,Sankore 3.1}"; Filename: "{uninstallexe}" Name: "{group}\{cm:UninstallProgram,Open-Sankore}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\Open-Sankore"; Filename: "{app}\Open-Sankore.exe"; Tasks: desktopicon Name: "{commondesktop}\Open-Sankore"; Filename: "{app}\Open-Sankore.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Open-Sankore"; Filename: "{app}\Open-Sankore.exe"; Tasks: quicklaunchicon Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Open-Sankore"; Filename: "{app}\Open-Sankore.exe"; Tasks: quicklaunchicon
;Name: "{group}\Printing Preferences"; Filename: "{app}\properties.exe"; WorkingDir: {app}
[Registry] [Registry]
Root: HKCR; Subkey: ".ubz"; ValueType: string; ValueName: ""; ValueData: "SankoreFile"; Flags: uninsdeletevalue Root: HKCR; Subkey: ".ubz"; ValueType: string; ValueName: ""; ValueData: "SankoreFile"; Flags: uninsdeletevalue
...@@ -114,7 +113,7 @@ Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Righ ...@@ -114,7 +113,7 @@ Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Righ
Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppPath"; ValueData: "{app}"; Flags: uninsdeletevalue; Check: isProcessorX64 Root: HKLM64; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Low Rights\DragDrop\{{E63D17F8-D9DA-479D-B9B5-0D101A03703B}"; ValueType: string; ValueName: "AppPath"; ValueData: "{app}"; Flags: uninsdeletevalue; Check: isProcessorX64
[Run] [Run]
Filename: "{tmp}\vcredist_x86.exe";WorkingDir:"{tmp}" Filename: "{tmp}\vcredist_x86.exe";WorkingDir:"{tmp}"; Parameters: "/q:a/c:""VCREDI~3.EXE /q:a /c:""""msiexec /i vcredist.msi /qn"""""""; StatusMsg: Installing CRT ...
Filename: "{app}\Open-Sankore.exe"; Description: "{cm:LaunchProgram,Open-Sankore}"; Flags: nowait postinstall Filename: "{app}\Open-Sankore.exe"; Description: "{cm:LaunchProgram,Open-Sankore}"; Flags: nowait postinstall
[UninstallDelete] [UninstallDelete]
......
...@@ -309,6 +309,13 @@ macx { ...@@ -309,6 +309,13 @@ macx {
QMAKE_BUNDLE_DATA += TRANSLATION_pt QMAKE_BUNDLE_DATA += TRANSLATION_pt
} }
exists(resources/i18n/sankore_sk.qm) {
TRANSLATION_pt.files = resources/i18n/sankore_sk.qm \
resources/i18n/Localizable.strings
TRANSLATION_pt.path = "$$RESOURCES_DIR/sk.lproj"
QMAKE_BUNDLE_DATA += TRANSLATION_sk
}
QMAKE_BUNDLE_DATA += UB_ETC \ QMAKE_BUNDLE_DATA += UB_ETC \
UB_LIBRARY \ UB_LIBRARY \
UB_FONTS \ UB_FONTS \
...@@ -397,12 +404,11 @@ TRANSLATIONS = resources/i18n/sankore_en.ts \ ...@@ -397,12 +404,11 @@ TRANSLATIONS = resources/i18n/sankore_en.ts \
resources/i18n/sankore_ro.ts \ resources/i18n/sankore_ro.ts \
resources/i18n/sankore_ar.ts \ resources/i18n/sankore_ar.ts \
resources/i18n/sankore_iw.ts \ resources/i18n/sankore_iw.ts \
resources/i18n/sankore_pt.ts resources/i18n/sankore_pt.ts \
resources/i18n/sankore_sk.ts
INSTALLS = UB_ETC \ INSTALLS = UB_ETC \
UB_I18N \ UB_I18N \
UB_LIBRARY \ UB_LIBRARY \
UB_THIRDPARTY_INTERACTIVE UB_THIRDPARTY_INTERACTIVE
OTHER_FILES +=
...@@ -26,6 +26,9 @@ rm -rf install ...@@ -26,6 +26,9 @@ rm -rf install
QT_PATH="/usr/local/Trolltech/Qt-4.7.3" QT_PATH="/usr/local/Trolltech/Qt-4.7.3"
PLUGINS_PATH="$QT_PATH/plugins" PLUGINS_PATH="$QT_PATH/plugins"
QMAKE_PATH="$QT_PATH/bin/qmake" QMAKE_PATH="$QT_PATH/bin/qmake"
LRELEASES="/usr/local/Trolltech/Qt-4.7.3/bin/lrelease"
GUI_TRANSLATIONS_DIRECTORY_PATH="../Qt-sankore3.1/translations"
ARCHITECTURE=`uname -m`
if [ ! -e "$QMAKE_PATH" ]; then if [ ! -e "$QMAKE_PATH" ]; then
notifyError "qmake command not found at $QMAKE_PATH" notifyError "qmake command not found at $QMAKE_PATH"
...@@ -36,10 +39,14 @@ if [ ! -e "$PLUGINS_PATH" ]; then ...@@ -36,10 +39,14 @@ if [ ! -e "$PLUGINS_PATH" ]; then
fi fi
notify-send "Open-Sankore" "Building Open-Sankore ..." notify-send "Open-Sankore" "Building Open-Sankore ..."
$QMAKE_PATH -spec linux-g++
make -j 4 release-install if [ "$ARCHITECTURE" == "x86_64" ]; then
$QMAKE_PATH -spec linux-g++-64
else
$QMAKE_PATH -spec linux-g++
fi
make -j 4 release-install
notify-send "Git Hub" "Make a tag of the delivered version" notify-send "Git Hub" "Make a tag of the delivered version"
VERSION=`cat build/linux/release/version` VERSION=`cat build/linux/release/version`
...@@ -49,8 +56,8 @@ else ...@@ -49,8 +56,8 @@ else
LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`" LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`"
if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then
echo creating a tag with the version $VERSION echo creating a tag with the version $VERSION
# git tag -a "v$VERSION" -m "Generating setup for v$VERSION" git tag -a "v$VERSION" -m "Generating setup for v$VERSION"
# git push origin --tags git push origin --tags
fi fi
fi fi
...@@ -92,15 +99,31 @@ else ...@@ -92,15 +99,31 @@ else
cp "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4.4.0" "$QT_LIBRARY_DEST_PATH/" cp "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4.4.0" "$QT_LIBRARY_DEST_PATH/"
fi fi
notify-send "QT" "Internalization ..."
if [ ! -e $GUI_TRANSLATIONS_DIRECTORY_PATH ]; then
notifyError "gui translations pro file not found at: $GUI_TRANSLATIONS_DIRECTORY_PATH"
else
cd $GUI_TRANSLATIONS_DIRECTORY_PATH
$LRELEASES translations.pro
cd -
if [ ! -e build/linux/release/product/i18n ]; then
mkdir build/linux/release/product/i18n
fi
#copying qt gui translation
cp $GUI_TRANSLATIONS_DIRECTORY_PATH/qt_??.qm build/linux/release/product/i18n/
fi
$LRELEASES Sankore_3.1.pro
cp resources/i18n/*.qm build/linux/release/product/i18n/
rm -rf install/linux rm -rf install/linux
mkdir -p install/linux mkdir -p install/linux
#mv build/linux/release/product build/linux/release/Sankore.$VERSION
cd build/linux/release/product cd build/linux/release/product
#Removing .svn directories ... #Removing .svn directories ...
find . -name .svn -exec rm -rf {} \; 2> /dev/null find . -name .svn -exec rm -rf {} \; 2> /dev/null
#tar cvzf ../../../install/linux/Sankore\ 3.1.tar.gz Sankore_3.1.$VERSION -C .
cd - cd -
notify-send "Building Sankore" "Finished to build Sankore building the package" notify-send "Building Sankore" "Finished to build Sankore building the package"
...@@ -191,7 +214,6 @@ CHANGE_LOG_FILE="$BASE_WORKING_DIR/DEBIAN/changelog-sankore-$VERSION.txt" ...@@ -191,7 +214,6 @@ CHANGE_LOG_FILE="$BASE_WORKING_DIR/DEBIAN/changelog-sankore-$VERSION.txt"
CONTROL_FILE="$BASE_WORKING_DIR/DEBIAN/control" CONTROL_FILE="$BASE_WORKING_DIR/DEBIAN/control"
CHANGE_LOG_TEXT="changelog.txt" CHANGE_LOG_TEXT="changelog.txt"
ARCHITECTURE=`uname -m`
if [ "$ARCHITECTURE" == "x86_64" ]; then if [ "$ARCHITECTURE" == "x86_64" ]; then
ARCHITECTURE="amd64" ARCHITECTURE="amd64"
fi fi
......
...@@ -23,6 +23,8 @@ QT_PATH="/usr/local/Trolltech/Qt-4.7.3" ...@@ -23,6 +23,8 @@ QT_PATH="/usr/local/Trolltech/Qt-4.7.3"
PLUGINS_PATH="$QT_PATH/plugins" PLUGINS_PATH="$QT_PATH/plugins"
QMAKE_PATH="$QT_PATH/bin/qmake" QMAKE_PATH="$QT_PATH/bin/qmake"
LRELEASES="/usr/local/Trolltech/Qt-4.7.3/bin/lrelease" LRELEASES="/usr/local/Trolltech/Qt-4.7.3/bin/lrelease"
QT_GUI_TRANSLATIONS_DIRECTORY="../Qt-sankore3.1/translations"
QT_GUI_TRANSLATIONS_PRO_FILE="$QT_GUI_TRANSLATIONS_DIRECTORY/translations.pro"
if [ ! -e "$QMAKE_PATH" ]; then if [ ! -e "$QMAKE_PATH" ]; then
echo "qmake command not found at $QMAKE_PATH" echo "qmake command not found at $QMAKE_PATH"
...@@ -35,11 +37,22 @@ if [ ! -e "$PLUGINS_PATH" ]; then ...@@ -35,11 +37,22 @@ if [ ! -e "$PLUGINS_PATH" ]; then
exit 1 exit 1
fi fi
$QMAKE_PATH -spec linux-g++ ARCHITECTURE=`uname -m`
if [ "$ARCHITECTURE" == "x86_64" ]; then
$QMAKE_PATH -spec linux-g++-64
else
$QMAKE_PATH -spec linux-g++
fi
make -j 4 release-install make -j 4 release-install
$LRELEASES "Sankore_3.1.pro"
if [ ! -f $QT_GUI_TRANSLATIONS ]; then
echo "impossible to create and integrate the qt gui translation"
exit 1
else
$LRELEASES $QT_GUI_TRANSLATIONS_PRO_FILE
elif
VERSION=`cat build/linux/release/version` VERSION=`cat build/linux/release/version`
if [ ! -f build/linux/release/version ]; then if [ ! -f build/linux/release/version ]; then
...@@ -79,9 +92,6 @@ copyQtLibrary(){ ...@@ -79,9 +92,6 @@ copyQtLibrary(){
} }
cp "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4" "$QT_LIBRARY_DEST_PATH/"
cp "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4.4.0" "$QT_LIBRARY_DEST_PATH/"
copyQtLibrary libQtWebKit copyQtLibrary libQtWebKit
copyQtLibrary libQtDBus copyQtLibrary libQtDBus
copyQtLibrary libQtScript copyQtLibrary libQtScript
...@@ -92,8 +102,25 @@ copyQtLibrary libQtXml ...@@ -92,8 +102,25 @@ copyQtLibrary libQtXml
copyQtLibrary libQtGui copyQtLibrary libQtGui
copyQtLibrary libQtCore copyQtLibrary libQtCore
cp "$QT_LIBRARY_SOURCE_PATH/phonon.so.4" "$QT_LIBRARY_DEST_PATH/" cp "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4" "$QT_LIBRARY_DEST_PATH/"
cp "$QT_LIBRARY_SOURCE_PATH/phonon.so.4.4.0" "$QT_LIBRARY_DEST_PATH/" cp "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4.4.0" "$QT_LIBRARY_DEST_PATH/"
if [ ! -e $GUI_TRANSLATIONS_DIRECTORY_PATH ]; then
notifyError "gui translations pro file not found at: $GUI_TRANSLATIONS_DIRECTORY_PATH"
else
cd $GUI_TRANSLATIONS_DIRECTORY_PATH
$LRELEASES translations.pro
cd -
if [ ! -e build/linux/release/product/i18n ]; then
mkdir build/linux/release/product/i18n
fi
#copying qt gui translation
cp $GUI_TRANSLATIONS_DIRECTORY_PATH/qt_??.qm build/linux/release/product/i18n/
fi
$LRELEASES Sankore_3.1.pro
cp resources/i18n/*.qm build/linux/release/product/i18n/
rm -rf install/linux rm -rf install/linux
mkdir -p install/linux mkdir -p install/linux
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
BASE_TROLLTECH_DIRECTORY=/usr/local/Trolltech/Qt-4.7.3 BASE_TROLLTECH_DIRECTORY=/usr/local/Trolltech/Qt-4.7.3
# Executables # Executables
QMAKE=$BASE_TROLLTECH_DIRECTORY/bin/qmake QMAKE=$BASE_TROLLTECH_DIRECTORY/bin/qmake
...@@ -28,6 +29,7 @@ LRELEASE=$BASE_TROLLTECH_DIRECTORY/bin/lrelease ...@@ -28,6 +29,7 @@ LRELEASE=$BASE_TROLLTECH_DIRECTORY/bin/lrelease
# Directories # Directories
BUILD_DIR="build/macx/release" BUILD_DIR="build/macx/release"
PRODUCT_DIR="$BUILD_DIR/product" PRODUCT_DIR="$BUILD_DIR/product"
BASE_QT_TRANSLATIONS_DIRECTORY=../Qt-sankore3.1/translations
function notify { function notify {
GROWLNOTIFY=`which growlnotify` GROWLNOTIFY=`which growlnotify`
...@@ -52,6 +54,31 @@ function checkExecutable { ...@@ -52,6 +54,31 @@ function checkExecutable {
fi fi
} }
function addQtTranslations {
for eachTranslation in `ls $BASE_QT_TRANSLATIONS_DIRECTORY/qt_??.qm`
do
# looking fo the language code for each qt translation file
languageCode=`echo $eachTranslation | sed 's/.*qt_\(.*\).qm/\1/'`
basicDir=$PRODUCT_DIR/Open-Sankore.app/Contents/Resources/
for eachDirectory in `ls $basicDir`
do
# looping through the Sankore availables languages
directoryLanguageCode=`echo $eachDirectory | sed 's/\(.*\)\.lproj/\1/'`
if [ ! -z $directoryLanguageCode ]; then
if [[ $eachDirectory == *".lproj"* && $eachDirectory != "empty.lproj" && $directoryLanguageCode == *$languageCode* ]]; then
# sankore translation found for qt translation file
cp $eachTranslation $basicDir/$eachDirectory
if [ $directoryLanguageCode != $languageCode ]; then
# handling fr and fr_CH code.
mv $basicDir/$eachDirectory/qt_$languageCode.qm $basicDir/$eachDirectory/qt_$directoryLanguageCode.qm
fi
fi
fi
done
done
}
trap "defaults write com.mnemis.Uniboard.release Running -bool NO" EXIT trap "defaults write com.mnemis.Uniboard.release Running -bool NO" EXIT
notify "Running Uniboard release script (`date`)" notify "Running Uniboard release script (`date`)"
...@@ -88,8 +115,14 @@ $QMAKE_CMD ...@@ -88,8 +115,14 @@ $QMAKE_CMD
notify "Compiling ..." notify "Compiling ..."
make -j4 release make -j4 release
notify "Translations ..."
$LRELEASE "Sankore_3.1.pro" $LRELEASE "Sankore_3.1.pro"
addQtTranslations
notify "Tagging ..."
VERSION=`cat "$BUILD_DIR/version"` VERSION=`cat "$BUILD_DIR/version"`
if [ ! -f "$BUILD_DIR/version" ]; then if [ ! -f "$BUILD_DIR/version" ]; then
echo "version not found" echo "version not found"
...@@ -98,8 +131,8 @@ else ...@@ -98,8 +131,8 @@ else
LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`" LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`"
if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then
echo creating a tag with the version $VERSION echo creating a tag with the version $VERSION
git tag -a "v$VERSION" -m "Generated setup for v$VERSION" # git tag -a "v$VERSION" -m "Generated setup for v$VERSION"
git push origin --tags # git push origin --tags
fi fi
fi fi
......
...@@ -24,6 +24,7 @@ set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin ...@@ -24,6 +24,7 @@ set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe
set BUILD_DIR=build\win32\release set BUILD_DIR=build\win32\release
set LRELEASE=%QT_DIR%\bin\lrelease set LRELEASE=%QT_DIR%\bin\lrelease
set BASE_QT_TRANSLATIONS_DIRECTORY=%QT_DIR%\translations
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN% set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN%
...@@ -58,6 +59,8 @@ echo %LAST_TAG_VERSION% ...@@ -58,6 +59,8 @@ echo %LAST_TAG_VERSION%
REM if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR REM if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR
nmake release-install nmake release-install
copy %BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm build\win32\release\product\i18n\
del build\win32\release\product\i18n\qt_help*
del ".\build\win32\release\product\Sankore.pdb" del ".\build\win32\release\product\Sankore.pdb"
......
...@@ -24,6 +24,7 @@ set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin ...@@ -24,6 +24,7 @@ set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe
set BUILD_DIR=build\win32\release set BUILD_DIR=build\win32\release
set LRELEASE=%QT_DIR%\bin\lrelease set LRELEASE=%QT_DIR%\bin\lrelease
set BASE_QT_TRANSLATIONS_DIRECTORY=%QT_DIR%\translations
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN% set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN%
...@@ -36,7 +37,7 @@ REM is correct. This is important because installer ...@@ -36,7 +37,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-sankore3.1\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR IF NOT EXIST "..\Qt-sankore3.1\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR
REM rmdir /S /Q %BUILD_DIR% rmdir /S /Q %BUILD_DIR%
set EDITION=MNEMIS_EDITION set EDITION=MNEMIS_EDITION
...@@ -44,13 +45,13 @@ set EDITION=MNEMIS_EDITION ...@@ -44,13 +45,13 @@ set EDITION=MNEMIS_EDITION
%LRELEASE% Sankore_3.1.pro %LRELEASE% Sankore_3.1.pro
set /p VERSION= < build\win32\release\version REM set /p VERSION= < build\win32\release\version
git rev-list --tags --max-count=1 > tmp REM git rev-list --tags --max-count=1 > tmp
set /p LAST_TAG= < tmp REM set /p LAST_TAG= < tmp
erase tmp REM erase tmp
git describe %LAST_TAG% > tmp REM git describe %LAST_TAG% > tmp
set /p LAST_TAG_VERSION=< tmp REM set /p LAST_TAG_VERSION=< tmp
erase tmp REM erase tmp
echo %VERSION% echo %VERSION%
echo %LAST_TAG_VERSION% echo %LAST_TAG_VERSION%
...@@ -59,6 +60,10 @@ REM if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR ...@@ -59,6 +60,10 @@ REM if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR
nmake release-install nmake release-install
copy %BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm build\win32\release\product\i18n\
del build\win32\release\product\i18n\qt_help*
del ".\build\win32\release\product\Sankore.pdb" del ".\build\win32\release\product\Sankore.pdb"
set INSTALLER_NAME=Open-Sankore set INSTALLER_NAME=Open-Sankore
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -53,7 +53,6 @@ UBImportCFF::~UBImportCFF() ...@@ -53,7 +53,6 @@ UBImportCFF::~UBImportCFF()
QStringList UBImportCFF::supportedExtentions() QStringList UBImportCFF::supportedExtentions()
{ {
return QStringList("iwb"); return QStringList("iwb");
// return QStringList();
} }
......
...@@ -351,7 +351,6 @@ void UBBoardController::connectToolbar() ...@@ -351,7 +351,6 @@ void UBBoardController::connectToolbar()
connect(mMainWindow->actionEraseItems, SIGNAL(triggered()), this, SLOT(clearSceneItems())); connect(mMainWindow->actionEraseItems, SIGNAL(triggered()), this, SLOT(clearSceneItems()));
connect(mMainWindow->actionEraseAnnotations, SIGNAL(triggered()), this, SLOT(clearSceneAnnotation())); connect(mMainWindow->actionEraseAnnotations, SIGNAL(triggered()), this, SLOT(clearSceneAnnotation()));
//connect(mMainWindow->actionUndo, SIGNAL(triggered()), this, SLOT(stopScript()));
connect(mMainWindow->actionUndo, SIGNAL(triggered()), UBApplication::undoStack, SLOT(undo())); connect(mMainWindow->actionUndo, SIGNAL(triggered()), UBApplication::undoStack, SLOT(undo()));
connect(mMainWindow->actionRedo, SIGNAL(triggered()), UBApplication::undoStack, SLOT(redo())); connect(mMainWindow->actionRedo, SIGNAL(triggered()), UBApplication::undoStack, SLOT(redo()));
connect(mMainWindow->actionRedo, SIGNAL(triggered()), this, SLOT(startScript())); connect(mMainWindow->actionRedo, SIGNAL(triggered()), this, SLOT(startScript()));
...@@ -670,8 +669,6 @@ void UBBoardController::zoom(const qreal ratio, QPointF scenePoint) ...@@ -670,8 +669,6 @@ void UBBoardController::zoom(const qreal ratio, QPointF scenePoint)
void UBBoardController::handScroll(qreal dx, qreal dy) void UBBoardController::handScroll(qreal dx, qreal dy)
{ {
// mControlView->horizontalScrollBar()->setValue(mControlView->horizontalScrollBar()->value() - dx);
// mControlView->verticalScrollBar()->setValue(mControlView->verticalScrollBar()->value() - dy);
mControlView->translate(dx, dy); mControlView->translate(dx, dy);
UBApplication::applicationController->adjustDisplayView(); UBApplication::applicationController->adjustDisplayView();
......
...@@ -101,8 +101,10 @@ static OSStatus ub_appleEventProcessor(const AppleEvent *ae, AppleEvent *event, ...@@ -101,8 +101,10 @@ static OSStatus ub_appleEventProcessor(const AppleEvent *ae, AppleEvent *event,
#endif #endif
UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSingleApplication(id, argc, argv), UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSingleApplication(id, argc, argv)
mPreferencesController(NULL) , mPreferencesController(NULL)
, mApplicationTranslator(NULL)
, mQtGuiTranslator(NULL)
{ {
staticMemoryCleaner = new QObject(0); // deleted in UBApplication destructor staticMemoryCleaner = new QObject(0); // deleted in UBApplication destructor
...@@ -136,22 +138,20 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing ...@@ -136,22 +138,20 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
undoStack = new QUndoStack(staticMemoryCleaner); undoStack = new QUndoStack(staticMemoryCleaner);
} }
QTranslator *translator = new QTranslator(this); mApplicationTranslator = new QTranslator(this);
mApplicationTranslator->load(UBPlatformUtils::preferredTranslation(QString("sankore_")));
translator->load(UBPlatformUtils::preferredTranslation()); installTranslator(mApplicationTranslator);
installTranslator(translator);
QString localString; QString localString;
if (!mApplicationTranslator->isEmpty())
if (!translator->isEmpty())
{
localString = UBPlatformUtils::preferredLanguage(); localString = UBPlatformUtils::preferredLanguage();
}
else else
{
localString = "en_US"; localString = "en_US";
}
mQtGuiTranslator = new QTranslator(this);
mQtGuiTranslator->load(UBPlatformUtils::preferredTranslation(QString("qt_")));
installTranslator(mQtGuiTranslator);
QLocale::setDefault(QLocale(localString)); QLocale::setDefault(QLocale(localString));
qDebug() << "Running application in:" << localString; qDebug() << "Running application in:" << localString;
...@@ -203,6 +203,15 @@ UBApplication::~UBApplication() ...@@ -203,6 +203,15 @@ UBApplication::~UBApplication()
UBToolsManager::destroy(); UBToolsManager::destroy();
if(mApplicationTranslator != NULL){
delete mApplicationTranslator;
mApplicationTranslator = NULL;
}
if(mQtGuiTranslator!=NULL){
delete mQtGuiTranslator;
mQtGuiTranslator = NULL;
}
delete staticMemoryCleaner; delete staticMemoryCleaner;
staticMemoryCleaner = 0; staticMemoryCleaner = 0;
} }
...@@ -252,7 +261,7 @@ int UBApplication::exec(const QString& pFileToImport) ...@@ -252,7 +261,7 @@ int UBApplication::exec(const QString& pFileToImport)
boardController->paletteManager()->connectToDocumentController(); boardController->paletteManager()->connectToDocumentController();
UBDrawingController::drawingController()->setStylusTool((int)UBStylusTool::Selector); UBDrawingController::drawingController()->setStylusTool((int)UBStylusTool::Pen);
applicationController = new UBApplicationController(boardController->controlView(), boardController->displayView(), mainWindow, staticMemoryCleaner); applicationController = new UBApplicationController(boardController->controlView(), boardController->displayView(), mainWindow, staticMemoryCleaner);
...@@ -312,7 +321,8 @@ int UBApplication::exec(const QString& pFileToImport) ...@@ -312,7 +321,8 @@ int UBApplication::exec(const QString& pFileToImport)
#endif #endif
if (UBSettings::settings()->appStartMode->get() == "Desktop") if (UBSettings::settings()->appStartMode->get() == "Desktop")
applicationController->showDesktop(); applicationController->showDesktop();
else applicationController->showBoard(); else
applicationController->showBoard();
if (UBSettings::settings()->appIsInSoftwareUpdateProcess->get().toBool()) if (UBSettings::settings()->appIsInSoftwareUpdateProcess->get().toBool())
...@@ -533,16 +543,16 @@ void UBApplication::updateProtoActionsState() ...@@ -533,16 +543,16 @@ void UBApplication::updateProtoActionsState()
void UBApplication::insertSpaceToToolbarBeforeAction(QToolBar* toolbar, QAction* action, int width) void UBApplication::insertSpaceToToolbarBeforeAction(QToolBar* toolbar, QAction* action, int width)
{ {
QWidget* spacer = new QWidget(); QWidget* spacer = new QWidget();
QHBoxLayout *layout = new QHBoxLayout();
if (width >= 0) if (width >= 0){
QHBoxLayout *layout = new QHBoxLayout();
layout->addSpacing(width); layout->addSpacing(width);
spacer->setLayout(layout);
}
else else
layout->addStretch(); spacer->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
spacer->setLayout(layout);
toolbar->insertWidget(action, spacer); toolbar->insertWidget(action, spacer);
} }
......
...@@ -131,6 +131,8 @@ class UBApplication : public QtSingleApplication ...@@ -131,6 +131,8 @@ class UBApplication : public QtSingleApplication
#endif #endif
UBPreferencesController* mPreferencesController; UBPreferencesController* mPreferencesController;
QTranslator* mApplicationTranslator;
QTranslator* mQtGuiTranslator;
}; };
......
...@@ -173,6 +173,7 @@ void UBApplicationController::screenLayoutChanged() ...@@ -173,6 +173,7 @@ void UBApplicationController::screenLayoutChanged()
void UBApplicationController::adaptToolBar() void UBApplicationController::adaptToolBar()
{ {
bool highResolution = mMainWindow->width() > 1024; bool highResolution = mMainWindow->width() > 1024;
mMainWindow->actionClearPage->setVisible(Board == mMainMode && highResolution); mMainWindow->actionClearPage->setVisible(Board == mMainMode && highResolution);
mMainWindow->actionBoard->setVisible(Board != mMainMode || highResolution); mMainWindow->actionBoard->setVisible(Board != mMainMode || highResolution);
mMainWindow->actionDocument->setVisible(Document != mMainMode || highResolution); mMainWindow->actionDocument->setVisible(Document != mMainMode || highResolution);
......
...@@ -286,15 +286,7 @@ void UBPreferencesController::defaultSettings() ...@@ -286,15 +286,7 @@ void UBPreferencesController::defaultSettings()
if (mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->displayTab) if (mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->displayTab)
{ {
bool defaultValue = settings->webUseExternalBrowser->reset().toBool(); bool defaultValue = settings->appToolBarPositionedAtTop->reset().toBool();
mPreferencesUI->useExternalBrowserCheckBox->setChecked(defaultValue);
defaultValue = settings->webShowPageImmediatelyOnMirroredScreen->reset().toBool();
mPreferencesUI->displayBrowserPageCheckBox->setChecked(defaultValue);
mPreferencesUI->webHomePage->setText(settings->webHomePage->reset().toString());
defaultValue = settings->appToolBarPositionedAtTop->reset().toBool();
mPreferencesUI->toolbarAtTopRadioButton->setChecked(defaultValue); mPreferencesUI->toolbarAtTopRadioButton->setChecked(defaultValue);
mPreferencesUI->toolbarAtBottomRadioButton->setChecked(!defaultValue); mPreferencesUI->toolbarAtBottomRadioButton->setChecked(!defaultValue);
...@@ -350,6 +342,15 @@ void UBPreferencesController::defaultSettings() ...@@ -350,6 +342,15 @@ void UBPreferencesController::defaultSettings()
bool defaultValue = settings->appEnableAutomaticSoftwareUpdates->reset().toBool(); bool defaultValue = settings->appEnableAutomaticSoftwareUpdates->reset().toBool();
mPreferencesUI->checkSoftwareUpdateAtLaunchCheckBox->setChecked(defaultValue); mPreferencesUI->checkSoftwareUpdateAtLaunchCheckBox->setChecked(defaultValue);
} }
else if(mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->networkTab){
bool defaultValue = settings->webUseExternalBrowser->reset().toBool();
mPreferencesUI->useExternalBrowserCheckBox->setChecked(defaultValue);
defaultValue = settings->webShowPageImmediatelyOnMirroredScreen->reset().toBool();
mPreferencesUI->displayBrowserPageCheckBox->setChecked(defaultValue);
mPreferencesUI->webHomePage->setText(settings->webHomePage->reset().toString());
}
} }
......
...@@ -52,11 +52,9 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) ...@@ -52,11 +52,9 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
, mTransparentDrawingView(0) , mTransparentDrawingView(0)
, mTransparentDrawingScene(0) , mTransparentDrawingScene(0)
, mDesktopPalette(NULL) , mDesktopPalette(NULL)
// , mKeyboardPalette(0)
, mDesktopPenPalette(NULL) , mDesktopPenPalette(NULL)
, mDesktopMarkerPalette(NULL) , mDesktopMarkerPalette(NULL)
, mDesktopEraserPalette(NULL) , mDesktopEraserPalette(NULL)
// , mRightPalette(NULL)
, mWindowPositionInitialized(0) , mWindowPositionInitialized(0)
, mIsFullyTransparent(false) , mIsFullyTransparent(false)
, mDesktopToolsPalettePositioned(false) , mDesktopToolsPalettePositioned(false)
...@@ -90,27 +88,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) ...@@ -90,27 +88,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mTransparentDrawingView->setScene(mTransparentDrawingScene); mTransparentDrawingView->setScene(mTransparentDrawingScene);
mTransparentDrawingScene->setDrawingMode(true); mTransparentDrawingScene->setDrawingMode(true);
// mRightPalette = UBApplication::boardController->paletteManager()->createDesktopRightPalette(mTransparentDrawingView);
//mRightPalette = new UBRightPalette(mTransparentDrawingView);
mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView); mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView);
if (UBPlatformUtils::hasVirtualKeyboard()) if (UBPlatformUtils::hasVirtualKeyboard())
{ {
#ifdef Q_WS_X11
// mKeyboardPalette = UBKeyboardPalette::create(0);
// connect(mTransparentDrawingView, SIGNAL(hidden()), mKeyboardPalette, SLOT(hide()));
// connect(mTransparentDrawingView, SIGNAL(shown()), this, SLOT(showKeyboard()));
#else
// mKeyboardPalette = UBKeyboardPalette::create(mTransparentDrawingView);
// mKeyboardPalette->setParent(mTransparentDrawingView);
#endif
connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(bool)), connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(bool)),
mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool))); mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool)));
// connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)),
// mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool)));
#ifdef Q_WS_X11 #ifdef Q_WS_X11
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask())); connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask()));
connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask())); connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask()));
...@@ -124,8 +108,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) ...@@ -124,8 +108,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(screenCapture())); connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(screenCapture()));
connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized())); connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized()));
connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), this, SLOT(onDesktopPaletteMinimize())); connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), this, SLOT(onDesktopPaletteMinimize()));
// connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(showKeyboard(bool)));
connect(mTransparentDrawingView, SIGNAL(resized(QResizeEvent*)), this, SLOT(onTransparentWidgetResized())); connect(mTransparentDrawingView, SIGNAL(resized(QResizeEvent*)), this, SLOT(onTransparentWidgetResized()));
......
...@@ -103,7 +103,7 @@ class UBPlatformUtils ...@@ -103,7 +103,7 @@ class UBPlatformUtils
static void setFileType(const QString &filePath, unsigned long fileType); static void setFileType(const QString &filePath, unsigned long fileType);
static void fadeDisplayOut(); static void fadeDisplayOut();
static void fadeDisplayIn(); static void fadeDisplayIn();
static QString preferredTranslation(); static QString preferredTranslation(QString pFilePrefix);
static QString preferredLanguage(); static QString preferredLanguage();
static bool hasVirtualKeyboard(); static bool hasVirtualKeyboard();
//static void showVirtualKeyboard(); //static void showVirtualKeyboard();
......
...@@ -55,9 +55,9 @@ void UBPlatformUtils::fadeDisplayIn() ...@@ -55,9 +55,9 @@ void UBPlatformUtils::fadeDisplayIn()
// NOOP // NOOP
} }
QString UBPlatformUtils::preferredTranslation() QString UBPlatformUtils::preferredTranslation(QString pFilePrefix)
{ {
QString qmPath = applicationResourcesDirectory() + "/" + "i18n" + "/" + QString("sankore_") + preferredLanguage() + ".qm"; QString qmPath = applicationResourcesDirectory() + "/" + "i18n" + "/" + pFilePrefix + preferredLanguage() + ".qm";
return qmPath; return qmPath;
} }
......
...@@ -182,9 +182,10 @@ void UBPlatformUtils::fadeDisplayIn() ...@@ -182,9 +182,10 @@ void UBPlatformUtils::fadeDisplayIn()
} }
} }
QString UBPlatformUtils::preferredTranslation() QString UBPlatformUtils::preferredTranslation(QString pFilePrefix)
{ {
QString qmPath; QString qmPath;
NSString* filePrefix = [[NSString alloc] initWithUTF8String:(const char*)(pFilePrefix.toUtf8())];
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
...@@ -192,7 +193,7 @@ QString UBPlatformUtils::preferredTranslation() ...@@ -192,7 +193,7 @@ QString UBPlatformUtils::preferredTranslation()
if (lprojPath) if (lprojPath)
{ {
NSString *lang = [[lprojPath lastPathComponent] stringByDeletingPathExtension]; NSString *lang = [[lprojPath lastPathComponent] stringByDeletingPathExtension];
NSString *translationFilePath = [lprojPath stringByAppendingPathComponent:[[@"sankore_" stringByAppendingString:lang] stringByAppendingPathExtension:@"qm"]]; NSString *translationFilePath = [lprojPath stringByAppendingPathComponent:[[filePrefix stringByAppendingString:lang] stringByAppendingPathExtension:@"qm"]];
qmPath = QString::fromUtf8([translationFilePath UTF8String], strlen([translationFilePath UTF8String])); qmPath = QString::fromUtf8([translationFilePath UTF8String], strlen([translationFilePath UTF8String]));
} }
...@@ -202,7 +203,7 @@ QString UBPlatformUtils::preferredTranslation() ...@@ -202,7 +203,7 @@ QString UBPlatformUtils::preferredTranslation()
QString UBPlatformUtils::preferredLanguage() QString UBPlatformUtils::preferredLanguage()
{ {
QFileInfo qmFileInfo = QFileInfo(preferredTranslation()); QFileInfo qmFileInfo = QFileInfo(preferredTranslation("sankore_"));
QDir lprojPath = qmFileInfo.dir(); QDir lprojPath = qmFileInfo.dir();
QFileInfo lprojFileInfo = QFileInfo(lprojPath.absolutePath()); QFileInfo lprojFileInfo = QFileInfo(lprojPath.absolutePath());
return lprojFileInfo.baseName(); return lprojFileInfo.baseName();
......
...@@ -324,6 +324,7 @@ void UBDockPalette::toggleCollapseExpand() ...@@ -324,6 +324,7 @@ void UBDockPalette::toggleCollapseExpand()
{ {
// The palette must be collapsed // The palette must be collapsed
mLastWidth = width(); mLastWidth = width();
update();
resize(0, height()); resize(0, height());
} }
else else
...@@ -702,6 +703,7 @@ void UBTabDockPalette::mouseMoveEvent(QMouseEvent *event) ...@@ -702,6 +703,7 @@ void UBTabDockPalette::mouseMoveEvent(QMouseEvent *event)
case eUBDockOrientation_Left: case eUBDockOrientation_Left:
p.setX(p.x() + dock->width()); p.setX(p.x() + dock->width());
if(p.x() < dock->collapseWidth() && p.x() >= dock->minimumWidth()) { if(p.x() < dock->collapseWidth() && p.x() >= dock->minimumWidth()) {
dock->update();
dock->resize(0, dock->height()); dock->resize(0, dock->height());
dock->mLastWidth = dock->collapseWidth() + 1; dock->mLastWidth = dock->collapseWidth() + 1;
dock->mResized = true; dock->mResized = true;
...@@ -714,6 +716,7 @@ void UBTabDockPalette::mouseMoveEvent(QMouseEvent *event) ...@@ -714,6 +716,7 @@ void UBTabDockPalette::mouseMoveEvent(QMouseEvent *event)
case eUBDockOrientation_Right: case eUBDockOrientation_Right:
p.setX(p.x() - 2 * dock->border()); p.setX(p.x() - 2 * dock->border());
if((dock->x() + p.x() > dock->parentWidget()->width() - dock->collapseWidth()) && (dock->x() + p.x() < dock->parentWidget()->width())) { if((dock->x() + p.x() > dock->parentWidget()->width() - dock->collapseWidth()) && (dock->x() + p.x() < dock->parentWidget()->width())) {
dock->update();
dock->resize(0, dock->height()); dock->resize(0, dock->height());
dock->mLastWidth = dock->collapseWidth() + 1; dock->mLastWidth = dock->collapseWidth() + 1;
dock->mResized = true; dock->mResized = true;
......
...@@ -115,7 +115,7 @@ void UBKeyboardPalette::createCtrlButtons() ...@@ -115,7 +115,7 @@ void UBKeyboardPalette::createCtrlButtons()
ctrlButtons[0] = new UBCntrlButton(this, "<-", XK_BackSpace); ctrlButtons[0] = new UBCntrlButton(this, "<-", XK_BackSpace);
ctrlButtons[1] = new UBCntrlButton(this, "<->", XK_Tab); ctrlButtons[1] = new UBCntrlButton(this, "<->", XK_Tab);
ctrlButtons[2] = new UBCntrlButton(this, "Enter", XK_Return); ctrlButtons[2] = new UBCntrlButton(this, tr("Enter"), XK_Return);
ctrlButtons[3] = new UBCapsLockButton(this, "capslock"); ctrlButtons[3] = new UBCapsLockButton(this, "capslock");
ctrlButtons[4] = new UBCapsLockButton(this, "capslock"); ctrlButtons[4] = new UBCapsLockButton(this, "capslock");
ctrlButtons[5] = new UBLocaleButton(this); ctrlButtons[5] = new UBLocaleButton(this);
......
...@@ -50,7 +50,7 @@ void UBKeyboardPalette::createCtrlButtons() ...@@ -50,7 +50,7 @@ void UBKeyboardPalette::createCtrlButtons()
ctrlButtons[0] = new UBCntrlButton(this, "<-", 51); ctrlButtons[0] = new UBCntrlButton(this, "<-", 51);
ctrlButtons[1] = new UBCntrlButton(this, "<->", 48); ctrlButtons[1] = new UBCntrlButton(this, "<->", 48);
ctrlButtons[2] = new UBCntrlButton(this, "Enter", 76); ctrlButtons[2] = new UBCntrlButton(this, tr("Enter"), 76);
ctrlButtons[3] = new UBCapsLockButton(this, "capslock"); ctrlButtons[3] = new UBCapsLockButton(this, "capslock");
ctrlButtons[4] = new UBCapsLockButton(this, "capslock"); ctrlButtons[4] = new UBCapsLockButton(this, "capslock");
ctrlButtons[5] = new UBLocaleButton(this); ctrlButtons[5] = new UBLocaleButton(this);
......
...@@ -59,7 +59,7 @@ void UBKeyboardPalette::createCtrlButtons() ...@@ -59,7 +59,7 @@ void UBKeyboardPalette::createCtrlButtons()
ctrlButtons[ctrlID++] = new UBCntrlButton(this, 0x09, "tab"); // Tab ctrlButtons[ctrlID++] = new UBCntrlButton(this, 0x09, "tab"); // Tab
// ctrlButtons[ctrlID++] = new UBKeyButton(this); // Row 2 Stub // ctrlButtons[ctrlID++] = new UBKeyButton(this); // Row 2 Stub
// ctrlButtons[ctrlID++] = new UBKeyButton(this); // Row 3 Stub // ctrlButtons[ctrlID++] = new UBKeyButton(this); // Row 3 Stub
ctrlButtons[ctrlID++] = new UBCntrlButton(this, "Enter", 0x0d); // Enter ctrlButtons[ctrlID++] = new UBCntrlButton(this, tr("Enter"), 0x0d); // Enter
ctrlButtons[ctrlID++] = new UBCapsLockButton(this, "capslock"); // Caps Lock ctrlButtons[ctrlID++] = new UBCapsLockButton(this, "capslock"); // Caps Lock
ctrlButtons[ctrlID++] = new UBCapsLockButton(this, "capslock"); // Caps Lock ctrlButtons[ctrlID++] = new UBCapsLockButton(this, "capslock"); // Caps Lock
ctrlButtons[ctrlID++] = new UBLocaleButton(this); // Language Switch ctrlButtons[ctrlID++] = new UBLocaleButton(this); // Language Switch
......
...@@ -128,9 +128,7 @@ void UBWebController::webBrowserInstance() ...@@ -128,9 +128,7 @@ void UBWebController::webBrowserInstance()
WBBrowserWindow::downloadManager()->setParent((*mCurrentWebBrowser), Qt::Tool); WBBrowserWindow::downloadManager()->setParent((*mCurrentWebBrowser), Qt::Tool);
UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->webToolBar, UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->webToolBar, mMainWindow->actionBoard, 32);
mMainWindow->actionBoard, 32);
UBApplication::app()->decorateActionMenu(mMainWindow->actionMenu); UBApplication::app()->decorateActionMenu(mMainWindow->actionMenu);
bool showAddBookmarkButtons = UBSettings::settings()->webShowAddBookmarkButton->get().toBool(); bool showAddBookmarkButtons = UBSettings::settings()->webShowAddBookmarkButton->get().toBool();
...@@ -151,8 +149,6 @@ void UBWebController::webBrowserInstance() ...@@ -151,8 +149,6 @@ void UBWebController::webBrowserInstance()
(*mCurrentWebBrowser)->tabWidget()->tabBar()->show(); (*mCurrentWebBrowser)->tabWidget()->tabBar()->show();
(*mCurrentWebBrowser)->tabWidget()->lineEdits()->show(); (*mCurrentWebBrowser)->tabWidget()->lineEdits()->show();
// (*mCurrentWebBrowser)->tabWidget()->tabBar()->hide();
// (*mCurrentWebBrowser)->tabWidget()->lineEdits()->hide();
} }
UBApplication::applicationController->setMirrorSourceWidget((*mCurrentWebBrowser)->paintWidget()); UBApplication::applicationController->setMirrorSourceWidget((*mCurrentWebBrowser)->paintWidget());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment