Merge branch 'dev' into dev-qt5.1x

preferencesAboutTextFull
Clément Fauconnier 5 years ago
commit f29c11bc3d
  1. 2
      OpenBoard.pro
  2. 24
      release_scripts/osx/release.macx.sh
  3. BIN
      resources/customizations/fonts/GETypoLibre.otf
  4. 2
      resources/etc/OpenBoard.config
  5. 38
      resources/forms/preferences.ui
  6. 16
      resources/i18n/OpenBoard_ar.ts
  7. 16
      resources/i18n/OpenBoard_bg.ts
  8. 16
      resources/i18n/OpenBoard_ca.ts
  9. 16
      resources/i18n/OpenBoard_cs.ts
  10. 16
      resources/i18n/OpenBoard_da.ts
  11. 34
      resources/i18n/OpenBoard_de.ts
  12. 16
      resources/i18n/OpenBoard_el.ts
  13. 16
      resources/i18n/OpenBoard_en.ts
  14. 16
      resources/i18n/OpenBoard_en_UK.ts
  15. 16
      resources/i18n/OpenBoard_es.ts
  16. 18
      resources/i18n/OpenBoard_fr.ts
  17. 18
      resources/i18n/OpenBoard_fr_CH.ts
  18. 16
      resources/i18n/OpenBoard_gl.ts
  19. 16
      resources/i18n/OpenBoard_hu.ts
  20. 34
      resources/i18n/OpenBoard_it.ts
  21. 16
      resources/i18n/OpenBoard_iw.ts
  22. 16
      resources/i18n/OpenBoard_ja.ts
  23. 16
      resources/i18n/OpenBoard_ko.ts
  24. 16
      resources/i18n/OpenBoard_mg.ts
  25. 16
      resources/i18n/OpenBoard_nb.ts
  26. 16
      resources/i18n/OpenBoard_nl.ts
  27. 16
      resources/i18n/OpenBoard_pl.ts
  28. 16
      resources/i18n/OpenBoard_pt.ts
  29. 16
      resources/i18n/OpenBoard_ro.ts
  30. 16
      resources/i18n/OpenBoard_ru.ts
  31. 38
      resources/i18n/OpenBoard_sk.ts
  32. 16
      resources/i18n/OpenBoard_sv.ts
  33. 16
      resources/i18n/OpenBoard_tr.ts
  34. 16
      resources/i18n/OpenBoard_uk.ts
  35. 16
      resources/i18n/OpenBoard_zh.ts
  36. 16
      resources/i18n/OpenBoard_zh_CN.ts
  37. 16
      resources/i18n/OpenBoard_zh_TW.ts
  38. 19
      resources/library/interactivities/Magic Box.wgt/i18n/Messages_sk.properties
  39. 1
      resources/library/shape/nofill_octogon.svg
  40. 3
      resources/library/shape/nofill_rhombus.svg
  41. 1
      resources/library/shape/nofill_trapeze.svg
  42. 1
      resources/library/shape/nofill_triangle_rect.svg
  43. 7
      src/adaptors/UBMetadataDcSubsetAdaptor.cpp
  44. 7
      src/core/UBApplication.cpp
  45. 22
      src/core/UBPersistenceManager.cpp
  46. 11
      src/core/UBPreferencesController.cpp
  47. 3
      src/core/UBSettings.cpp
  48. 4
      src/core/UBSettings.h
  49. 91
      src/document/UBDocumentController.cpp
  50. 5
      src/document/UBDocumentController.h
  51. 14
      src/document/UBDocumentProxy.cpp
  52. 1
      src/document/UBDocumentProxy.h

@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 1
VERSION_MIN = 5
VERSION_PATCH = 4
VERSION_TYPE = a # a = alpha, b = beta, rc = release candidate, r = release, other => error
VERSION_TYPE = r # a = alpha, b = beta, rc = release candidate, r = release, other => error
VERSION_BUILD = 0
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_PATCH}-$${VERSION_TYPE}.$${VERSION_BUILD}"

