[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kviewshell-0.7/ligature/shell
From: Stefan Kebekus <kebekus () kde ! org>
Date: 2006-11-15 14:48:43
Message-ID: 1163602123.588042.20131.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 605138 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 -15 ligaturepart.cpp
M +0 -2 ligaturepart.h
M +0 -1 ligaturepart.rc
--- branches/work/kviewshell-0.7/ligature/shell/dataModel.cpp #605137:605138
@@ -31,8 +31,7 @@
DataModel::DataModel(QObject* parent)
: QObject(parent),
_numberOfPages(0),
- resolutionInDPI(0.0),
- _useCustomPageSize(false)
+ resolutionInDPI(0.0)
{
prefs.readConfig();
Length w,h;
--- branches/work/kviewshell-0.7/ligature/shell/dataModel.h #605137:605138
@@ -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; }
@@ -266,10 +260,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;
--- branches/work/kviewshell-0.7/ligature/shell/documentPageCache.cpp #605137:605138
@@ -80,9 +80,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
@@ -332,16 +329,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
--- branches/work/kviewshell-0.7/ligature/shell/documentPageCache.h #605137:605138
@@ -99,7 +99,6 @@
/** Sets the userPreferredSize, which is explained below */
void setUserPreferredSize(const SimplePageSize& t);
- void setUseDocumentSpecifiedSize(bool);
private:
QGuardedPtr<DocumentRenderer> renderer;
--- branches/work/kviewshell-0.7/ligature/shell/ligature.kcfg #605137:605138
@@ -20,9 +20,6 @@
<entry key="Scrollbars" type="Bool">
<default>true</default>
</entry>
- <entry key="UseDocumentSpecifiedSize" type="Bool">
- <default>true</default>
- </entry>
<entry key="GuessViewMode" type="Bool">
<default>true</default>
</entry>
--- branches/work/kviewshell-0.7/ligature/shell/ligaturepart.cpp #605137:605138
@@ -277,8 +277,6 @@
orientation->setItems(orientations);
connect(orientation, SIGNAL(activated (int)), &userRequestedPaperSize, \
SLOT(setOrientation(int)));
- useDocumentSpecifiedSize = new KToggleAction(i18n("&Use Document Specified Paper \
Size"), 0, this, SLOT(slotShowSidebar()),
- 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");
@@ -368,12 +366,9 @@
// 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)));
-
// ScrollBars
connect(scrollbarHandling, SIGNAL(toggled(bool)), pageView(), \
SLOT(slotShowScrollbars(bool)));
@@ -1315,11 +1310,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(); @@ -1466,12 +1458,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());
@@ -1503,7 +1489,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())
--- branches/work/kviewshell-0.7/ligature/shell/ligaturepart.h #605137:605138
@@ -241,7 +241,6 @@
KAction* settingsAction;
KToggleAction* watchAct;
- KToggleAction* useDocumentSpecifiedSize;
KToggleAction* guessViewMode;
KToggleAction* fitPageAct;
KToggleAction* fitHeightAct;
@@ -391,7 +390,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
--- branches/work/kviewshell-0.7/ligature/shell/ligaturepart.rc #605137:605138
@@ -33,7 +33,6 @@
<Separator/>
<Action name="view_media"/>
<Action name="view_orientation"/>
- <Action name="view_use_document_specified_size"/>
<Separator/>
<Action name="view_zoom_in"/>
<Action name="view_zoom_out"/>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic