From 70b0ea9459e5a6fec95a35a412e4b4bc10614b27 Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Wed, 3 Oct 2012 18:21:20 +0300 Subject: [PATCH 1/4] Fixed appearing of display view upper control view at mode changing from web to board. --- src/core/UBDisplayManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index 6a07b0bf..d241772b 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -148,12 +148,14 @@ void UBDisplayManager::setDisplayWidget(QWidget* pDisplayWidget) { if (mDisplayWidget) { + mDisplayWidget->hide(); pDisplayWidget->setGeometry(mDisplayWidget->geometry()); pDisplayWidget->setWindowFlags(mDisplayWidget->windowFlags()); } mDisplayWidget = pDisplayWidget; mDisplayWidget->setGeometry(mDesktop->screenGeometry(mDisplayScreenIndex)); - mDisplayWidget->showFullScreen(); + if (UBSettings::settings()->appUseMultiscreen->get().toBool()) + mDisplayWidget->showFullScreen(); // !!!! Should be included into Windows after QT recompilation #ifdef Q_WS_MAC // mDisplayWidget->setAttribute(Qt::WA_MacNoShadow); From 6c5dcd6696739ac4c0853798ee10c433652f0439 Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Thu, 4 Oct 2012 10:55:53 +0300 Subject: [PATCH 2/4] Corrected moving features to trash. --- src/gui/UBFeaturesWidget.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp index 6ee337cf..0709058f 100644 --- a/src/gui/UBFeaturesWidget.cpp +++ b/src/gui/UBFeaturesWidget.cpp @@ -169,10 +169,9 @@ void UBFeaturesWidget::deleteElements( const UBFeaturesMimeData * mimeData ) void UBFeaturesWidget::deleteSelectedElements() { QModelIndexList selected = centralWidget->listView()->selectionModel()->selectedIndexes(); - - foreach ( QModelIndex sel, selected ) + do { - UBFeature feature = sel.data(Qt::UserRole + 1).value(); + UBFeature feature = controller->getFeature(selected.at(0), objNameFeatureList); if (feature.isDeletable()) { if (feature.inTrash()) { controller->deleteItem(feature); @@ -180,8 +179,12 @@ void UBFeaturesWidget::deleteSelectedElements() controller->moveToTrash(feature, true); } } - } - controller->refreshModels(); + selected = centralWidget->listView()->selectionModel()->selectedIndexes(); + if (!selected.isEmpty()) + centralWidget->listView()->selectionModel()->select(selected.at(0), QItemSelectionModel::Deselect); + }while (!selected.isEmpty()); + + controller->refreshModels(); } void UBFeaturesWidget::rescanModel() From 828ae2272fb90b04dcb6d2bc51f2a0c9f1248114 Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Thu, 4 Oct 2012 12:04:32 +0300 Subject: [PATCH 3/4] Deletion from library is more stable. Imported to library pictures has unique names. --- src/board/UBFeaturesController.cpp | 18 +++++++++++++++--- src/gui/UBFeaturesWidget.cpp | 15 +++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/board/UBFeaturesController.cpp b/src/board/UBFeaturesController.cpp index afc6026e..33682bdb 100644 --- a/src/board/UBFeaturesController.cpp +++ b/src/board/UBFeaturesController.cpp @@ -641,19 +641,31 @@ void UBFeaturesController::importImage(const QImage &image, const QString &fileN void UBFeaturesController::importImage( const QImage &image, const UBFeature &destination, const QString &fileName ) { QString mFileName = fileName; + QString filePath; + UBFeature dest = destination; if (mFileName.isNull()) { QDateTime now = QDateTime::currentDateTime(); - mFileName = tr("ImportedImage") + "-" + now.toString("dd-MM-yyyy hh-mm-ss") + ".png"; + static int imageCounter = 0; + mFileName = tr("ImportedImage") + "-" + now.toString("dd-MM-yyyy hh-mm-ss"); + + filePath = dest.getFullPath().toLocalFile() + "/" + mFileName; + + if (QFile::exists(filePath+".png")) + mFileName += QString("-[%1]").arg(++imageCounter); + else + imageCounter = 0; + + mFileName += ".png"; } + - UBFeature dest = destination; if ( !destination.getFullVirtualPath().startsWith( picturesElement.getFullVirtualPath(), Qt::CaseInsensitive ) ) { dest = picturesElement; } - QString filePath = dest.getFullPath().toLocalFile() + "/" + mFileName; + filePath = dest.getFullPath().toLocalFile() + "/" + mFileName; image.save(filePath); QImage thumb = createThumbnail( filePath ); diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp index 0709058f..20199a7c 100644 --- a/src/gui/UBFeaturesWidget.cpp +++ b/src/gui/UBFeaturesWidget.cpp @@ -169,9 +169,15 @@ void UBFeaturesWidget::deleteElements( const UBFeaturesMimeData * mimeData ) void UBFeaturesWidget::deleteSelectedElements() { QModelIndexList selected = centralWidget->listView()->selectionModel()->selectedIndexes(); - do + + QList featureasToMove; + for (int i = 0; i < selected.count(); i++) + { + featureasToMove.append(controller->getFeature(selected.at(i), objNameFeatureList)); + } + + foreach (UBFeature feature, featureasToMove) { - UBFeature feature = controller->getFeature(selected.at(0), objNameFeatureList); if (feature.isDeletable()) { if (feature.inTrash()) { controller->deleteItem(feature); @@ -179,10 +185,7 @@ void UBFeaturesWidget::deleteSelectedElements() controller->moveToTrash(feature, true); } } - selected = centralWidget->listView()->selectionModel()->selectedIndexes(); - if (!selected.isEmpty()) - centralWidget->listView()->selectionModel()->select(selected.at(0), QItemSelectionModel::Deselect); - }while (!selected.isEmpty()); + } controller->refreshModels(); } From 0875008392568a39e46b77b0bbcab908f13eae34 Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Fri, 5 Oct 2012 11:07:47 +0300 Subject: [PATCH 4/4] Windows installation script fixed - QtMultimedia installs in correct directory. --- Sankore 3.1.iss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sankore 3.1.iss b/Sankore 3.1.iss index 28938048..3feaa618 100644 --- a/Sankore 3.1.iss +++ b/Sankore 3.1.iss @@ -83,13 +83,13 @@ Source: "..\Qt-4.8\plugins\phonon_backend\phonon_ds94.dll"; DestDir: "{app}\phon ; NOTE: Don't use "Flags: ignoreversion" on any shared system files ;qt multimedia plugins -Source: "c:\OpenSankore\plugins\mediaservice\dsengine.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion -Source: "c:\OpenSankore\plugins\mediaservice\dsengined.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion -Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengine.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion -Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengined.dll"; DestDir: "c:\OpenSankore\mediaservice"; Flags: ignoreversion +Source: "c:\OpenSankore\plugins\mediaservice\dsengine.dll"; DestDir: "c:\OpenSankore\plugins\mediaservice"; Flags: ignoreversion +Source: "c:\OpenSankore\plugins\mediaservice\dsengined.dll"; DestDir: "c:\OpenSankore\plugins\mediaservice"; Flags: ignoreversion +Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengine.dll"; DestDir: "c:\OpenSankore\plugins\mediaservice"; Flags: ignoreversion +Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengined.dll"; DestDir: "c:\OpenSankore\plugins\mediaservice"; Flags: ignoreversion -Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3u.dll"; DestDir: "c:\OpenSankore\playlistformats"; Flags: ignoreversion -Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3ud.dll"; DestDir: "c:\OpenSankore\playlistformats"; Flags: ignoreversion +Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3u.dll"; DestDir: "c:\OpenSankore\plugins\playlistformats"; Flags: ignoreversion +Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3ud.dll"; DestDir: "c:\OpenSankore\plugins\playlistformats"; Flags: ignoreversion [Icons] Name: "{group}\Open-Sankoré"; Filename: "{app}\Open-Sankore.exe"