@ -19,7 +19,7 @@ PROJECT_ROOT="$SCRIPT_PATH/../.."
APPLICATION_NAME="OpenBoard"
BASE_QT_DIR=~/Qt/5.9.8/clang_64
BASE_QT_DIR=~/qt/5.5/clang_64
# Executables
QMAKE=$BASE_QT_DIR/bin/qmake
MACDEPLOYQT=$BASE_QT_DIR/bin/macdeployqt
@ -201,30 +201,30 @@ $MACDEPLOYQT "`pwd`/$APPLICATION_NAME.app"
cd -
# make sure libs installed via homebrew 2.0 refer to in-app libs
notify "relinking libs ..."
# notify "relinking libs ..."
# libavformat
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavcodec.58.dylib @executable_path/../Frameworks/libavcodec.58.dylib
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libswresample.3.dylib @executable_path/../Frameworks/libswresample.3.dylib
install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavcodec.58.dylib @executable_path/../Frameworks/libavcodec.58.dylib
# install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libswresample.3.dylib @executable_path/../Frameworks/libswresample.3.dylib
# install_name_tool "$APP/Contents/Frameworks/libavformat.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# libavcodec
install_name_tool "$APP/Contents/Frameworks/libavcodec.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libswresample.3.dylib @executable_path/../Frameworks/libswresample.3.dylib
install_name_tool "$APP/Contents/Frameworks/libavcodec.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# install_name_tool "$APP/Contents/Frameworks/libavcodec.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libswresample.3.dylib @executable_path/../Frameworks/libswresample.3.dylib
# install_name_tool "$APP/Contents/Frameworks/libavcodec.58.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
#libswresample
install_name_tool "$APP/Contents/Frameworks/libswresample.3.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# install_name_tool "$APP/Contents/Frameworks/libswresample.3.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
#libswscale
install_name_tool "$APP/Contents/Frameworks/libswscale.5.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# install_name_tool "$APP/Contents/Frameworks/libswscale.5.dylib" -change /usr/local/Cellar/ffmpeg/4.1.4_2/lib/libavutil.56.dylib @executable_path/../Frameworks/libavutil.56.dylib
# libhogweed
install_name_tool "$APP/Contents/Frameworks/libhogweed.4.dylib" -change /usr/local/Cellar/nettle/3.4.1/lib/libnettle.6.dylib @executable_path/../Frameworks/libnettle.6.dylib
# install_name_tool "$APP/Contents/Frameworks/libhogweed.4.dylib" -change /usr/local/Cellar/nettle/3.4.1/lib/libnettle.6.dylib @executable_path/../Frameworks/libnettle.6.dylib
# libssl
install_name_tool "$APP/Contents/Frameworks/libssl.1.1.dylib" -change /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib
# install_name_tool "$APP/Contents/Frameworks/libssl.1.1.dylib" -change /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libcrypto.1.1.dylib @executable_path/../Frameworks/libcrypto.1.1.dylib
# libvorbis
install_name_tool "$APP/Contents/Frameworks/libvorbisenc.2.dylib" -change /usr/local/Cellar/libvorbis/1.3.6/lib/libvorbis.0.dylib @executable_path/../Frameworks/libvorbis.0.dylib
# install_name_tool "$APP/Contents/Frameworks/libvorbisenc.2.dylib" -change /usr/local/Cellar/libvorbis/1.3.6/lib/libvorbis.0.dylib @executable_path/../Frameworks/libvorbis.0.dylib
notify "Extracting debug information ..."
$DSYMUTIL "$APP/Contents/MacOS/$APPLICATION_NAME" -o "$DSYM"

@ -93,6 +93,8 @@ SortOrder=0
SplitterLeftSize=200
SplitterRightSize=800
ShowDateColumnOnAlphabeticalSort=false
emptyTrashForOlderDocuments=false
emptyTrashDaysValue=30
[IntranetPodcast]
Author=

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>825</width>
<height>748</height>
<height>767</height>
</rect>
</property>
<property name="windowTitle">
@ -552,7 +552,7 @@
<string>Documents Mode</string>
</property>
<layout class="QGridLayout" name="gridLayout_19">
<item row="0" column="0">
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_18">
<item row="0" column="1">
<widget class="QCheckBox" name="showDateColumnOnAlphabeticalSort">
@ -567,7 +567,26 @@
</property>
</widget>
</item>
<item row="0" column="0">
<item row="3" column="1">
<widget class="QCheckBox" name="emptyTrashForOlderDocuments">
<property name="text">
<string>Empty trash for documents older than</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSpinBox" name="emptyTrashDaysValue"/>
</item>
<item row="3" column="3">
<widget class="QLabel" name="emptyTrashDaysLabel">
<property name="text">
<string>days</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" rowspan="2">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -583,7 +602,18 @@
</property>
</spacer>
</item>
</layout>
<item row="0" column="2">
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>

