SVN commit 605137 by kebekus: usability improvement: clean up menu M +1 -2 dataModel.cpp M +0 -10 dataModel.h M +0 -13 documentPageCache.cpp M +0 -1 documentPageCache.h M +0 -3 ligature.kcfg M +0 -16 ligaturepart.cpp M +0 -2 ligaturepart.h M +0 -1 ligaturepart.rc --- trunk/KDE/kdegraphics/ligature/shell/dataModel.cpp #605136:605137 @@ -39,8 +39,7 @@ DataModel::DataModel(QObject* parent) : QObject(parent), _numberOfPages(0), - resolutionInDPI(0.0), - _useCustomPageSize(false) + resolutionInDPI(0.0) { prefs = new KVSPrefs(); prefs->readConfig(); --- trunk/KDE/kdegraphics/ligature/shell/dataModel.h #605136:605137 @@ -182,12 +182,6 @@ /** Copy the selected text into the clipboard. */ void copyText() const { selection.copyText(); } - /** @returns true if a user selected paper size is used instead of the size - that is specified in the document. */ - bool useCustomPageSize() const { return _useCustomPageSize; } - - void setUseCustomPageSize(bool customPageSize) { _useCustomPageSize = customPageSize; } - /** @returns the paper size that is used when useCustomPageSize() is true. */ SimplePageSize userPreferredPageSize() const { return _userPreferredPageSize; } @@ -270,10 +264,6 @@ // This holds the currently selected text. TextSelection selection; - // True if a user selected paper size is used instead of the - // size that is specified in the document. - bool _useCustomPageSize; - // The paper size that is used when _useCustomPageSize is true. SimplePageSize _userPreferredPageSize; }; --- trunk/KDE/kdegraphics/ligature/shell/documentPageCache.cpp #605136:605137 @@ -78,9 +78,6 @@ } SimplePageSize s = renderer->sizeOfPage(page); - if (dataModel->useCustomPageSize()) - s = dataModel->userPreferredPageSize(); - if (!s.isValid()) { // If the size is invalid use the size of the first Page in the document @@ -326,16 +323,6 @@ } -void DocumentPageCache::setUseDocumentSpecifiedSize(bool b) -{ - bool valChanged = (dataModel->useCustomPageSize() != b); - - dataModel->setUseCustomPageSize(!b); - if (valChanged) - emit(paperSizeChanged()); -} - - QPixmap* DocumentPageCache::getThumbnail(const PageNumber& pageNr, int width) { // Paranoid checks --- trunk/KDE/kdegraphics/ligature/shell/documentPageCache.h #605136:605137 @@ -102,7 +102,6 @@ /** Sets the userPreferredSize, which is explained below */ void setUserPreferredSize(const SimplePageSize& t); - void setUseDocumentSpecifiedSize(bool); private: QPointer renderer; --- trunk/KDE/kdegraphics/ligature/shell/ligature.kcfg #605136:605137 @@ -20,9 +20,6 @@ true - - true - true --- trunk/KDE/kdegraphics/ligature/shell/ligaturepart.cpp #605136:605137 @@ -268,13 +268,9 @@ orientation->setItems(orientations); connect(orientation, SIGNAL(activated (int)), &userRequestedPaperSize, SLOT(setOrientation(int))); - useDocumentSpecifiedSize = new KToggleAction(i18n("&Use Document Specified Paper Size"), actionCollection(), "view_use_document_specified_size"); guessViewMode = new KToggleAction(i18n("&Guess View Mode When Opening A New File"), 0, this, SLOT(slotShowSidebar()), actionCollection(), "view_guess_viewmode"); - //FIXME: this has to be the wrong slot. - connect(useDocumentSpecifiedSize, SIGNAL(triggered()), this, SLOT(slotShowSidebar())); - zoomInAct = KStdAction::zoomIn (this, SLOT(zoomIn()), actionCollection()); zoomOutAct = KStdAction::zoomOut(this, SLOT(zoomOut()), actionCollection()); @@ -439,10 +435,8 @@ // Paper Size handling - setUseDocumentSpecifiedSize(useDocumentSpecifiedSize->isChecked()); setUserPreferredSize(userRequestedPaperSize); connect(&userRequestedPaperSize, SIGNAL(sizeChanged(const SimplePageSize&)), this, SLOT(setUserPreferredSize(const SimplePageSize&))); - connect(useDocumentSpecifiedSize, SIGNAL(toggled(bool)), this, SLOT(setUseDocumentSpecifiedSize(bool))); connect(scrollbarHandling, SIGNAL(toggled(bool)), pageView(), SLOT(slotShowScrollbars(bool))); @@ -1398,11 +1392,8 @@ currentPage = dataModel->currentPageNumber(); numberOfPages = dataModel->numberOfPages(); doc = !url().isEmpty(); - useDocumentSpecifiedSize->setEnabled(multiPage->hasSpecifiedPageSizes() ); } else - useDocumentSpecifiedSize->setEnabled(false); - if (dataModel->preferences()->viewMode() == KVSPrefs::EnumViewMode::Overview) { int visiblePages = dataModel->preferences()->overviewModeColumns() * dataModel->preferences()->overviewModeRows(); @@ -1549,12 +1540,6 @@ bool sbstatus = dataModel->preferences()->scrollbars(); scrollbarHandling->setChecked(sbstatus); - // Check if document specified paper sizes should be shown. We do - // not need to take any action here, because this method is called - // only in the constructor of the LigaturePart when no document is - // loaded. - useDocumentSpecifiedSize->setChecked(dataModel->preferences()->useDocumentSpecifiedSize()); - // Check if ligature should guess a good viewmode when opening a new // document guessViewMode->setChecked(dataModel->preferences()->guessViewMode()); @@ -1586,7 +1571,6 @@ dataModel->preferences()->setZoom(_zoomVal.value()); dataModel->preferences()->setPaperFormat(userRequestedPaperSize.serialize()); dataModel->preferences()->setScrollbars(scrollbarHandling->isChecked()); - dataModel->preferences()->setUseDocumentSpecifiedSize(useDocumentSpecifiedSize->isChecked()); dataModel->preferences()->setGuessViewMode(guessViewMode->isChecked()); if (fitPageAct->isChecked()) --- trunk/KDE/kdegraphics/ligature/shell/ligaturepart.h #605136:605137 @@ -236,7 +236,6 @@ KAction* settingsAction; KToggleAction* watchAct; - KToggleAction* useDocumentSpecifiedSize; KToggleAction* guessViewMode; KToggleAction* fitPageAct; KToggleAction* fitHeightAct; @@ -387,7 +386,6 @@ /** Sets the userPreferredSize, which is explained below */ void setUserPreferredSize(const SimplePageSize& t) { pageCache->setUserPreferredSize(t); } - void setUseDocumentSpecifiedSize(bool b) { pageCache->setUseDocumentSpecifiedSize(b); } /** Initialize/Update PageWidgets, thumbnail list and bookmark list --- trunk/KDE/kdegraphics/ligature/shell/ligaturepart.rc #605136:605137 @@ -31,7 +31,6 @@ -