Commit ff6fbd52 authored by unknown's avatar unknown

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

parents 483520cf 16388311
......@@ -50,3 +50,8 @@ Thumbs.db
###############
build
install
# Translation files #
#####################
*.qm
......@@ -433,6 +433,8 @@
<dict>
<key>Path</key>
<string></string>
<key>Path Type</key>
<integer>2</integer>
<key>Status</key>
<false/>
</dict>
......
......@@ -166,7 +166,7 @@ macx {
UB_THIRDPARTY_INTERACTIVE.path = "$$RESOURCES_DIR/library/interactive"
UB_MACX_ICNS.files = $$files(resources/macx/*.icns)
UB_MACX_ICNS.path = "$$RESOURCES_DIR"
UB_MACX_EXTRAS.files = "resources/macx/Save PDF to Uniboard.workflow"
UB_MACX_EXTRAS.files = "resources/macx/Save PDF to Open-Sankore.workflow"
UB_MACX_EXTRAS.path = "$$RESOURCES_DIR"
UB_I18N.path = $$DESTDIR/i18n # not used
......
#!/bin/bash
# --------------------------------------------------------------------
# This program 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, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
notifyError(){
notify-send -t 0 "Error occoured" "An error occours during the sankore build:\n\t$1" -i /usr/share/icons/oxygen/64x64/status/dialog-error.png
exit 1
}
rm -rf "build/linux/release"
rm -rf install
QT_PATH="/usr/local/Trolltech/Qt-4.7.3"
PLUGINS_PATH="$QT_PATH/plugins"
QMAKE_PATH="$QT_PATH/bin/qmake"
if [ ! -e "$QMAKE_PATH" ]; then
notifyError "qmake command not found at $QMAKE_PATH"
fi
if [ ! -e "$PLUGINS_PATH" ]; then
notifyError "plugins path not found at $PLUGINS_PATH"
fi
notify-send "Open-Sankore" "Building Open-Sankore ..."
$QMAKE_PATH -spec linux-g++
make -j 4 release-install
notify-send "Git Hub" "Make a tag of the delivered version"
VERSION=`cat build/linux/release/version`
if [ ! -f build/linux/release/version ]; then
notifyError "version not found"
else
LAST_COMMITED_VERSION="`git describe $(git rev-list --tags --max-count=1)`"
if [ "v$VERSION" != "$LAST_COMMITED_VERSION" ]; then
echo creating a tag with the version $VERSION
# git tag -a "v$VERSION" -m "Generating setup for v$VERSION"
# git push origin --tags
fi
fi
cp resources/linux/run.sh build/linux/release/product
chmod +x build/linux/release/product/run.sh
cp -R resources/linux/qtlinux/* build/linux/release/product/
notify-send "QT" "Coping plugins and library ..."
cp -R $PLUGINS_PATH build/linux/release/product/
#copying custom qt library
QT_LIBRARY_DEST_PATH="build/linux/release/product/qtlib"
mkdir $QT_LIBRARY_DEST_PATH
QT_LIBRARY_SOURCE_PATH="$QT_PATH/lib"
copyQtLibrary(){
if [ ! -e "$QT_LIBRARY_SOURCE_PATH/$1.so.4.7.3" ]; then
notifyError "$1 library not found in path: $QT_LIBRARY_SOURCE_PATH"
fi
cp "$QT_LIBRARY_SOURCE_PATH/$1.so.4" "$QT_LIBRARY_DEST_PATH/"
cp "$QT_LIBRARY_SOURCE_PATH/$1.so.4.7.3" "$QT_LIBRARY_DEST_PATH/"
}
copyQtLibrary libQtWebKit
copyQtLibrary libQtDBus
copyQtLibrary libQtScript
copyQtLibrary libQtSvg
copyQtLibrary libQtXmlPatterns
copyQtLibrary libQtNetwork
copyQtLibrary libQtXml
copyQtLibrary libQtGui
copyQtLibrary libQtCore
if [ ! -e "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4.4.0" ]; then
notifyError "phonon library not found in path: $QT_LIBRARY_SOURCE_PATH"
else
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/"
fi
rm -rf install/linux
mkdir -p install/linux
#mv build/linux/release/product build/linux/release/Sankore.$VERSION
cd build/linux/release/product
#Removing .svn directories ...
find . -name .svn -exec rm -rf {} \; 2> /dev/null
#tar cvzf ../../../install/linux/Sankore\ 3.1.tar.gz Sankore_3.1.$VERSION -C .
cd -
notify-send "Building Sankore" "Finished to build Sankore building the package"
BASE_WORKING_DIR="packageBuildDir"
#creating package directory
mkdir $BASE_WORKING_DIR
mkdir "$BASE_WORKING_DIR/DEBIAN"
mkdir -p "$BASE_WORKING_DIR/usr/share/applications"
mkdir -p "$BASE_WORKING_DIR/usr/local"
cat > "$BASE_WORKING_DIR/DEBIAN/prerm" << EOF
#!/bin/bash
# --------------------------------------------------------------------
# This program 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, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
xdg-desktop-menu uninstall /usr/share/applications/Open-Sankore.desktop
exit 0
#DEBHELPER#
EOF
cat > "$BASE_WORKING_DIR/DEBIAN/postint" << EOF
#!/bin/bash
# --------------------------------------------------------------------
# This program 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, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
xdg-desktop-menu install --novendor /usr/share/applications/Open-Sankore.desktop
exit 0
#DEBHELPER#
EOF
SANKORE_DIRECTORY_NAME="Open-Sankore-$VERSION"
SANKORE_PACKAGE_DIRECTORY="$BASE_WORKING_DIR/usr/local/$SANKORE_DIRECTORY_NAME"
#move sankore build directory to packages directory
cp -R build/linux/release/product $SANKORE_PACKAGE_DIRECTORY
cat > $BASE_WORKING_DIR/usr/local/$SANKORE_DIRECTORY_NAME/run.sh << EOF
!/bin/bash
# --------------------------------------------------------------------
# This program 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, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
env LD_LIBRARY_PATH=/usr/local/$SANKORE_DIRECTORY_NAME/qtlib:$LD_LIBRARY_PATH /usr/local/$SANKORE_DIRECTORY_NAME/Open-Sankore
EOF
CHANGE_LOG_FILE="$BASE_WORKING_DIR/DEBIAN/changelog-sankore-$VERSION.txt"
CONTROL_FILE="$BASE_WORKING_DIR/DEBIAN/control"
CHANGE_LOG_TEXT="changelog.txt"
ARCHITECTURE=`uname -i`
echo "Open-Sankore ($VERSION) $ARCHITECTURE; urgency=low" > "$CHANGE_LOG_FILE"
echo >> "$CHANGE_LOG_FILE"
cat $CHANGE_LOG_TEXT >> "$CHANGE_LOG_FILE"
echo >> "$CHANGE_LOG_FILE"
echo "-- Claudio Valerio <claudio@open-sankore.org> `date`" >> "$CHANGE_LOG_FILE"
echo "Package: open-sankore" > "$CONTROL_FILE"
echo "Version: $VERSION" >> "$CONTROL_FILE"
echo "Section: education" >> "$CONTROL_FILE"
echo "Priority: optional" >> "$CONTROL_FILE"
echo "Architecture: $ARCHITECTURE" >> "$CONTROL_FILE"
echo "Essential: no" >> "$CONTROL_FILE"
echo "Installed-Size: `du -s $SANKORE_PACKAGE_DIRECTORY | awk '{ print $1 }'`" >> "$CONTROL_FILE"
echo "Maintainer: Claudio VALERIO <claudio@open-sankore.org>" >> "$CONTROL_FILE"
echo "Homepage: http://www.open-sankore.org" >> "$CONTROL_FILE"
echo -n "Depends: " >> "$CONTROL_FILE"
unset tab
declare -a tab
let count=0
for l in `objdump -p $SANKORE_PACKAGE_DIRECTORY/Open-Sankore | grep NEEDED | awk '{ print $2 }'`; do
for lib in `dpkg -S $l | awk -F":" '{ print $1 }'`; do
#echo $lib
presence=`echo ${tab[*]} | grep -c "$lib"`;
if [ "$presence" == "0" ]; then
tab[$count]=$lib;
((count++));
fi;
done;
done;
for ((i=0;i<${#tab[@]};i++)); do
if [ $i -ne "0" ]; then
echo -n ", " >> "$CONTROL_FILE"
fi
echo -n "${tab[$i]} (>= "`dpkg -p ${tab[$i]} | grep "Version: " | awk '{ print $2 }'`") " >> "$CONTROL_FILE"
done
echo "" >> "$CONTROL_FILE"
echo "Description: This a interactive white board that uses a free standard format." >> "$CONTROL_FILE"
find $BASE_WORKING_DIR/usr/ -exec md5sum {} > $BASE_WORKING_DIR/DEBIAN/md5sums 2>/dev/null \;
SANKORE_SHORTCUT="$BASE_WORKING_DIR/usr/share/applications/Open-Sankore.desktop"
echo "[Desktop Entry]" > $SANKORE_SHORTCUT
echo "Version=$VERSION" >> $SANKORE_SHORTCUT
echo "Encoding=UTF-8" >> $SANKORE_SHORTCUT
echo "Name=Open-Sankore ($VERSION)" >> $SANKORE_SHORTCUT
echo "GenericName=Open-Sankore" >> $SANKORE_SHORTCUT
echo "Comment=Logiciel de création de présentations pour tableau numérique interactif (TNI)" >> $SANKORE_SHORTCUT
echo "Exec=/usr/local/$SANKORE_DIRECTORY_NAME/run.sh" >> $SANKORE_SHORTCUT
echo "Icon=/usr/local/$SANKORE_DIRECTORY_NAME/sankore.png" >> $SANKORE_SHORTCUT
echo "StartupNotify=true" >> $SANKORE_SHORTCUT
echo "Terminal=false" >> $SANKORE_SHORTCUT
echo "Type=Application" >> $SANKORE_SHORTCUT
echo "Categories=Education" >> $SANKORE_SHORTCUT
echo "Name[fr_FR]=Open-Sankore ($VERSION)" >> $SANKORE_SHORTCUT
cp "resources/images/uniboard.png" "$SANKORE_PACKAGE_DIRECTORY/sankore.png"
chmod 755 "$BASE_WORKING_DIR/DEBIAN"
chmod 755 "$BASE_WORKING_DIR/DEBIAN/prerm"
chmod 755 "$BASE_WORKING_DIR/DEBIAN/postint"
mkdir -p "install/linux"
sudo chown -R root:root $BASE_WORKING_DIR
dpkg -b "$BASE_WORKING_DIR" install/linux/Open-Sankore_${VERSION}_$ARCHITECTURE.deb
notify-send "Open-Sankore" "Package built"
#clean up mess
#sudo rm -rf $BASE_WORKING_DIR
......@@ -22,6 +22,7 @@ rm -rf install
QT_PATH="/usr/local/Trolltech/Qt-4.7.3"
PLUGINS_PATH="$QT_PATH/plugins"
QMAKE_PATH="$QT_PATH/bin/qmake"
LRELEASES="/usr/local/Trolltech/Qt-4.7.3/bin/lrelease"
if [ ! -e "$QMAKE_PATH" ]; then
echo "qmake command not found at $QMAKE_PATH"
......@@ -38,6 +39,8 @@ $QMAKE_PATH -spec linux-g++
make -j 4 release-install
$LRELEASES "Sankore_3.1.pro"
VERSION=`cat build/linux/release/version`
if [ ! -f build/linux/release/version ]; then
echo "version not found"
......
......@@ -14,14 +14,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
BASE_TROLLTECH_DIRECTORY=/usr/local/Trolltech/Qt-4.7.3
# Executables
QMAKE="/usr/local/Trolltech/Qt-4.7.3/bin/qmake"
MACDEPLOYQT=/usr/local/Trolltech/Qt-4.7.3/bin/macdeployqt
QMAKE=$BASE_TROLLTECH_DIRECTORY/bin/qmake
MACDEPLOYQT=$BASE_TROLLTECH_DIRECTORY/bin/macdeployqt
DMGUTIL="`pwd`/../Sankore-ThirdParty/refnum/dmgutil/dmgutil.pl"
DSYMUTIL=/usr/bin/dsymutil
STRIP=/usr/bin/strip
PLISTBUDDY=/usr/libexec/PlistBuddy
ICEBERG=/usr/local/bin/freeze
LRELEASE=$BASE_TROLLTECH_DIRECTORY/bin/lrelease
# Directories
BUILD_DIR="build/macx/release"
......@@ -69,7 +71,7 @@ checkExecutable "$DSYMUTIL"
checkExecutable "$STRIP"
checkExecutable "$PLISTBUDDY"
checkExecutable "$ICEBERG"
checkExecutable "$LRELEASE"
# delete the build directory
notify "Cleaning ..."
......@@ -86,6 +88,8 @@ $QMAKE_CMD
notify "Compiling ..."
make -j4 release
$LRELEASE "Sankore_3.1.pro"
VERSION=`cat "$BUILD_DIR/version"`
if [ ! -f "$BUILD_DIR/version" ]; then
echo "version not found"
......@@ -99,9 +103,9 @@ else
fi
fi
#if [ $? != 0 ]; then
# abort "compilation failed"
#fi
if [ $? != 0 ]; then
abort "compilation failed"
fi
NAME="Open-Sankore"
......@@ -135,7 +139,10 @@ $DSYMUTIL "$APP/Contents/MacOS/Open-Sankore" -o "$DSYM"
$STRIP -S "$APP/Contents/MacOS/Open-Sankore"
if [ "$1" == "pkg" ]; then
ICEBERG_CONFIG_FILE="Open-Sankore.packproj"
BASE_ICEBERG_CONFIG_FILE="Open-Sankore.packproj"
#copy the standard file for working with
ICEBERG_CONFIG_FILE="Open-Sankore-working.packproj"
cp -r $BASE_ICEBERG_CONFIG_FILE $ICEBERG_CONFIG_FILE
# set version information
$PLISTBUDDY -c "Set :Hierarchy:Attributes:Settings:Description:International:IFPkgDescriptionVersion $VERSION" "$ICEBERG_CONFIG_FILE"
$PLISTBUDDY -c "Set :Hierarchy:Attributes:Settings:Display\ Information:CFBundleShortVersionString $VERSION" "$ICEBERG_CONFIG_FILE"
......@@ -149,6 +156,10 @@ if [ "$1" == "pkg" ]; then
mkdir -p "${PRODUCT_DIR}"
fi
$ICEBERG $ICEBERG_CONFIG_FILE
#clean up mess
rm -rf $ICEBERG_CONFIG_FILE
exit 0
fi
......
......@@ -23,6 +23,7 @@ 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 INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe
set BUILD_DIR=build\win32\release
set LRELEASE=%QT_DIR%\bin\lrelease
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN%
......@@ -41,6 +42,8 @@ set EDITION=MNEMIS_EDITION
"%QT_BIN%\qmake.exe" "DEFINES+=%EDITION%"
%LRELEASE% Sankore_3.1.pro
set /p VERSION= < build\win32\release\version
git rev-list --tags --max-count=1 > tmp
set /p LAST_TAG= < tmp
......
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.
......@@ -55,7 +55,7 @@
<key>CFBundleIconFile</key>
<string>Uniboard.icns</string>
<key>CFBundleIdentifier</key>
<string>com.sankore.open-sankore</string>
<string>org.eduxia.open-sankore</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
......
......@@ -3,16 +3,16 @@
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>com.mnemis.pdfworkflow.savepdftouniboard</string>
<string>com.eduxia.pdfworkflow.savepdftoopensankore</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Save PDF to Uniboard</string>
<string>Save PDF to Open-Sankoré</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>UniB</string>
<string>EduX</string>
</dict>
</plist>
......@@ -55,7 +55,7 @@
<key>ActionParameters</key>
<dict>
<key>COMMAND_STRING</key>
<string>open -b com.mnemis.Uniboard "$1"</string>
<string>open -b org.eduxia.open-sankore "$1"</string>
<key>CheckedForUserDefaultShell</key>
<true/>
<key>inputMethod</key>
......
Binary files a/resources/macx/Save PDF to Uniboard.workflow/Contents/Resources/Spanish.lproj/InfoPlist.strings and /dev/null differ
Binary files a/resources/macx/Save PDF to Uniboard.workflow/Contents/Resources/fi.lproj/InfoPlist.strings and /dev/null differ
Binary files a/resources/macx/Save PDF to Uniboard.workflow/Contents/Resources/no.lproj/InfoPlist.strings and /dev/null differ
Binary files a/resources/macx/Save PDF to Uniboard.workflow/Contents/Resources/pt.lproj/InfoPlist.strings and /dev/null differ
Binary files a/resources/macx/Save PDF to Uniboard.workflow/Contents/Resources/sv.lproj/InfoPlist.strings and /dev/null differ
Binary files a/resources/macx/Save PDF to Uniboard.workflow/Contents/Resources/zh_CN.lproj/InfoPlist.strings and /dev/null differ
Binary files a/resources/macx/Save PDF to Uniboard.workflow/Contents/Resources/zh_TW.lproj/InfoPlist.strings and /dev/null differ
......@@ -63,11 +63,6 @@ UBDocumentPublisher::UBDocumentPublisher(UBDocumentProxy* pDocument, QObject *pa
UBDocumentPublisher::~UBDocumentPublisher()
{
if(mSourceDocument){
delete mSourceDocument;
mSourceDocument = NULL;
}
if(mPublishingDocument){
delete mPublishingDocument;
mPublishingDocument = NULL;
......
......@@ -554,7 +554,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
{
QRect rubberRect = mRubberBand->geometry ();
UBGraphicsTextItem* textItem = scene ()->addText ("", mapToScene (rubberRect.topLeft ()));
UBGraphicsTextItem* textItem = scene()->addTextHtml ("", mapToScene (rubberRect.topLeft ()));
event->accept ();
UBDrawingController::drawingController ()->setStylusTool (UBStylusTool::Selector);
......
......@@ -1321,7 +1321,7 @@ UBGraphicsTextItem* UBGraphicsScene::addTextWithFont(const QString& pString, con
return textItem;
}
UBGraphicsTextItem *UBGraphicsScene::addTextHtml(const QString &pString)
UBGraphicsTextItem *UBGraphicsScene::addTextHtml(const QString &pString, const QPointF& pTopLeft)
{
UBGraphicsTextItem *textItem = new UBGraphicsTextItem();
textItem->setPlainText("");
......@@ -1341,6 +1341,7 @@ UBGraphicsTextItem *UBGraphicsScene::addTextHtml(const QString &pString)
textItem->setFocus();
setDocumentUpdated();
textItem->setPos(pTopLeft);
return textItem;
}
......@@ -1356,7 +1357,6 @@ void UBGraphicsScene::addItem(QGraphicsItem* item)
mFastAccessItems << item;
}
void UBGraphicsScene::addItems(const QSet<QGraphicsItem*>& items)
{
setModified(true);
......@@ -1369,7 +1369,6 @@ void UBGraphicsScene::addItems(const QSet<QGraphicsItem*>& items)
mFastAccessItems += items.toList();
}
void UBGraphicsScene::removeItem(QGraphicsItem* item)
{
setModified(true);
......@@ -1427,7 +1426,6 @@ QGraphicsItem* UBGraphicsScene::setAsBackgroundObject(QGraphicsItem* item, bool
item->setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::FixedBackground);
item->setZValue(backgroundLayerStart);
UBApplication::showMessage("ZValue of the background is " + QString::number(item->zValue(), 'f'));
if (pAdaptTransformation)
{
......
......@@ -89,9 +89,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
UBGraphicsSvgItem* addSvg(const QUrl& pSvgFileUrl, const QPointF& pPos = QPointF(0, 0));
UBGraphicsTextItem* addText(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0));
UBGraphicsTextItem* addTextWithFont(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0)
UBGraphicsTextItem* addTextWithFont(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0)
, int pointSize = -1, const QString& fontFamily = "", bool bold = false, bool italic = false);
UBGraphicsTextItem* addTextHtml(const QString &pString = QString());
UBGraphicsTextItem* addTextHtml(const QString &pString = QString(), const QPointF& pTopLeft = QPointF(0, 0));
UBGraphicsW3CWidgetItem* addOEmbed(const QUrl& pContentUrl, const QPointF& pPos = QPointF(0, 0));
......
......@@ -203,7 +203,7 @@ UBItem* UBGraphicsTextItem::deepCopy() const
{
UBGraphicsTextItem* copy = new UBGraphicsTextItem();
copy->setPlainText(this->toPlainText());
copy->setHtml(toHtml());
copy->setPos(this->pos());
copy->setZValue(this->zValue());
copy->setTransform(this->transform());
......@@ -211,10 +211,11 @@ UBItem* UBGraphicsTextItem::deepCopy() const
copy->setFlag(QGraphicsItem::ItemIsSelectable, true);
copy->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
copy->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
copy->setDefaultTextColor(this->defaultTextColor());
copy->setFont(this->font());
copy->setColorOnDarkBackground(this->colorOnDarkBackground());
copy->setColorOnLightBackground(this->colorOnLightBackground());
copy->setData(UBGraphicsItemData::ItemEditable, data(UBGraphicsItemData::ItemEditable).toBool());
// copy->setDefaultTextColor(this->defaultTextColor());
// copy->setFont(this->font());
// copy->setColorOnDarkBackground(this->colorOnDarkBackground());
// copy->setColorOnLightBackground(this->colorOnLightBackground());
copy->setTextWidth(this->textWidth());
copy->setTextHeight(this->textHeight());
......
......@@ -99,7 +99,9 @@ protected:
}
public:
virtual UBGraphicsItemDelegate *Delegate() const = 0;
virtual void remove() = 0;
};
......
......@@ -48,8 +48,8 @@ void UBPlatformUtils::init()
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *currentPath = [[NSBundle mainBundle] pathForResource:@"Save PDF to Sankore" ofType:@"workflow"];
NSString *installedPath = [[[@"~/Library/PDF Services" stringByExpandingTildeInPath] stringByAppendingPathComponent:@"Save PDF to Sankore"] stringByAppendingPathExtension:@"workflow"];
NSString *currentPath = [[NSBundle mainBundle] pathForResource:@"Save PDF to Open-Sankore" ofType:@"workflow"];
NSString *installedPath = [[[@"~/Library/PDF Services" stringByExpandingTildeInPath] stringByAppendingPathComponent:@"Save PDF to Open-Sankore"] stringByAppendingPathExtension:@"workflow"];
NSString *currentVersion = bundleShortVersion([NSBundle bundleWithPath:currentPath]);
NSString *installedVersion = bundleShortVersion([NSBundle bundleWithPath:installedPath]);
......@@ -57,16 +57,17 @@ void UBPlatformUtils::init()
{
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager removeFileAtPath:installedPath handler:nil];
// removing the old version of the script named Save PDF to Uniboard
[fileManager removeFileAtPath:[[[@"~/Library/PDF Services" stringByExpandingTildeInPath] stringByAppendingPathComponent:@"Save PDF to Uniboard"] stringByAppendingPathExtension:@"workflow"] handler:nil];
[fileManager createDirectoryAtPath:[installedPath stringByDeletingLastPathComponent] attributes:nil];
BOOL copyOK = [fileManager copyPath:currentPath toPath:installedPath handler:nil];
if (!copyOK)
{
qWarning("Could not install the 'Save PDF to Sankore' workflow");
qWarning("Could not install the 'Save PDF to Open-Sankoré workflow");
}
}
[pool drain];
}
......
......@@ -77,7 +77,7 @@ UBUpdateDlg::UBUpdateDlg(QWidget *parent, int nbFiles, const QString& bkpPath)
mLayout->addWidget(mpDlgBttn);
mpDlgBttn->button(QDialogButtonBox::Ok)->setText(tr("Update"));
mpDlgBttn->button(QDialogButtonBox::Cancel)->setText("Remind me later");
mpDlgBttn->button(QDialogButtonBox::Cancel)->setText(tr("Remind me later"));
QObject::connect(mBrowseBttn, SIGNAL(clicked()), this, SLOT(onBrowse()));
QObject::connect(mpDlgBttn, SIGNAL(accepted()), this, SLOT(onUpdate()));
......
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