[Bug 22302] New: save zoom settings in kpdf

bugzilla-daemon at bugzilla.ubuntu.com bugzilla-daemon at bugzilla.ubuntu.com
Wed Jan 11 19:01:26 UTC 2006


Please do not reply to this email.  You can add comments at
http://bugzilla.ubuntu.com/show_bug.cgi?id=22302
Ubuntu | kpdf

           Summary: save zoom settings in kpdf
           Product: Ubuntu
           Version: unspecified
          Platform: i386
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: kpdf
        AssignedTo: jriddell at ubuntu.com
        ReportedBy: ubuntu.bugzilla at rudary.com
         QAContact: kubuntu-bugs at lists.ubuntu.com


I would like kpdf to remember my zoom settings between executions.

This is <a href="http://bugs.kde.org/show_bug.cgi?id=97307">bug 97307 in the KDE
bug database</a>, which was resolved nearly a year ago.

I have adapted the patch from that page to the source of version
4:3.4.3-0ubuntu2.2 (obtained by running apt-get source kdegraphics).

Here is the patch:
diff -ur kdegraphics-3.4.3/kpdf/conf/kpdf.kcfg
kdegraphics-3.4.3a/kpdf/conf/kpdf.kcfg
--- kdegraphics-3.4.3/kpdf/conf/kpdf.kcfg       2005-10-05 09:19:37.000000000 -0400
+++ kdegraphics-3.4.3a/kpdf/conf/kpdf.kcfg      2006-01-11 13:44:19.000000000 -0500
@@ -75,6 +75,15 @@
    <min>1</min>
    <max>8</max>
   </entry>
+  <entry key="ZoomMode" type="UInt" >
+    <default>1</default>
+    <min>0</min>
+  </entry>
+  <entry key="ZoomFactor" type="Double" >
+    <default>1.0</default>
+    <min>0.1</min>
+    <max>4.0</max>
+  </entry>
  </group>
  <group name="ThumbnailsList" >
   <entry key="SyncThumbnailsViewport" type="Bool" >
diff -ur kdegraphics-3.4.3/kpdf/ui/pageview.cpp
kdegraphics-3.4.3a/kpdf/ui/pageview.cpp
--- kdegraphics-3.4.3/kpdf/ui/pageview.cpp      2005-10-05 09:19:39.000000000
-0400                                                                          
  +++ kdegraphics-3.4.3a/kpdf/ui/pageview.cpp     2006-01-11 13:41:52.000000000
-0500                                                                          
  @@ -127,8 +127,8 @@
@@ -127,8 +127,8 @@
     // create and initialize private storage structure
     d = new PageViewPrivate();
     d->document = document;
-    d->zoomMode = ZoomFixed;
-    d->zoomFactor = 1.0;
+    d->zoomMode = (PageView::ZoomMode) KpdfSettings::zoomMode();
+    d->zoomFactor =  KpdfSettings::zoomFactor();
     d->mouseMode = MouseNormal;
     d->mouseMidStartY = -1;
     d->mouseOnRect = false;
@@ -1416,6 +1416,10 @@
         d->aZoomFitWidth->setChecked( checkedZoomAction == d->aZoomFitWidth );
         d->aZoomFitPage->setChecked( checkedZoomAction == d->aZoomFitPage );
         d->aZoomFitText->setChecked( checkedZoomAction == d->aZoomFitText );
+
+       // save selected zoom factor
+       KpdfSettings::setZoomMode(newZoomMode);
+       KpdfSettings::setZoomFactor(newFactor);
     }
 }

-- 
Configure bugmail: http://bugzilla.ubuntu.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.




More information about the kubuntu-bugs mailing list