Bug 97307 - save zoom settings in kpdf
Summary: save zoom settings in kpdf
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: 0.4
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
: 99608 107289 107601 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-18 08:14 UTC by Charles Reis
Modified: 2005-06-17 18:08 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Save the zoom settings (1.82 KB, patch)
2005-02-13 22:45 UTC, Fred Schättgen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Reis 2005-01-18 08:14:37 UTC
Version:           0.4 (using KDE 3.3.91 (beta1), compiled sources)
Compiler:          gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
OS:                Linux (i686) release 2.6.10-1.741_FC3

After quitting and restarting KPDF, it would be nice if the previous zoom setting was remembered.  (For example, the "Two Pages" setting is remembered between invocations of the program.)

For me, this would mainly be useful to have the program start in "Fit width" zoom mode by default, rather than requiring me to change every time I open a document.  A place to set the default zoom in the settings would work equally well for me.

I'm very impressed with how much KPDF has improved-- nice job!
Comment 1 Rune Rønde Møller 2005-02-12 13:18:29 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Fred Schättgen 2005-02-13 22:45:02 UTC
Created attachment 9604 [details]
Save the zoom settings

This patch saves and restores the last zoom settings globally.

Maybe it should also be stored per file too, but it should still be stored
globally too, so that new documents use an acceptable setting. 
But most people will choose the same "Fit X"-setting for most documents anyway,
so a global setting will be ok in most cases.
Comment 3 Albert Astals Cid 2005-02-13 23:46:39 UTC
Hi Fred, thanks for the patch but CVS is frozen for new features and only bug-fixes are allowed so this will have to wait to post KDE 3.4
Comment 4 Albert Astals Cid 2005-02-17 18:13:57 UTC
*** Bug 99608 has been marked as a duplicate of this bug. ***
Comment 5 Albert Astals Cid 2005-03-17 22:07:09 UTC
CVS commit by aacid: 

Save zoom setting on exit
Thanks Fred for the patch
FEATURE: 97307


  M +1 -0      TODO   1.44
  M +10 -0     conf/kpdf.kcfg   1.11
  M +6 -2      ui/pageview.cpp   1.52


--- kdegraphics/kpdf/TODO  #1.43:1.44
@@ -74,4 +74,5 @@
 Done (newest features come first):
 -- merging from kdpf_annotations branch --
+-> ADD: Save zoom setting on exit
 -> ADD: Put fonts used by the document on the properties dialog
 -> ADD: partial implementation of XYZ links

--- kdegraphics/kpdf/conf/kpdf.kcfg  #1.10:1.11
@@ -79,4 +79,14 @@
    <max>8</max>
   </entry>
+  <entry key="ZoomMode" type="UInt" >
+    <default>0</default>
+    <min>0</min>
+    <max>2</max>
+  </entry>
+  <entry key="ZoomFactor" type="Double" >
+    <default>1.0</default>
+    <min>0.1</min>
+    <max>4.0</max>
+  </entry>
  </group>
  <group name="ThumbnailsList" >

--- kdegraphics/kpdf/ui/pageview.cpp  #1.51:1.52
@@ -128,6 +128,6 @@ PageView::PageView( QWidget *parent, KPD
     d = new PageViewPrivate();
     d->document = document;
-    d->zoomMode = ZoomFixed;
-    d->zoomFactor = 1.0;
+    d->zoomMode = (PageView::ZoomMode)Settings::zoomMode();
+    d->zoomFactor = Settings::zoomFactor();
     d->mouseMode = MouseNormal;
     d->mouseMidStartY = -1;
@@ -1414,4 +1414,8 @@ void PageView::updateZoom( ZoomMode newZ
         d->aZoomFitPage->setChecked( checkedZoomAction == d->aZoomFitPage );
         d->aZoomFitText->setChecked( checkedZoomAction == d->aZoomFitText );
+        
+        // save selected zoom factor
+        Settings::setZoomMode(newZoomMode);
+        Settings::setZoomFactor(newFactor);
     }
 }
Comment 6 Ferdinand Gassauer 2005-03-28 09:33:18 UTC
Hi!
IMHO it's worth backporting to the 3_4 BRANCH
Comment 7 Jens 2005-04-01 13:51:18 UTC
Yes, please do backport it. I vote for it as well.
I was just about to report the same wish.

Jens
Comment 8 Frank Siegert 2005-06-06 15:49:55 UTC
This means, in KDE 3.4.1 this feature should be included, right?

I am using the Debian-AMD64 packages of KDE 3.4.1 (including kpdf 0.4.1) and the zoom setting is not saved on exit. I start kpdf, then switch to "Fit width" and quit kpdf. When I restart, it's again at "100%". This happens with PDF file loaded and without.

Now where is the mistake: my expectations, kpdf source or Debian packages?
Comment 9 Jens 2005-06-06 16:31:28 UTC
Same thing in SuSE 9.3's KDE 3.4.1 packages, this feature is not included.
Comment 10 Albert Astals Cid 2005-06-06 18:08:35 UTC
No this does not means the feature should be included in 3.4.1. Stable branches only get bug fixes and now new features, this will be available in KDE 3.5 (kpdf 0.5)
Comment 11 Albert Astals Cid 2005-06-12 21:41:57 UTC
*** Bug 107289 has been marked as a duplicate of this bug. ***
Comment 12 Albert Astals Cid 2005-06-17 18:08:31 UTC
*** Bug 107601 has been marked as a duplicate of this bug. ***