diff --git a/src/board/UBLibraryController.cpp b/src/board/UBLibraryController.cpp index 162c25ae..feea7f55 100644 --- a/src/board/UBLibraryController.cpp +++ b/src/board/UBLibraryController.cpp @@ -47,7 +47,7 @@ UBLibraryController::UBLibraryController(QWidget *pParentWidget, UBBoardControll userPath(mPicturesStandardDirectoryPath); mInteractiveUserDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->uniboardInteractiveUserDirectory()); - + createInternalWidgetItems(); } @@ -292,6 +292,9 @@ QList UBLibraryController::addVirtualElementsForItemPath(const QS content << listElementsInPath(path.toLocalFile()); content << listElementsInPath(UBSettings::settings()->uniboardDefaultUserImageLibraryDirectory()); } + else if (pPath == mInteractiveCategoryPath.toLocalFile()){ + content << listElementsInPath(UBSettings::settings()->sankoreDistributedInteractiveDirectory()); + } return content; } diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 277b87bc..776e5e19 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -1109,6 +1109,22 @@ QString UBSettings::uniboardInteractiveUserDirectory() } +QString UBSettings::sankoreDistributedInteractiveDirectory() +{ + QString defaultRelativePath = QString("./library/sankoreInteractivities"); + + QString configPath = value("Library/DefaultUserImageDirectory", QVariant(defaultRelativePath)).toString(); + + if (configPath.startsWith(".")) + { + return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1); + } + else + { + return configPath; + } +} + QString UBSettings::uniboardInteractiveLibraryDirectory() { QString defaultRelativePath = QString("./library/interactive"); diff --git a/src/core/UBSettings.h b/src/core/UBSettings.h index 3f240b53..d4720e66 100644 --- a/src/core/UBSettings.h +++ b/src/core/UBSettings.h @@ -109,6 +109,7 @@ class UBSettings : public QObject QString uniboardInteractiveUserDirectory(); QString uniboardInteractiveLibraryDirectory(); QString uniboardInteractiveFavoritesDirectory(); + QString sankoreDistributedInteractiveDirectory(); QString podcastRecordingDirectory();