@ -2844,6 +2844,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2824,6 +2824,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2824,6 +2824,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2830,6 +2830,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2827,6 +2827,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -153,19 +153,19 @@
</message>
<message>
<source>Line</source>
<translation>Linie</translation>
<translation>Strichstärke</translation>
</message>
<message>
<source>Small Line</source>
<translation>Kleine Linie</translation>
<translation>Dünner Strich</translation>
</message>
<message>
<source>Medium Line</source>
<translation>Mittelgroße Linie</translation>
<translation>Mittelstarker Strich</translation>
</message>
<message>
<source>Large Line</source>
<translation>Große Linie</translation>
<translation>Dicker Strich</translation>
</message>
<message>
<source>Quit</source>
@ -801,11 +801,11 @@
</message>
<message>
<source>Ruled Light Background</source>
<translation>Hell linierter Hintergrund</translation>
<translation>Heller linierter Hintergrund</translation>
</message>
<message>
<source>Ruled Dark Background</source>
<translation>Dunkel linierter Hintergrund</translation>
<translation>Dunkler linierter Hintergrund</translation>
</message>
<message>
<source>Reset grid size</source>
@ -884,7 +884,7 @@
<name>UBApplicationController</name>
<message>
<source>Web</source>
<translation>Internet</translation>
<translation>Browser</translation>
</message>
<message>
<source>New update available, would you go to the web page ?</source>
@ -1320,7 +1320,7 @@ Wenn Sie einen neuen Namen wählen, wird ein neues Dokument erstellt.</translati
</message>
<message>
<source>Copying page %1/%2</source>
<translation type="unfinished">Seite %1/%2 wird kopiert</translation>
<translation>Seite %1/%2 wird kopiert</translation>
</message>
</context>
<context>
@ -2620,7 +2620,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Line Width</source>
<translation>Linienstärke</translation>
<translation>Strichstärke</translation>
</message>
<message>
<source>Medium</source>
@ -2890,6 +2890,22 @@ p, li { white-space: pre-wrap; }
<source>Credits</source>
<translation></translation>
</message>
<message>
<source>Documents Mode</source>
<translation>Dokumentmodus</translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation>Datumsspalte nur in alphabetischer Reihenfolge anzeigen</translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation>Dokumente aus dem Papierkorb löschen, die älter als</translation>
</message>
<message>
<source>days</source>
<translation>Tage sind</translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2824,6 +2824,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2652,6 +2652,22 @@ p, li { white-space: pre-wrap; }
<source>version : </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2652,6 +2652,22 @@ p, li { white-space: pre-wrap; }
<source>version : </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2844,6 +2844,22 @@ p, li { white-space: pre-wrap; }
<source>Swap first and second view displays</source>
<translation>Intercambiar control de pantalla y vista de pantalla</translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -1330,7 +1330,7 @@ Un nouveau nom vous permettra de conserver l&apos;ancien document.</translation>
</message>
<message>
<source>Copying page %1/%2</source>
<translation type="unfinished">Copie de la page %1/%2 en cours</translation>
<translation>Copie de la page %1/%2 en cours</translation>
</message>
</context>
<context>
@ -2907,6 +2907,22 @@ p, li { white-space: pre-wrap; }
<source>Swap first and second view displays</source>
<translation>Inverser les écrans élèves</translation>
</message>
<message>
<source>Documents Mode</source>
<translation>Mode Documents</translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation>Afficher la colonne des dates avec le tri alphabétique</translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation>Supprimer de la corbeille les documents de plus de</translation>
</message>
<message>
<source>days</source>
<translation>jours</translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -1330,7 +1330,7 @@ Un nouveau nom vous permettra de conserver l&apos;ancien document.</translation>
</message>
<message>
<source>Copying page %1/%2</source>
<translation type="unfinished">Copie de la page %1/%2 en cours</translation>
<translation>Copie de la page %1/%2 en cours</translation>
</message>
</context>
<context>
@ -2907,6 +2907,22 @@ p, li { white-space: pre-wrap; }
<source>Swap first and second view displays</source>
<translation>Inverser les écrans élèves</translation>
</message>
<message>
<source>Documents Mode</source>
<translation>Mode Documents</translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation>Afficher la colonne des dates avec le tri alphabétique</translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation>Supprimer de la corbeille les documents de plus de</translation>
</message>
<message>
<source>days</source>
<translation>jours</translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2821,6 +2821,22 @@ p, li { white-space: pre-wrap; }
<source>Swap first and second view displays</source>
<translation>Intercambiar control de pantalla e vista de pantalla</translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2783,6 +2783,22 @@ p, li { white-space: pre-wrap; }
<source>Swap first and second view displays</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -753,7 +753,7 @@
</message>
<message>
<source>Check Update</source>
<translation>Cerca aggiornamenti</translation>
<translation>Controlla aggiornamenti</translation>
</message>
<message>
<source>Ctrl+H</source>
@ -801,11 +801,11 @@
</message>
<message>
<source>Ruled Light Background</source>
<translation>Sfondo chiaro lineato</translation>
<translation>Sfondo chiaro a righe</translation>
</message>
<message>
<source>Ruled Dark Background</source>
<translation>Sfundo scuro lineato</translation>
<translation>Sfondo scuro a righe</translation>
</message>
<message>
<source>Reset grid size</source>
@ -1279,8 +1279,8 @@
Keeping this name will replace the document.
Providing a new name will create a new document.</source>
<translation>Il nome %1 è già usato.
Conservando questo nome sostituirà il documento.
Dando un nuovo nome creerà un nuovo documento.</translation>
Conservando questo nome si sostituirà il documento.
Dando un nuovo nome si creerà un nuovo documento.</translation>
</message>
</context>
<context>
@ -1320,7 +1320,7 @@ Dando un nuovo nome creerà un nuovo documento.</translation>
</message>
<message>
<source>Copying page %1/%2</source>
<translation type="unfinished">Sto copiando pagina %1/%2</translation>
<translation>Sto copiando pagina %1/%2</translation>
</message>
</context>
<context>
@ -1970,7 +1970,7 @@ Vuoi ignorare gli errori per questo host?</translation>
</message>
<message>
<source>has lost access to the document repository &apos;%1&apos;. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.</source>
<translation type="vanished">ha perso l&apos;accesso al repository documenti &quot;%1&quot;. Sfortunatamente l&apos;applicazione deve essere chiusa per evitare di rivinare i dati. Gli ultimi cambiamenti potrebbero andare persi.</translation>
<translation type="vanished">ha perso l&apos;accesso al repository documenti &quot;%1&quot;. Sfortunatamente l&apos;applicazione deve essere chiusa per evitare di rovinare i dati. Gli ultimi cambiamenti potrebbero andare persi.</translation>
</message>
<message>
<source>Saving thumbnail of page %1</source>
@ -1982,7 +1982,7 @@ Vuoi ignorare gli errori per questo host?</translation>
</message>
<message>
<source>OpenBoard has lost access to the document repository &apos;%1&apos;. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.</source>
<translation>OpenBoard ha perso l&apos;accesso al repository documenti &quot;%1&quot;. Sfortunatamente l&apos;applicazione deve essere chiusa per evitare di rivinare i dati. Gli ultimi cambiamenti potrebbero andare persi.</translation>
<translation>OpenBoard ha perso l&apos;accesso al repository documenti &quot;%1&quot;. Sfortunatamente l&apos;applicazione deve essere chiusa per evitare di rovinare i dati. Gli ultimi cambiamenti potrebbero andare persi.</translation>
</message>
</context>
<context>
@ -2005,7 +2005,7 @@ Vuoi ignorare gli errori per questo host?</translation>
</message>
<message>
<source>Swiss French</source>
<translation>Franco Svizzero</translation>
<translation>Francese Svizzero</translation>
</message>
</context>
<context>
@ -2885,6 +2885,22 @@ p, li { white-space: pre-wrap; }
<source>Swap first and second view displays</source>
<translation>Scambia lo schermo di controllo con quello di visualizzazione</translation>
</message>
<message>
<source>Documents Mode</source>
<translation>Modalità Documenti</translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation>Visualizza la colonna delle date con ordinamento alfabetico.</translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation>Cancellare dal cestino i documenti di é superiore a</translation>
</message>
<message>
<source>days</source>
<translation>giorni</translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2816,6 +2816,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2812,6 +2812,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2835,6 +2835,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2831,6 +2831,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2821,6 +2821,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2820,6 +2820,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2845,6 +2845,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2860,6 +2860,22 @@ p, li { white-space: pre-wrap; }
<source>Grid</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2831,6 +2831,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2831,6 +2831,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -387,7 +387,7 @@
</message>
<message>
<source>Stylus</source>
<translation>Interaktívne pero</translation>
<translation>Dotykové pero</translation>
</message>
<message>
<source>Quit OpenBoard</source>
@ -2683,19 +2683,19 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Creation date</source>
<translation type="unfinished"></translation>
<translation>Dátum vytvorenia</translation>
</message>
<message>
<source>Update date</source>
<translation type="unfinished"></translation>
<translation>Dátum úpravy</translation>
</message>
<message>
<source>Alphabetical order</source>
<translation type="unfinished"></translation>
<translation>Podľa abecedy</translation>
</message>
<message>
<source>Sort Order</source>
<translation type="unfinished"></translation>
<translation>Kritérium triedenia</translation>
</message>
</context>
<context>
@ -2826,7 +2826,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Proxy User:</source>
<translation>Použ. m. na proxy:</translation>
<translation>Použ. meno na proxy:</translation>
</message>
<message>
<source>Pass:</source>
@ -2842,7 +2842,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation>Zistiť, či sa pri spustení majú nahrať dáta z Open-Sankoré</translation>
<translation>Zistiť, či pri spustení možno nahrať dáta Open-Sankoré</translation>
</message>
<message>
<source>Use system keyboard (recommended)</source>
@ -2854,22 +2854,38 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>On Dark Background</source>
<translation type="unfinished">Na tmavom pozadí</translation>
<translation>Na tmavom pozadí</translation>
</message>
<message>
<source>Opacity</source>
<translation type="unfinished">Priehľadnosť</translation>
<translation>Priehľadnosť</translation>
</message>
<message>
<source>On Light Background</source>
<translation type="unfinished">Na svetlom pozadí</translation>
<translation>Na svetlom pozadí</translation>
</message>
<message>
<source>Swap first and second view displays</source>
<translation type="unfinished"></translation>
<translation>Vymeniť obrazovku 1. a 2. zobrazenia</translation>
</message>
<message>
<source>Grid</source>
<translation>Mriežka</translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>

