Summary: | kghostview (as konqueror part) opening next document breaks paper orientation | ||
---|---|---|---|
Product: | [Unmaintained] kghostview | Reporter: | frank.dekervel |
Component: | general | Assignee: | Wilco Greven <greven> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Proposed fix against CVS HEAD |
Description
frank.dekervel
2002-11-21 20:11:52 UTC
Hi, The bug report is about kghostview used as a part, but it affects kghostview as an app as well. The attached patch seems to fixed it. It changes the behaviour slightly to be, IMHO, more correct. Before, none of the options were checked by default. Now, "Auto" (which is default behaviour) is checked until you select something else. So this reflects the state of the program better. HTH -- Luis Pedro Coelho check out my game of hearts for the KDE at http://hearts.sf.net Created attachment 573 [details]
Proposed fix against CVS HEAD
Subject: KDE_3_1_BRANCH: kdegraphics/kghostview CVS commit by luis_pedro: Apply my own patch from when I didn't have a CVS account. This goes towards fixing bug 51014. It works in BRANCH, but HEAD has been changed since my patch and needs porting. CCMAIL: 51014@bugs.kde.org M +11 -1 kgv_view.cpp 1.110.2.2 M +5 -0 kgv_view.h 1.54.2.1 --- kdegraphics/kghostview/kgv_view.h #1.54:1.54.2.1 @@ -135,4 +135,9 @@ protected: void writeSettings(); + /** + * Resets the menu settings, i.e. sets View->Orientation to "Auto", etc. + */ + void resetMenu(); + private: KGVBrowserExtension* _extension; --- kdegraphics/kghostview/kgv_view.cpp #1.110.2.1:1.110.2.2 @@ -474,4 +474,5 @@ bool KGVPart::openURL( const KURL& url ) SLOT( slotMimetypeError() ) ); + resetMenu(); return true; } @@ -601,5 +602,8 @@ void KGVPart::slotJobFinished( KIO::Job* emit canceled( job->errorString() ); else + { _docManager->openFile( m_file, _mimetype ); + resetMenu(); + } } @@ -612,4 +616,5 @@ void KGVPart::slotFileDirty( const QStri _currentPage = _docManager->currentPage(); _docManager->openFile( m_file, _mimetype ); + resetMenu(); } } @@ -687,4 +692,9 @@ void KGVPart::slotZoomOut() } +void KGVPart::resetMenu() +{ + _selectOrientation->setCurrentItem( 0 ); // Auto + _selectMedia->setCurrentItem( 0 ); // Auto +} KGVBrowserExtension::KGVBrowserExtension( KGVPart *parent ) : Subject: kdegraphics/kghostview CVS commit by luis_pedro: Forward porting of fix to Bug 51014: opening next document breaks paper orientation. We need to restore the display options to their default settings on opening a new document. Note that we shouldn't do that if we are reloading a document which changed. CCMAIL: 51014-done@bugs.kde.org M +1 -0 kgv_view.cpp 1.129 --- kdegraphics/kghostview/kgv_view.cpp #1.128:1.129 @@ -554,4 +554,5 @@ void KGVPart::slotOpenFileCompleted() else { + setOptions( DisplayOptions() ); _docManager->goToPage( _currentPage ); stateChanged( "documentState" ); |