From d65218e0f88d3e0e30154ca4770d0760643cba44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Mon, 7 Oct 2019 15:10:24 +0200 Subject: [PATCH] Revert "be able to double click on ubx files (WIP)" This reverts commit adb884c8c903a7ac94d6c919e183f9a57e2fe7b4. --- release_scripts/linux/package.sh | 2 -- resources/linux/openboard-ubx.xml | 8 -------- src/core/UBApplication.cpp | 7 +------ src/core/UBApplicationController.cpp | 21 +-------------------- src/core/UBApplicationController.h | 1 - 5 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 resources/linux/openboard-ubx.xml diff --git a/release_scripts/linux/package.sh b/release_scripts/linux/package.sh index a2b4bd3a..7837431e 100755 --- a/release_scripts/linux/package.sh +++ b/release_scripts/linux/package.sh @@ -181,7 +181,6 @@ chown -R root:root $PACKAGE_DIRECTORY cp -R resources/customizations $PACKAGE_DIRECTORY/ cp resources/linux/openboard-ubz.xml $PACKAGE_DIRECTORY/etc/ -cp resources/linux/openboard-ubx.xml $PACKAGE_DIRECTORY/etc/ if $BUNDLE_QT; then cp -R resources/linux/run.sh $PACKAGE_DIRECTORY/ @@ -285,7 +284,6 @@ cat > "$BASE_WORKING_DIR/DEBIAN/postinst" << EOF xdg-desktop-menu install --novendor /usr/share/applications/${APPLICATION_CODE}.desktop xdg-mime install --mode system /$APPLICATION_PATH/$APPLICATION_CODE/etc/openboard-ubz.xml -xdg-mime install --mode system /$APPLICATION_PATH/$APPLICATION_CODE/etc/openboard-ubx.xml xdg-mime default /usr/share/applications/${APPLICATION_CODE}.desktop application/ubz ln -s $SYMLINK_TARGET /usr/bin/$APPLICATION_CODE diff --git a/resources/linux/openboard-ubx.xml b/resources/linux/openboard-ubx.xml deleted file mode 100644 index fef89461..00000000 --- a/resources/linux/openboard-ubx.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - OpenBoard documents set - Ensemble de documents OpenBoard - - - diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index cbbb2baa..194ea6e4 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -349,12 +349,7 @@ int UBApplication::exec(const QString& pFileToImport) boardController->setupLayout(); if (pFileToImport.length() > 0) - { - if (pFileToImport.endsWith(".ubx")) - UBApplication::applicationController->importUbx(pFileToImport); - else - UBApplication::applicationController->importFile(pFileToImport); - } + UBApplication::applicationController->importFile(pFileToImport); if (UBSettings::settings()->appStartMode->get().toInt()) applicationController->showDesktop(); diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index 143b84f3..38a4f5b3 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -675,6 +675,7 @@ void UBApplicationController::showMessage(const QString& message, bool showSpinn } } + void UBApplicationController::importFile(const QString& pFilePath) { const QFile fileToOpen(pFilePath); @@ -708,26 +709,6 @@ void UBApplicationController::importFile(const QString& pFilePath) } } -void UBApplicationController::importUbx(const QString& pFilePath) -{ - bool success = false; - - QFileInfoList list = UBDocumentManager::documentManager()->importUbx(pFilePath, UBSettings::userDocumentDirectory()); - - success = (list.length() != 0); - - if (success) - { - if (mMainMode == Board || mMainMode == Internet) - { - if (UBApplication::boardController) - { - showBoard(); - } - } - } -} - void UBApplicationController::useMultiScreen(bool use) { if (use && !mMirror) diff --git a/src/core/UBApplicationController.h b/src/core/UBApplicationController.h index 23fbdfc6..d36bae1f 100644 --- a/src/core/UBApplicationController.h +++ b/src/core/UBApplicationController.h @@ -93,7 +93,6 @@ class UBApplicationController : public QObject void showMessage(const QString& message, bool showSpinningWheel); void importFile(const QString& pFilePath); - void importUbx(const QString& pFilePath); UBDisplayManager* displayManager() {