@ -2832,6 +2832,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2819,6 +2819,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2817,6 +2817,22 @@ p, li { white-space: pre-wrap; }
<source>Swap first and second view displays</source>
<translation>Поміняйте перший і другий види відображення</translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2819,6 +2819,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2819,6 +2819,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -2813,6 +2813,22 @@ p, li { white-space: pre-wrap; }
<source>Check if Open-Sankoré data could be imported at launch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Documents Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display date column on alphabetical sort</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty trash for documents older than</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>days</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>trapFlashDialog</name>

@ -0,0 +1,19 @@
sk.njin.i18n.document.title = Čarovná škatuľka
sk.njin.i18n.toolbar.edit = Upraviť
sk.njin.i18n.toolbar.view = Zobraziť
sk.njin.i18n.toolbar.reload = Obnoviť
sk.njin.i18n.toolbar.help = Pomocník
sk.njin.i18n.parameters.label.themes = Farebný motív
sk.njin.i18n.parameters.label.slate.themes = bridlica
sk.njin.i18n.parameters.label.pad.themes = tablet
sk.njin.i18n.parameters.label.none.themes = žiadny
sk.njin.i18n.transformation.parameters.label.number = Počet kariet
sk.njin.i18n.transformation.label.usePicture = Obrázok
sk.njin.i18n.transformation.label.before = Predtým
sk.njin.i18n.transformation.label.after = Potom
sk.njin.i18n.transformation.row.label = Karta {0}
sk.njin.i18n.transformation.label.drop = Ťahajte a tu pustite

@ -0,0 +1 @@
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 112.84 112.84"><title>test4</title><path d="M81.54,3.16,114,35.62V81.54L81.54,114H35.62L3.16,81.54V35.62L35.62,3.16H81.54m.41-1H35.21l-33,33.05V82L35.21,115H82L115,82V35.21l-33-33Z" transform="translate(-2.16 -2.16)"/></svg>

After

Width:  |  Height:  |  Size: 312 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg">
<path fill="none" stroke="#000" stroke-width="1" d="M45.67 0.76 0.67 51.76 45.67 102.76 90.67 51.76 45.67 0.76z"/>
</svg>

After

Width:  |  Height:  |  Size: 163 B

@ -0,0 +1 @@
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 114.24 100.87"><title>trapeze</title><path d="M97.15,1l15.92,98.87H1.35L31.74,1H97.15M98,0H31L0,100.87H114.24L98,0Z"/></svg>

After

Width:  |  Height:  |  Size: 212 B

@ -0,0 +1 @@
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 114.24 100.87"><title>triangle</title><path d="M1,2.22,111.6,99.87H1V2.22M0,0V100.87H114.24L0,0Z"/></svg>

After

Width:  |  Height:  |  Size: 193 B

@ -125,6 +125,8 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
// introduced in UB 4.4
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "updated-at", UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTimeUtc()));
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "page-count", QString::number(proxy->pageCount()));
xmlWriter.writeEndElement(); //dc:Description
xmlWriter.writeEndElement(); //RDF
@ -224,6 +226,11 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath)
metadata.insert(UBSettings::documentUpdatedAt, xml.readElementText());
updatedAtFound = true;
}
else if (xml.name() == "page-count"
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::documentPageCount, xml.readElementText());
}
metadata.insert(UBSettings::documentVersion, docVersion);
}

@ -451,6 +451,13 @@ void UBApplication::closeEvent(QCloseEvent *event)
void UBApplication::closing()
{
if (UBSettings::settings()->emptyTrashForOlderDocuments->get().toBool())
{
UBDocumentTreeModel *docModel = UBPersistenceManager::persistenceManager()->mDocumentTreeStructureModel;
documentController->deleteDocumentsInFolderOlderThan(docModel->trashIndex(), UBSettings::settings()->emptyTrashDaysValue->get().toInt());
if (docModel->hasChildren(docModel->trashIndex()))
documentController->deleteEmptyFolders(docModel->trashIndex());
}
if (boardController)
boardController->closing();

@ -164,17 +164,14 @@ void UBPersistenceManager::createDocumentProxiesStructure(const QFileInfoList &c
{
QString fullPath = path.absoluteFilePath();
QDir dir(fullPath);
if (dir.entryList(QDir::Files | QDir::NoDotAndDotDot).size() > 0)
{
QMap<QString, QVariant> metadatas = UBMetadataDcSubsetAdaptor::load(fullPath);
QString docGroupName = metadatas.value(UBSettings::documentGroupName, QString()).toString();
QString docName = metadatas.value(UBSettings::documentName, QString()).toString();
if (docName.isEmpty()) {
qDebug() << "Group name and document name are empty in UBPersistenceManager::createDocumentProxiesStructure()";
continue;
return;
}
QModelIndex parentIndex = mDocumentTreeStructureModel->goTo(docGroupName);
@ -182,19 +179,26 @@ void UBPersistenceManager::createDocumentProxiesStructure(const QFileInfoList &c
return;
}
UBDocumentProxy* docProxy = new UBDocumentProxy(fullPath); // managed in UBDocumentTreeNode
UBDocumentProxy* docProxy = new UBDocumentProxy(fullPath, metadatas); // managed in UBDocumentTreeNode
foreach(QString key, metadatas.keys()) {
docProxy->setMetaData(key, metadatas.value(key));
}
docProxy->setPageCount(sceneCount(docProxy));
if (metadatas.contains(UBSettings::documentPageCount))
{
docProxy->setPageCount(metadatas.value(UBSettings::documentPageCount).toInt());
}
else
{
int pageCount = sceneCount(docProxy);
docProxy->setPageCount(pageCount);
}
if (!interactive)
mDocumentTreeStructureModel->addDocument(docProxy, parentIndex);
else
processInteractiveReplacementDialog(docProxy);
}
}
}
QDialog::DialogCode UBPersistenceManager::processInteractiveReplacementDialog(UBDocumentProxy *pProxy)
@ -229,7 +233,6 @@ QDialog::DialogCode UBPersistenceManager::processInteractiveReplacementDialog(UB
, Qt::Widget);
if (replaceDialog->exec() == QDialog::Accepted)
{
mDocumentTreeStructureModel->addDocument(pProxy, parentIndex);
result = QDialog::Accepted;
QString resultName = replaceDialog->lineEditText();
int i = docList.indexOf(resultName);
@ -250,6 +253,7 @@ QDialog::DialogCode UBPersistenceManager::processInteractiveReplacementDialog(UB
}
}
pProxy->setMetaData(UBSettings::documentName, resultName);
mDocumentTreeStructureModel->addDocument(pProxy, parentIndex);
}
replaceDialog->setParent(0);
delete replaceDialog;

