Bug 117271 - JJ: make zoom to page persistent
Summary: JJ: make zoom to page persistent
Status: RESOLVED FIXED
Alias: None
Product: kword
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Thomas Zander
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-29 12:48 UTC by Thomas Zander
Modified: 2005-12-17 01:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
new zoom mode class (18.41 KB, patch)
2005-12-15 17:01 UTC, Johannes Schaub
Details
second try (18.16 KB, patch)
2005-12-15 18:14 UTC, Johannes Schaub
Details
third try. hopely the last. (17.74 KB, patch)
2005-12-15 18:54 UTC, Johannes Schaub
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander 2005-11-29 12:48:03 UTC
Version:           1.4 post (using KDE 3.5 (RC1), compiled sources)
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.13.2

In KWord trunk (aka HEAD) the 'Fit to Width' type zooming works a lot better then it did in 1.4.2.

The only thing missing is that it does not yes save the zoom state to the config file.  What it does instead is save the current zoom percentage and that gets re-applied the next restart.  Forgetting that it should rezoom when the window size changes.

The KWView class has changeZoomMenu and showZoom.
It uses the KoZoomHandler::zoom() integer.  Not sure where its being saved to the config.
Comment 1 David Faure 2005-11-29 14:39:17 UTC
On Tuesday 29 November 2005 12:48, Thomas Zander wrote:
> Not sure where its being saved to the config.

KWDocument.cpp:435
      config->writeEntry( "Zoom", m_zoom );

I guess we need to save two things: zoom type and zoom value.
Comment 2 Johannes Schaub 2005-12-15 17:01:25 UTC
Created attachment 13929 [details]
new zoom mode class
Comment 3 Johannes Schaub 2005-12-15 17:01:48 UTC
so, attached a patch which fixes the issue in kword. created a global class KoZoomMode which is in lib and can be used by all programs. it manages zoom modes like "Fit to Page" and converts between these names and enum values like ZOOM_PAGE. so far only kword uses it. patch is attached above
Comment 4 Johannes Schaub 2005-12-15 18:14:06 UTC
Created attachment 13930 [details]
second try
Comment 5 Johannes Schaub 2005-12-15 18:54:36 UTC
Created attachment 13931 [details]
third try. hopely the last.
Comment 6 David Faure 2005-12-15 19:23:26 UTC
(For anyone looking at this BR:
I was commenting the patches on IRC between every iteration. Last one looks fine,
except for the inlined method calling i18n()).

I have suggested to Johannes to get a SVN account so that he can commit his patch.

David.
Comment 7 Johannes Schaub 2005-12-17 01:56:34 UTC
zoom to page/width is saved correctly now