Summary: | Pressing page down should always go to the top of the nextpage | ||
---|---|---|---|
Product: | [Applications] kghostview | Reporter: | Thomas Zander <zander> |
Component: | general | Assignee: | Luís Pedro Coelho <luis> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Thomas Zander
2003-09-22 21:13:40 UTC
Someone had asked for the opposite in Bug 58514 :) Bug 58514 bug does not conflict in usage from the styleguide, it just wanted the functionality that _should_ have been available in the first place. Now all that is needed is to place them on the right keys. Bug 58514 made the page-up functionality be the stuff expected under the ctrl-page-up. But, please read the link I sent; its been available since KDE2.0 I agree with the reasoning above. I will change this after 3.2 is out. (confirming bug as NEW). luis Subject: kdegraphics/kghostview CVS commit by luis_pedro: Make PgUp + PgDwn behaviours match style guide. CCMAIL: 64749-close@bugs.kde.org M +3 -3 kgv_part.rc 1.35 M +13 -26 kgv_view.cpp 1.174 --- kdegraphics/kghostview/kgv_part.rc #1.34:1.35 @@ -1,4 +1,4 @@ <!DOCTYPE kpartgui> -<kpartgui name="KGhostView" version="17"> +<kpartgui name="KGhostView" version="18"> <State name="initState"> <Disable> @@ -93,7 +93,7 @@ <Action name="zoomTo" /> <Action name="zoomOut"/> - <Action name="prevPage"/> - <Action name="nextPage"/> <Action name="goToStart"/> + <Action name="readUp"/> + <Action name="readDown"/> <Action name="goToEnd"/> </ToolBar> --- kdegraphics/kghostview/kgv_view.cpp #1.173:1.174 @@ -35,4 +35,5 @@ #include <kpopupmenu.h> #include <kstdaction.h> +#include <kstdaccel.h> #include <ktempfile.h> #include <kio/scheduler.h> @@ -270,9 +271,9 @@ KGVPart::KGVPart( QWidget* parentWidget, */ - _prevPage = KStdAction::prior( this, SLOT( slotPrevPage() ), + _prevPage = new KAction( i18n( "Previous Page" ), CTRL+Key_PageUp, this, SLOT( slotPrevPage() ), actionCollection(), "prevPage" ); _prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) ); - _nextPage = KStdAction::next( this, SLOT( slotNextPage() ), + _nextPage = new KAction( i18n( "Next Page" ), CTRL + Key_PageDown, this, SLOT( slotNextPage() ), actionCollection(), "nextPage" ); _nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) ); @@ -286,10 +287,14 @@ KGVPart::KGVPart( QWidget* parentWidget, _lastPage->setWhatsThis( i18n( "Moves to the last page of the document" ) ); + KShortcut readUpShort = KStdAccel::shortcut( KStdAccel::Prior ); + readUpShort.append( KKey( SHIFT+Key_Space ) ); _readUp = new KAction( i18n( "Read Up Document" ), "previous", - SHIFT+Key_Space, this, SLOT( slotReadUp() ), + readUpShort, this, SLOT( slotReadUp() ), actionCollection(), "readUp" ); - // don't specify Key_Space as Accel, it breaks the lineedit in konq! (Simon) + + KShortcut readDownShort = KStdAccel::shortcut( KStdAccel::Next ); + readDownShort.append( KKey( Key_Space ) ); _readDown = new KAction( i18n( "Read Down Document" ), "next", - /*Key_Space*/0, this, SLOT( slotReadDown() ), + readDownShort, this, SLOT( slotReadDown() ), actionCollection(), "readDown" ); @@ -489,30 +494,12 @@ void KGVPart::slotReadDown() void KGVPart::slotPrevPage() { - if( !( document() && document()->isOpen() ) ) - return; - + if( !document() || !document()->isOpen() ) return; _docManager->prevPage(); - // I am commenting the line below in response to 58514 - // I am afraid that someone will dislike the new behaviour, though :-) - // - // BTW, this seems to mirror kdvi, although I admit I don't use that app - // much, so I could be wrong. - // - // If no one does, then the comment should be reverted. - // LPC (27 Jun 2003) - //_pageView->scrollTop(); } void KGVPart::slotNextPage() { - - if( !( document() && document()->isOpen() ) ) - return; - if( _docManager->nextPage() ) { - // See above - //_pageView->scrollTop(); - } - else - _pageView->scrollBottom(); + if( !document() || !document()->isOpen() ) return; + _docManager->nextPage(); } It seems that this functionality is still not present in the current release of KGhostView. |