[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Someone: Please test this kghostview patch in HEAD branch .
From:       Duncan Haldane <f.d.m.haldane () cwix ! com>
Date:       1999-05-30 3:28:44
[Download RAW message or body]

This message is in MIME format

Hi,

I just fixed an annoying little bug in kghostview in the KDE_1_1_BRANCH.
I attach a patch to fix it in the HEAD branch (patch against todays
cvs, May 29).  (The fix is essentially that submitted to
submit@kde.org by Sven Fischer (bug # 712) in February.)


The bug means that if the menu item File->Page Setup
in kghostview is selected, and the orientation of the
image is changed from Portrait <-> upside down, or
Landscape <-> Seascape (so the image dimensions don't change)
the image (incorrectly) does *NOT* get rotated.
(Portrait <-> Landscape works fine, as the change in image
dimensions triggers an update).


I have fixed this (and committed the change) in the KDE_1_1_BRANCH,
but I am not set up to compile the KDE-2.0 stuff from the HEAD branch,
so I dont know if (a) the bug is still there , and (b) if the fix still works
without breaking anything.

(It looks to me that the code in the HEAD branch still has this bug)


Could someone check this out, and if the bug is there, please
check that my patch works, and doesnt break anything.

Please let me know the results.

Thanks.



(I have tried to contact the new kghostview maintainer, without success)


Duncan Haldane

duncan@kde.org

----------------------------------
E-Mail: Duncan  Haldane <f.d.m.haldane@cwix.com>
Date: 29-May-99
Time: 23:08:27

This message was sent by XFMail
----------------------------------

["kdegraphics-kghostview.patch" (kdegraphics-kghostview.patch)]

diff -uNr kdegraphics/kghostview/ChangeLog kdegraphics-fixed/kghostview/ChangeLog
--- kdegraphics/kghostview/ChangeLog	Thu Mar 19 10:24:51 1998
+++ kdegraphics-fixed/kghostview/ChangeLog	Sun May 23 19:34:43 1999
@@ -1,3 +1,12 @@
+  * [Duncan Haldane] <duncan@kde.org>  Fixed bug #712; 
+	changed KPSWidget::layout() to KSPWidget::KPSLayout( Bool force )
+	to allow forcing an image update by calling KPSLayout( True )
+	for changes like Landscape<-> Seascape orientation which do not 
+	change the image size. The name layout() is changed to KPSLayout() 
+	to avoid confusion with QT's layout() function.  May 23, 1999.  
+	Fix essentially follows suggestion by submitter of Bug report:
+        Sven Fischer <herpes@kawo2.rwth.aachen.de>
+
 Version 0.7:
   * [Mark Donohoe] Patch from Jake Hamy <jehamby@lightside.com> which
                      incorporates code from Johanes Plass' GV. This adds
diff -uNr kdegraphics/kghostview/kghostview.cpp kdegraphics-fixed/kghostview/kghostview.cpp
--- kdegraphics/kghostview/kghostview.cpp	Wed May 12 23:59:14 1999
+++ kdegraphics-fixed/kghostview/kghostview.cpp	Sun May 23 19:10:27 1999
@@ -1310,7 +1310,7 @@
   
   if (layout_changed)
     {
-      page->layout();
+      page->KPSLayout( True );
       show_page(current_page);
       shrinkWrap();
     }
@@ -2522,7 +2522,7 @@
     if (set_new_pagemedia(number)) layout_changed = True;
     if (layout_changed) {
     	//printf("Layout should change -- call KPS method\n");
-    	page->layout();
+    	page->KPSLayout( True );
 		shrinkWrap();
     }
 
@@ -2566,7 +2566,7 @@
     
     if (new_orient || new_media)
 	{
-		page->layout();
+		page->KPSLayout( True );
 	};
     
     if (toc_text) {
@@ -2679,7 +2679,7 @@
   magstep = i;
   if (set_new_magstep())
     {
-      page->layout();
+      page->KPSLayout( True );
       //page->resize(page->width(), page->height());
       //page->repaint();
       sprintf(temp_text, "%d%%", (int)(100*page->xdpi/default_xdpi));
diff -uNr kdegraphics/kghostview/kpswidget.cpp kdegraphics-fixed/kghostview/kpswidget.cpp
--- kdegraphics/kghostview/kpswidget.cpp	Thu Apr 22 01:24:13 1999
+++ kdegraphics-fixed/kghostview/kpswidget.cpp	Sun May 23 19:37:00 1999
@@ -126,7 +126,7 @@
 
 	// Compute fullView widget size
 
-	layout();
+	KPSLayout( False );
 }
 
 KPSWidget::~KPSWidget()
@@ -363,12 +363,12 @@
 	movePage(); 
 }
 
-void KPSWidget::layout()
+void KPSWidget::KPSLayout( Bool force )
 {
-	//printf("KPSWidget::layout\n");
+	//printf("KPSWidget::KPSLayout\n");
 
     Bool different_size = computeSize();
-    if (different_size) {
+    if (different_size || force ) {
     	
     	//printf("Changed  layout %d, %d\n", fullWidth, fullHeight);
     	
diff -uNr kdegraphics/kghostview/kpswidget.h kdegraphics-fixed/kghostview/kpswidget.h
--- kdegraphics/kghostview/kpswidget.h	Thu Apr 22 01:24:14 1999
+++ kdegraphics-fixed/kghostview/kpswidget.h	Sun May 23 19:05:27 1999
@@ -102,7 +102,7 @@
 	
 	
 	Bool sendPS(FILE *fp, long begin,unsigned int len,Bool close);
-	void layout();
+	void KPSLayout( Bool force = False );
 	void disableInterpreter();
 	void enableInterpreter();
 	Bool isInterpreterReady();

End of MIME message


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic