From f776cdbab621bc2e732bcfa2c77a3a7cc64b841e Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Mon, 27 Jun 2011 11:22:53 +0200 Subject: [PATCH] changed Uniboard with Sankore --- src/adaptors/UBExportDocument.cpp | 2 +- src/adaptors/UBImportVirtualPrinter.cpp | 8 ++-- src/adaptors/UBMetadataDcSubsetAdaptor.cpp | 2 +- src/adaptors/UBSvgSubsetAdaptor.cpp | 2 +- src/adaptors/UBWebPublisher.cpp | 2 +- .../publishing/UBDocumentPublisher.cpp | 6 +-- src/board/UBBoardController.cpp | 2 +- src/core/UBDocumentManager.cpp | 4 +- src/core/UBPersistenceManager.cpp | 2 +- src/document/UBDocumentController.cpp | 2 +- src/frameworks/UBPlatformUtils_mac.mm | 42 +++++++++---------- src/podcast/UBPodcastController.cpp | 2 +- src/web/browser/WBWebView.cpp | 2 +- 13 files changed, 40 insertions(+), 38 deletions(-) diff --git a/src/adaptors/UBExportDocument.cpp b/src/adaptors/UBExportDocument.cpp index af2ba68f..962b9502 100644 --- a/src/adaptors/UBExportDocument.cpp +++ b/src/adaptors/UBExportDocument.cpp @@ -99,5 +99,5 @@ QString UBExportDocument::exportExtention() QString UBExportDocument::exportName() { - return tr("Export to Uniboard Format"); + return tr("Export to Sankore Format"); } diff --git a/src/adaptors/UBImportVirtualPrinter.cpp b/src/adaptors/UBImportVirtualPrinter.cpp index ca7919c0..95fecea4 100644 --- a/src/adaptors/UBImportVirtualPrinter.cpp +++ b/src/adaptors/UBImportVirtualPrinter.cpp @@ -132,7 +132,7 @@ void UBImportVirtualPrinter::cleanUp(const QFile& pFile, const QString& pPdfFile UBDocumentProxy* UBImportVirtualPrinter::importFile(const QFile& pFile, const QString& pGroup) { - UBApplication::showMessage(tr("Importing Uniboard printer file ...")); + UBApplication::showMessage(tr("Importing Sankore printer file ...")); UBDocumentProxy *document = 0; QString pdfFilename = pdfFileName(pFile); @@ -159,7 +159,7 @@ UBDocumentProxy* UBImportVirtualPrinter::importFile(const QFile& pFile, const QS if (!document) { - UBApplication::showMessage(tr("Error while importing Uniboard printer file.")); + UBApplication::showMessage(tr("Error while importing Sankore printer file.")); } cleanUp(pFile, pdfFilename, emfFileNames(pFile)); @@ -170,7 +170,7 @@ UBDocumentProxy* UBImportVirtualPrinter::importFile(const QFile& pFile, const QS bool UBImportVirtualPrinter::addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile) { - UBApplication::showMessage(tr("Importing Uniboard printer file ...")); + UBApplication::showMessage(tr("Importing Sankore printer file ...")); bool result = false; QString pdfFilename = pdfFileName(pFile); @@ -183,7 +183,7 @@ bool UBImportVirtualPrinter::addFileToDocument(UBDocumentProxy* pDocument, const if (!result) { - UBApplication::showMessage(tr("Error while importing Uniboard printer file.")); + UBApplication::showMessage(tr("Error while importing Sankore printer file.")); } cleanUp(pFile, pdfFilename, emfFileNames(pFile)); diff --git a/src/adaptors/UBMetadataDcSubsetAdaptor.cpp b/src/adaptors/UBMetadataDcSubsetAdaptor.cpp index 72a54552..4bb689e5 100644 --- a/src/adaptors/UBMetadataDcSubsetAdaptor.cpp +++ b/src/adaptors/UBMetadataDcSubsetAdaptor.cpp @@ -204,7 +204,7 @@ QMap UBMetadataDcSubsetAdaptor::load(QString pPath) if (xml.hasError()) { - qWarning() << "error parsing uniboard metadata.rdf file " << xml.errorString(); + qWarning() << "error parsing sankore metadata.rdf file " << xml.errorString(); } } diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index ef825ab9..e8de8cf9 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -770,7 +770,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() if (mXmlReader.hasError()) { - qWarning() << "error parsing uniboard file " << mXmlReader.errorString(); + qWarning() << "error parsing Sankore file " << mXmlReader.errorString(); } if (scene) diff --git a/src/adaptors/UBWebPublisher.cpp b/src/adaptors/UBWebPublisher.cpp index 80133b34..36b3c08c 100644 --- a/src/adaptors/UBWebPublisher.cpp +++ b/src/adaptors/UBWebPublisher.cpp @@ -28,7 +28,7 @@ UBWebPublisher::~UBWebPublisher() QString UBWebPublisher::exportName() { - return tr("Publish Document on Uniboard Web"); + return tr("Publish Document on Sankore Web"); } diff --git a/src/adaptors/publishing/UBDocumentPublisher.cpp b/src/adaptors/publishing/UBDocumentPublisher.cpp index 3d98d92d..bd09c1a5 100644 --- a/src/adaptors/publishing/UBDocumentPublisher.cpp +++ b/src/adaptors/publishing/UBDocumentPublisher.cpp @@ -676,7 +676,7 @@ void UBDocumentPublisher::sendZipToUniboardWeb(const QString& zipFilePath, const if(!zipFile.open(QIODevice::ReadOnly)) { - qWarning() << "Cannot open file" << zipFilePath << "for upload to Uniboard Web"; + qWarning() << "Cannot open file" << zipFilePath << "for upload to Sankore Web"; return; } @@ -712,7 +712,7 @@ void UBDocumentPublisher::uploadProgress(qint64 bytesSent, qint64 bytesTotal) int percentage = (((qreal)bytesSent / (qreal)bytesTotal ) * 100); if (bytesSent < bytesTotal) - UBApplication::showMessage(tr("Upload to Uniboard Web in progress %1 %").arg(percentage), true); + UBApplication::showMessage(tr("Upload to Sankore Web in progress %1 %").arg(percentage), true); else UBApplication::showMessage(tr("Sending document ..."), true); @@ -727,7 +727,7 @@ void UBDocumentPublisher::postZipUploadResponse(bool success, const QByteArray& } else { - qWarning() << "error uploading document to Uniboard Web" << QString::fromUtf8(payload); + qWarning() << "error uploading document to Sankore Web" << QString::fromUtf8(payload); QString errorMessage = QString::fromUtf8(payload); diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index 69b4d262..f8043fd0 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -956,7 +956,7 @@ void UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QString } else { - UBApplication::showMessage(tr("Flash is not supported on Uniboard Linux")); + UBApplication::showMessage(tr("Flash is not supported on Sankore Linux")); } } else if (mimeType.startsWith("application/pdf")) diff --git a/src/core/UBDocumentManager.cpp b/src/core/UBDocumentManager.cpp index e041ecc9..402009a5 100644 --- a/src/core/UBDocumentManager.cpp +++ b/src/core/UBDocumentManager.cpp @@ -29,6 +29,7 @@ #include "UBPersistenceManager.h" #include "core/memcheck.h" +#include "../adaptors/UBExportWeb.h" UBDocumentManager* UBDocumentManager::sDocumentManager = 0; @@ -53,9 +54,10 @@ UBDocumentManager::UBDocumentManager(QObject *parent) UBExportFullPDF* exportFullPdf = new UBExportFullPDF(this); mExportAdaptors.append(exportFullPdf); - UBExportDocument* exportDocument = new UBExportDocument(this); mExportAdaptors.append(exportDocument); + UBExportWeb* exportWeb = new UBExportWeb(this); + mExportAdaptors.append(exportWeb); UBImportDocument* documentImport = new UBImportDocument(this); mImportAdaptors.append(documentImport); diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 2729c10e..14752c4c 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -1000,7 +1000,7 @@ void UBPersistenceManager::checkIfDocumentRepositoryExists() QMessageBox::question( QApplication::activeWindow(), tr("Document Repository Loss"), - tr("Uniboard has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.").arg(humanPath), + tr("Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.").arg(humanPath), QMessageBox::Yes); UBApplication::quit(); diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 34600c79..bd0e48b8 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -1446,7 +1446,7 @@ bool UBDocumentController::isOKToOpenDocument(UBDocumentProxy* proxy) else { if (QMessageBox::question( 0, tr("Open Document"), - tr("The document '%1' has been generated with a newer version of Uniboard (%2). By opening it, you may lose some information. Do you want to proceed?") + tr("The document '%1' has been generated with a newer version of Sankore (%2). By opening it, you may lose some information. Do you want to proceed?") .arg(proxy->metaData(UBSettings::documentName).toString()) .arg(docVersion), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) diff --git a/src/frameworks/UBPlatformUtils_mac.mm b/src/frameworks/UBPlatformUtils_mac.mm index 828e0292..c92a6746 100644 --- a/src/frameworks/UBPlatformUtils_mac.mm +++ b/src/frameworks/UBPlatformUtils_mac.mm @@ -46,8 +46,8 @@ void UBPlatformUtils::init() NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSString *currentPath = [[NSBundle mainBundle] pathForResource:@"Save PDF to Uniboard" ofType:@"workflow"]; - NSString *installedPath = [[[@"~/Library/PDF Services" stringByExpandingTildeInPath] stringByAppendingPathComponent:@"Save PDF to Uniboard"] stringByAppendingPathExtension:@"workflow"]; + 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 *currentVersion = bundleShortVersion([NSBundle bundleWithPath:currentPath]); NSString *installedVersion = bundleShortVersion([NSBundle bundleWithPath:installedPath]); @@ -59,7 +59,7 @@ void UBPlatformUtils::init() BOOL copyOK = [fileManager copyPath:currentPath toPath:installedPath handler:nil]; if (!copyOK) { - qWarning("Could not install the 'Save PDF to Uniboard' workflow"); + qWarning("Could not install the 'Save PDF to Sankore' workflow"); } } @@ -364,25 +364,25 @@ KEYBT* createKeyBt(const UCKeyboardLayout* keyLayout, int vkk) void UBPlatformUtils::initializeKeyboardLayouts() { - CFStringRef keys[] = { kTISPropertyInputSourceCategory, kTISPropertyInputSourceIsEnableCapable, kTISPropertyInputSourceIsSelectCapable }; - const void* values[] = { kTISCategoryKeyboardInputSource, kCFBooleanTrue, kCFBooleanTrue }; - CFDictionaryRef dict = CFDictionaryCreate(NULL, (const void **)keys, (const void **)values, 3, NULL, NULL); - CFArrayRef kbds = TISCreateInputSourceList(dict, false); - - int count = CFArrayGetCount(kbds); + CFStringRef keys[] = { kTISPropertyInputSourceCategory, kTISPropertyInputSourceIsEnableCapable, kTISPropertyInputSourceIsSelectCapable }; + const void* values[] = { kTISCategoryKeyboardInputSource, kCFBooleanTrue, kCFBooleanTrue }; + CFDictionaryRef dict = CFDictionaryCreate(NULL, (const void **)keys, (const void **)values, 3, NULL, NULL); + CFArrayRef kbds = TISCreateInputSourceList(dict, false); + + int count = CFArrayGetCount(kbds); QList result; - + for(int i=0; ivideoFileExtension(); + videoFileName = mPodcastRecordingPath + "/" + tr("Sankore Cast") + "." + mVideoEncoder->videoFileExtension(); } videoFileName = UBFileSystemUtils::nextAvailableFileName(videoFileName, " "); diff --git a/src/web/browser/WBWebView.cpp b/src/web/browser/WBWebView.cpp index 7d9c3f74..16bf05d2 100644 --- a/src/web/browser/WBWebView.cpp +++ b/src/web/browser/WBWebView.cpp @@ -151,7 +151,7 @@ void WBWebPage::handleUnsupportedContent(QNetworkReply *reply) if (isPDF) { QMessageBox messageBox(mainWindow()); - messageBox.setText(tr("Download PDF Document: would you prefer to download the PDF file or add it to the current Uniboard document?")); + messageBox.setText(tr("Download PDF Document: would you prefer to download the PDF file or add it to the current Sankore document?")); messageBox.addButton(tr("Download"), QMessageBox::AcceptRole); QAbstractButton *addButton =