Bug 64749 - Pressing page down should always go to the top of the nextpage
Summary: Pressing page down should always go to the top of the nextpage
Status: RESOLVED FIXED
Alias: None
Product: kghostview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Luís Pedro Coelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-22 21:13 UTC by Thomas Zander
Modified: 2005-10-12 12:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander 2003-09-22 21:13:40 UTC
Version:           0.20 (using KDE 3.1.9)
Compiler:          gcc version 3.3.1 20030626 (Debian prerelease)
OS:          Linux (i686) release 2.4.21

The scrolling of kghostview when using the keyboard is totally off from the way it is described in the styleguide.

Since the styleguide uses a postscript viewer as an example, please just read that page;
http://developer.kde.org/documentation/standards/kde/style/keys/cursorKeys.html
Comment 1 Luís Pedro Coelho 2004-01-07 00:58:14 UTC
Someone had asked for the opposite in Bug 58514 :)
Comment 2 Thomas Zander 2004-01-07 10:06:04 UTC
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
Comment 3 Luís Pedro Coelho 2004-01-11 20:38:19 UTC
I agree with the reasoning above.
I will change this after 3.2 is out.

(confirming bug as NEW).

luis
Comment 4 Luís Pedro Coelho 2004-02-04 15:58:04 UTC
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();
 }
 


Comment 5 greatbunzinni 2005-10-12 12:25:37 UTC
It seems that this functionality is still not present in the current release of KGhostView.