diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2018-03-20 12:22:05 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2018-03-20 12:22:05 -0400 |
commit | 5ac1e95bd602a7bbd50274d26fb7c4ce9ec8edd8 (patch) | |
tree | c8d51c4c2a0e0ad47fd78d7ffe0b879198d0a73e /src-qt5/desktop-utils/lumina-pdf/mainUI.cpp | |
parent | Fixed highlighting on rotated pages and replaced tabs with spaces (diff) | |
download | lumina-5ac1e95bd602a7bbd50274d26fb7c4ce9ec8edd8.tar.gz lumina-5ac1e95bd602a7bbd50274d26fb7c4ce9ec8edd8.tar.bz2 lumina-5ac1e95bd602a7bbd50274d26fb7c4ce9ec8edd8.zip |
Disabled Properties, Find, and Bookmarks for Poppler but enabled by default for MuPDF
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/mainUI.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp index 1d1df0ce..3c2d1541 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp @@ -21,8 +21,6 @@ #include <LuminaXDG.h> #include "PrintWidget.h" -#define TESTING 0 - MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){ ui->setupUi(this); //this->setWindowTitle(tr("Lumina PDF Viewer")); @@ -210,6 +208,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){ ui->bookmarksFrame->setVisible(false); //TESTING features/functionality + bool TESTING = BACKEND->supportsExtraFeatures(); ui->actionSettings->setEnabled(TESTING); ui->actionSettings->setVisible(TESTING); ui->actionBookmarks->setEnabled(TESTING); @@ -218,14 +217,20 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){ ui->actionScroll_Mode->setVisible(TESTING); ui->actionSelect_Mode->setEnabled(TESTING); ui->actionSelect_Mode->setVisible(TESTING); - //ui->actionProperties->setEnabled(TESTING); - //ui->actionProperties->setVisible(TESTING); - //ui->menuSettings->setEnabled(TESTING); - //ui->menuSettings->setVisible(TESTING); + ui->actionProperties->setEnabled(TESTING); + ui->actionProperties->setVisible(TESTING); + ui->menuSettings->setEnabled(TESTING); + ui->menuSettings->setVisible(TESTING); if(!TESTING){ - //ui->menubar->removeAction(ui->menuSettings->menuAction() ); + ui->menubar->removeAction(ui->menuSettings->menuAction() ); } + ui->actionSettings->setEnabled(false); + ui->actionSettings->setVisible(false); + ui->actionScroll_Mode->setEnabled(false); + ui->actionScroll_Mode->setVisible(false); + ui->actionSelect_Mode->setEnabled(false); + ui->actionSelect_Mode->setVisible(false); } MainUI::~MainUI(){ @@ -236,6 +241,7 @@ void MainUI::loadFile(QString path){ if(!QFile::exists(path) || path.isEmpty() ){ return; } QString password; bool ok = true; + while( ok && !BACKEND->loadDocument(path, password) && BACKEND->needPassword() ){ password = QInputDialog::getText(this, tr("Unlock PDF"), tr("Password:"), QLineEdit::Password, "", &ok); if(!ok){ break; } //cancelled |