@ -138,8 +138,12 @@ void UBPreferencesController::wire()
connect(mPreferencesUI->useSystemOSKCheckBox, SIGNAL(clicked(bool)), settings->useSystemOnScreenKeyboard, SLOT(setBool(bool)));
connect(mPreferencesUI->useSystemOSKCheckBox, SIGNAL(clicked(bool)), this, SLOT(systemOSKCheckBoxToggled(bool)));
// Documents Mode preferences
connect(mPreferencesUI->showDateColumnOnAlphabeticalSort, SIGNAL(clicked(bool)), settings->showDateColumnOnAlphabeticalSort, SLOT(setBool(bool)));
connect(mPreferencesUI->showDateColumnOnAlphabeticalSort, SIGNAL(clicked(bool)), UBApplication::documentController, SLOT(refreshDateColumns()));
connect(mPreferencesUI->emptyTrashForOlderDocuments, SIGNAL(clicked(bool)), settings->emptyTrashForOlderDocuments, SLOT(setBool(bool)));
connect(mPreferencesUI->emptyTrashDaysValue, SIGNAL(valueChanged(int)), settings->emptyTrashDaysValue, SLOT(setInt(int)));
connect(mPreferencesUI->keyboardPaletteKeyButtonSize, SIGNAL(currentIndexChanged(const QString &)), settings->boardKeyboardPaletteKeyBtnSize, SLOT(setString(const QString &)));
connect(mPreferencesUI->startModeComboBox, SIGNAL(currentIndexChanged(int)), settings->appStartMode, SLOT(setInt(int)));
@ -279,6 +283,8 @@ void UBPreferencesController::init()
this->systemOSKCheckBoxToggled(mPreferencesUI->useSystemOSKCheckBox->isChecked());
mPreferencesUI->showDateColumnOnAlphabeticalSort->setChecked(settings->showDateColumnOnAlphabeticalSort->get().toBool());
mPreferencesUI->emptyTrashForOlderDocuments->setChecked(settings->emptyTrashForOlderDocuments->get().toBool());
mPreferencesUI->emptyTrashDaysValue->setValue(settings->emptyTrashDaysValue->get().toInt());
mPreferencesUI->startModeComboBox->setCurrentIndex(settings->appStartMode->get().toInt());
@ -344,8 +350,13 @@ void UBPreferencesController::defaultSettings()
mPreferencesUI->startModeComboBox->setCurrentIndex(0);
mPreferencesUI->useSystemOSKCheckBox->setChecked(settings->useSystemOnScreenKeyboard->reset().toBool());
mPreferencesUI->showDateColumnOnAlphabeticalSort->setChecked(settings->showDateColumnOnAlphabeticalSort->reset().toBool());
UBApplication::documentController->refreshDateColumns();
mPreferencesUI->emptyTrashForOlderDocuments->setChecked(settings->emptyTrashForOlderDocuments->reset().toBool());
mPreferencesUI->emptyTrashDaysValue->setValue(settings->emptyTrashDaysValue->reset().toInt());
}
else if (mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->penTab)
{

@ -60,6 +60,7 @@ QString UBSettings::documentSize = QString("Size");
QString UBSettings::documentIdentifer = QString("ID");
QString UBSettings::documentVersion = QString("Version");
QString UBSettings::documentUpdatedAt = QString("UpdatedAt");
QString UBSettings::documentPageCount = QString("PageCount");
QString UBSettings::documentDate = QString("date");
QString UBSettings::trashedDocumentGroupNamePrefix = QString("_Trash:");
@ -459,6 +460,8 @@ void UBSettings::init()
useSystemOnScreenKeyboard = new UBSetting(this, "App", "UseSystemOnScreenKeyboard", true);
showDateColumnOnAlphabeticalSort = new UBSetting(this, "Document", "ShowDateColumnOnAlphabeticalSort", false);
emptyTrashForOlderDocuments = new UBSetting(this, "Document", "emptyTrashForOlderDocuments", false);
emptyTrashDaysValue = new UBSetting(this, "Document", "emptyTrashDaysValue", 30);
cleanNonPersistentSettings();
checkNewSettings();

@ -201,6 +201,7 @@ class UBSettings : public QObject
static QString documentIdentifer;
static QString documentVersion;
static QString documentUpdatedAt;
static QString documentPageCount;
static QString documentDate;
@ -415,6 +416,9 @@ class UBSettings : public QObject
UBSetting* showDateColumnOnAlphabeticalSort;
UBSetting* emptyTrashForOlderDocuments;
UBSetting* emptyTrashDaysValue;
UBSetting* magnifierDrawingMode;
UBSetting* autoSaveInterval;

@ -762,6 +762,31 @@ bool UBDocumentTreeModel::removeRows(int row, int count, const QModelIndex &pare
return true;
}
bool UBDocumentTreeModel::containsDocuments(const QModelIndex &index)
{
for (int i = 0; i < rowCount(index); i++)
{
QModelIndex child = this->index(i, 0, index);
if (isCatalog(child))
{
if (containsDocuments(child))
{
return true;
}
}
else if (isDocument(child))
{
return true;
}
else
{
qDebug() << "Who the hell are you ?";
}
}
return false;
}
QModelIndex UBDocumentTreeModel::indexForNode(UBDocumentTreeNode *pNode) const
{
if (pNode == 0) {
@ -917,7 +942,6 @@ void UBDocumentTreeModel::moveIndexes(const QModelIndexList &source, const QMode
fixNodeName(s, destinationParent);
sourceNode->parentNode()->moveChild(sourceNode, destIndex, newParentNode);
updateIndexNameBindings(sourceNode);
hasOneInsertion = true;
}
}
@ -1199,6 +1223,7 @@ void UBDocumentTreeModel::updateIndexNameBindings(UBDocumentTreeNode *nd)
} else if (nd->proxyData()) {
nd->proxyData()->setMetaData(UBSettings::documentGroupName, virtualPathForIndex(indexForNode(nd->parentNode())));
nd->proxyData()->setMetaData(UBSettings::documentName, nd->nodeName());
nd->proxyData()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
UBPersistenceManager::persistenceManager()->persistDocumentMetadata(nd->proxyData());
}
}
@ -2054,7 +2079,6 @@ void UBDocumentController::setupViews()
}
}
//N/C - NNE - 20140403
void UBDocumentController::refreshDateColumns()
{
if (UBSettings::settings()->documentSortKind->get().toInt() == UBDocumentController::Alphabetical)
@ -2602,6 +2626,69 @@ void UBDocumentController::moveToTrash(QModelIndex &index, UBDocumentTreeModel*
}
//issue 1629 - NNE - 20131212 : END
void UBDocumentController::deleteDocumentsInFolderOlderThan(const QModelIndex &index, const int days)
{
UBDocumentTreeModel *docModel = UBPersistenceManager::persistenceManager()->mDocumentTreeStructureModel;
QModelIndexList list;
for (int i = 0; i < docModel->rowCount(index); i++)
{
list << docModel->index(i, 0, index);
}
foreach (QModelIndex child, list)
{
UBDocumentProxy *documentProxy= docModel->proxyForIndex(child);
if (documentProxy)
{
if (documentProxy->lastUpdate().date() < QDateTime::currentDateTime().addDays(-days).date())
{
UBPersistenceManager::persistenceManager()->deleteDocument(documentProxy);
}
}
else
{
if (docModel->isCatalog(child))
{
deleteDocumentsInFolderOlderThan(child, days);
}
}
}
}
void UBDocumentController::deleteEmptyFolders(const QModelIndex &index)
{
UBDocumentTreeModel *docModel = UBPersistenceManager::persistenceManager()->mDocumentTreeStructureModel;
QModelIndexList list;
for (int i = 0; i < docModel->rowCount(index); i++)
{
list << docModel->index(i, 0, index);
}
if (list.length() > 0)
{
foreach (QModelIndex child, list)
{
if (docModel->isCatalog(child))
{
if (!docModel->containsDocuments(child))
{
deleteIndexAndAssociatedData(child);
}
}
}
}
else
{
if (docModel->isCatalog(index))
{
deleteIndexAndAssociatedData(index);
}
}
}
void UBDocumentController::emptyFolder(const QModelIndex &index, DeletionType pDeletionType)
{
// Issue NC - CFA - 20131029 : ajout d'une popup de confirmation pour la suppression definitive

@ -187,6 +187,8 @@ public:
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
bool removeRows(int row, int count, const QModelIndex &parent);
bool containsDocuments(const QModelIndex& index);
QModelIndex indexForNode(UBDocumentTreeNode *pNode) const;
QPersistentModelIndex persistentIndexForNode(UBDocumentTreeNode *pNode);
// bool insertRow(int row, const QModelIndex &parent);
@ -414,6 +416,9 @@ class UBDocumentController : public UBDocumentContainer
*/
void moveToTrash(QModelIndex &index, UBDocumentTreeModel* docModel);
void deleteDocumentsInFolderOlderThan(const QModelIndex &index, const int days);
void deleteEmptyFolders(const QModelIndex &index);
QModelIndex mapIndexToSource(const QModelIndex &index);
QModelIndexList mapIndexesToSource(const QModelIndexList &indexes);

@ -56,7 +56,6 @@ UBDocumentProxy::UBDocumentProxy(const UBDocumentProxy &rValue) :
mPageCount = rValue.mPageCount;
}
UBDocumentProxy::UBDocumentProxy(const QString& pPersistancePath)
: mPageCount(0)
, mPageDpi(0)
@ -68,6 +67,17 @@ UBDocumentProxy::UBDocumentProxy(const QString& pPersistancePath)
}
UBDocumentProxy::UBDocumentProxy(const QString& pPersistancePath, QMap<QString, QVariant> metadatas)
: mPageCount(0)
, mPageDpi(0)
{
init();
setPersistencePath(pPersistancePath);
mMetaDatas = metadatas;
}
void UBDocumentProxy::init()
{
setMetaData(UBSettings::documentGroupName, "");
@ -260,7 +270,7 @@ QDateTime UBDocumentProxy::lastUpdate()
{
if(mMetaDatas.contains(UBSettings::documentUpdatedAt))
return UBStringUtils::fromUtcIsoDate(metaData(UBSettings::documentUpdatedAt).toString());
return QDateTime().currentDateTime();
return QDateTime::currentDateTime();
}
bool UBDocumentProxy::isModified() const

@ -49,6 +49,7 @@ class UBDocumentProxy : public QObject
UBDocumentProxy();
UBDocumentProxy(const UBDocumentProxy &rValue);
UBDocumentProxy(const QString& pPersistencePath);
UBDocumentProxy(const QString& pPersistencePath, QMap<QString, QVariant> metadatas);
virtual ~UBDocumentProxy();

Loading…
Cancel
Save