diff --git a/Open-Sankore.packproj b/Open-Sankore.packproj new file mode 100644 index 00000000..14e6d3cf --- /dev/null +++ b/Open-Sankore.packproj @@ -0,0 +1,561 @@ + + + + + Hierarchy + + Attributes + + Documents + + Background Image + + IFPkgFlagBackgroundAlignment + 4 + IFPkgFlagBackgroundScaling + 1 + Mode + 0 + Path + + Path Type + 1 + + License + + International + + Mode + 1 + Path + Sankore-Licence.txt + Path Type + 2 + + + ReadMe + + International + + Mode + 0 + Path + + Path Type + 1 + + + Welcome + + International + + Mode + 0 + Path + + Path Type + 1 + + + + Files + + Compress + + Hierarchy + + Children + + + Children + + + Children + + GID + 80 + Path + build/macx/release/product/Open-Sankore.app + Path Type + 2 + Privileges + 493 + Type + 3 + UID + 0 + + + Children + + GID + 80 + Path + Utilities + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + GID + 80 + Path + Applications + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + + Children + + GID + 80 + Path + Application Support + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + Documentation + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + Filesystems + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + Frameworks + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + Internet Plug-Ins + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + PreferencePanes + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + Preferences + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + Printers + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + QuickTime + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + Children + + GID + 80 + Path + Scripts + Path Type + 1 + Privileges + 509 + Type + 1 + UID + 0 + + + GID + 80 + Path + Library + Path Type + 1 + Privileges + 1021 + Type + 1 + UID + 0 + + + Children + + + Children + + + Children + + GID + 0 + Path + Extensions + Path Type + 1 + Privileges + 493 + Type + 1 + UID + 0 + + + GID + 0 + Path + Library + Path Type + 1 + Privileges + 493 + Type + 1 + UID + 0 + + + GID + 0 + Path + System + Path Type + 1 + Privileges + 493 + Type + 1 + UID + 0 + + + GID + 80 + Path + / + Path Type + 1 + Privileges + 1021 + Type + 1 + UID + 0 + + IFPkgFlagDefaultLocation + /Applications + Imported Package + + Package Path + + Split Forks + + + Plugins + + PluginsList + + + Path + Introduction + Type + 0 + + + Path + ReadMe + Type + 0 + + + Path + License + Type + 0 + + + Path + Target + Type + 0 + + + Path + PackageSelection + Type + 0 + + + Path + Install + Type + 0 + + + Path + FinishUp + Type + 0 + + + + Scripts + + Additional Resources + + International + + + Installation Scripts + + IFInstallationScriptsPostflight + + Path + + Status + + + IFInstallationScriptsPostinstall + + Path + + Status + + + IFInstallationScriptsPostupgrade + + Path + + Status + + + IFInstallationScriptsPreflight + + Path + + Status + + + IFInstallationScriptsPreinstall + + Path + + Status + + + IFInstallationScriptsPreupgrade + + Path + + Status + + + + Requirements + + + Settings + + Description + + International + + IFPkgDescriptionDeleteWarning + + IFPkgDescriptionDescription + Open-Sankore is an hardware independent interactive whiteboard + IFPkgDescriptionTitle + Open-Sankoré + IFPkgDescriptionVersion + 1.40.b.00 + + + Display Information + + CFBundleGetInfoString + Open-Sankore 1.0 Copyrights © 2011 Open-Sankoré + CFBundleIconFile + resources/macx/UniboardDmg.icns + CFBundleIconFile Path Type + 2 + CFBundleIdentifier + org.open-sankore.pkg.Open-Sankore + CFBundleName + Open-Sankoré + CFBundleShortVersionString + 1.40.b.00 + + Options + + IFPkgFlagAllowBackRev + + IFPkgFlagAuthorizationAction + 0 + IFPkgFlagFollowLinks + + IFPkgFlagIsRequired + + IFPkgFlagOverwritePermissions + + IFPkgFlagRelocatable + + IFPkgFlagRestartAction + 0 + IFPkgFlagRootVolumeOnly + + IFPkgFlagUpdateInstalledLanguages + + + Version + + IFMajorVersion + 1 + IFMinorVersion + 40 + + + + IFPkgFlagPackageSelection + 0 + Name + Open-Sankore + Status + 1 + Type + 1 + + Name + Project + Settings + + 10.1 Compatibility + + Build Path + install/mac + Build Path Type + 2 + Comment + + Remove .DS_Store + + Remove .pbdevelopment + + Remove CVS + + + + diff --git a/Sankore-Licence.txt b/Sankore-Licence.txt new file mode 100644 index 00000000..fac00199 --- /dev/null +++ b/Sankore-Licence.txt @@ -0,0 +1,171 @@ +Open-Sankor is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. You can find the source code of this software at + + +Open-Sankor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/release.macx.sh b/release.macx.sh index 5f417bfc..3152c1e5 100755 --- a/release.macx.sh +++ b/release.macx.sh @@ -21,6 +21,7 @@ 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 # Directories BUILD_DIR="build/macx/release" @@ -67,6 +68,7 @@ checkExecutable "$DMGUTIL" checkExecutable "$DSYMUTIL" checkExecutable "$STRIP" checkExecutable "$PLISTBUDDY" +checkExecutable "$ICEBERG" # delete the build directory @@ -97,9 +99,9 @@ else fi fi -if [ $? != 0 ]; then - abort "compilation failed" -fi +#if [ $? != 0 ]; then +# abort "compilation failed" +#fi NAME="Open-Sankore" @@ -118,7 +120,7 @@ notify "Removing .svn directories ..." find "$APP" -name .svn -exec rm -rf {} \; 2> /dev/null # set various version infomration in Info.plist -$PLISTBUDDY -c "Set :CFBundleVersion $SVN_REVISION" "$INFO_PLIST" +$PLISTBUDDY -c "Set :CFBundleVersion $VERSION" "$INFO_PLIST" $PLISTBUDDY -c "Set :CFBundleShortVersionString $VERSION" "$INFO_PLIST" $PLISTBUDDY -c "Set :CFBundleGetInfoString $NAME" "$INFO_PLIST" @@ -132,6 +134,24 @@ notify "Extracting debug information ..." $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" + # 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" + $PLISTBUDDY -c "Set :Hierarchy:Attributes:Settings:Version:IFMajorVersion `echo $VERSION | awk 'BEGIN { FS = "." }; { print $1 }'`" "$ICEBERG_CONFIG_FILE" + $PLISTBUDDY -c "Set :Hierarchy:Attributes:Settings:Version:IFMinorVersion `echo $VERSION | awk 'BEGIN { FS = "." }; { print $2 }'`" "$ICEBERG_CONFIG_FILE" + + + PRODUCT_DIR="install/mac/" + + if [ ! -d "${PRODUCT_DIR}" ]; then + mkdir -p "${PRODUCT_DIR}" + fi + $ICEBERG $ICEBERG_CONFIG_FILE + exit 0 +fi + notify "Creating dmg ..." umount "$VOLUME" 2> /dev/null $DMGUTIL --open --volume="$NAME" "$DMG" diff --git a/resources/library/interactive/WebBrowser.wgt/index.html b/resources/library/interactive/WebBrowser.wgt/index.html index 53a7c5de..d477b265 100644 --- a/resources/library/interactive/WebBrowser.wgt/index.html +++ b/resources/library/interactive/WebBrowser.wgt/index.html @@ -225,10 +225,12 @@ $(window).trigger("resize"); return false; }; - if(resizerIndex > 100){ + if(resizerIndex > 80){ resizerIndex = 0; - $("#textbox").val("http://www.google.com/search?q=" + $("#textbox").val().replace("http://", "")); - $("#search-button").trigger("click"); + $("#back-button").trigger("click"); + alert(sankoreLang[lang].alert); + //$("#textbox").val("http://www.google.com/search?q=" + $("#textbox").val().replace("http://", "")); + //$("#search-button").trigger("click"); }else{ resizer = setTimeout(function(){checkLoading()}, 100); resizerIndex++; diff --git a/resources/library/interactive/WebBrowser.wgt/scripts/languages.js b/resources/library/interactive/WebBrowser.wgt/scripts/languages.js index 2683dfd8..70eb834f 100644 --- a/resources/library/interactive/WebBrowser.wgt/scripts/languages.js +++ b/resources/library/interactive/WebBrowser.wgt/scripts/languages.js @@ -5,7 +5,8 @@ var sankoreLang = { "show":"Show", "prev_page":"Previous page", "next_page":"Next page", - "open":"Open the site" + "open":"Open the site", + "alert":"Cannot open a page! Maybe it's because of a security policy or a wrong url. Also check your internet connection." }, "ru":{ "previous":"Пред.", @@ -13,7 +14,8 @@ var sankoreLang = { "show":"Показать", "prev_page":"Пред. страница", "next_page":"След. страница", - "open":"Перейти" + "open":"Перейти", + "alert":"Невозможно отобразить страницу! Возможно это из-за политики безопасности сайта или неверного адреса.Также стоит проверить подключение к интернету." }, "fr":{ "previous":"Précédente", @@ -21,7 +23,8 @@ var sankoreLang = { "show":"Voir", "prev_page":"Page précédente", "next_page":"Page suivante", - "open":"Ouvrez le site" + "open":"Ouvrez le site", + "alert":"Impossible d'ouvrir une page! Peut-être c'est à cause d'une politique de sécurité ou une URL erronée. Vérifiez aussi votre connexion internet." } }; diff --git a/src/domain/UBGraphicsDelegateFrame.cpp b/src/domain/UBGraphicsDelegateFrame.cpp index f0952ac3..a6f17114 100644 --- a/src/domain/UBGraphicsDelegateFrame.cpp +++ b/src/domain/UBGraphicsDelegateFrame.cpp @@ -92,7 +92,6 @@ UBGraphicsDelegateFrame::~UBGraphicsDelegateFrame() // NOOP } - void UBGraphicsDelegateFrame::setAntiScale(qreal pAntiScale) { mFrameWidth = mNominalFrameWidth * pAntiScale; @@ -298,8 +297,8 @@ void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) QSizeF newSize = resizableItem->size() + incVector; - if (newSize.width() < 50 /*0*/ || newSize.height() < /*0*/ 50) - return; +// if (newSize.width() < 50 /*0*/ || newSize.height() < /*0*/ 50) +// return; resizableItem->resize(newSize); } @@ -596,4 +595,3 @@ QRectF UBGraphicsDelegateFrame::rotateButtonBounds() const return QRectF(rect().right()- mFrameWidth, rect().top(), mFrameWidth, mFrameWidth); } - diff --git a/src/gui/UBDocumentNavigator.cpp b/src/gui/UBDocumentNavigator.cpp index 371cdbd5..fea695f4 100644 --- a/src/gui/UBDocumentNavigator.cpp +++ b/src/gui/UBDocumentNavigator.cpp @@ -450,11 +450,13 @@ void UBDocumentNavigator::onSelectionChanged() */ void UBDocumentNavigator::onMovedToIndex(int index) { - UBSceneThumbnailNavigPixmap* pItem = dynamic_cast(mThumbnails.at(index)); - if(NULL != pItem) - { - mCrntItem = pItem; - mCrntItem->setSelected(true); - centerOn(mCrntItem); + if(index < mThumbnails.size()){ + UBSceneThumbnailNavigPixmap* pItem = dynamic_cast(mThumbnails.at(index)); + if(NULL != pItem) + { + mCrntItem = pItem; + mCrntItem->setSelected(true); + centerOn(mCrntItem); + } } } diff --git a/src/gui/UBThumbnailWidget.cpp b/src/gui/UBThumbnailWidget.cpp index c4a8ab5e..93746dd3 100644 --- a/src/gui/UBThumbnailWidget.cpp +++ b/src/gui/UBThumbnailWidget.cpp @@ -368,7 +368,7 @@ void UBThumbnailWidget::mouseMoveEvent(QMouseEvent *event) if (qlElements.size() > 0){ mime->setUrls(qlElements); drag->setMimeData(mime); - drag->exec(); + drag->exec(Qt::CopyAction); } } }