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

List:       kde-pim
Subject:    PATCH: Korganizer Bug 12362
From:       Larry Wright <larry.tami () gte ! net>
Date:       2001-06-25 10:56:31
[Download RAW message or body]

Here is the text of the bug:

	The printout of kOrganizer 'ViewType Month' has irritating headers.

	I printed Feb. 01 2001 to Mar. 31 2001.
	This results in 2 pages - but it is rather difficult to know which page is f	
	for Feb and which for March. (Because both are labeled 'Thursday 01 Feburary 
	2001 \\ Saturday 31 March 2001)
	I'd prefer a header which is based on the days which fitted onto the page.

The attached patch replaces the From-Date/To-Date header with the month and 
year that was printed. It also fixes an unreported bug where it would print 
the same month twice.



["calprint.diff" (text/plain)]

Index: calprinter.cpp
===================================================================
RCS file: /home/kde/kdepim/korganizer/calprinter.cpp,v
retrieving revision 1.58
diff -u -3 -p -b -r1.58 calprinter.cpp
--- calprinter.cpp	2001/06/21 15:17:01	1.58
+++ calprinter.cpp	2001/06/25 10:02:03
@@ -322,8 +322,8 @@ void CalPrinter::printMonth(const QDate 
 	       pageWidth, mHeaderHeight, Month);
     drawDaysOfWeek(p, curMonth, pageWidth, pageHeight);
     drawMonth(p, curMonth, pageWidth, pageHeight);
-    curMonth = curMonth.addDays(fromMonth.daysInMonth());
-    if (fromMonth <= toMonth)
+    curMonth = curMonth.addDays(fromMonth.daysInMonth()+1);
+    if (curMonth <= toMonth)
       mPrinter->newPage();
   } while (curMonth <= toMonth);
 
@@ -451,6 +451,11 @@ void CalPrinter::drawHeader(QPainter &p,
     p.drawText(5, lineSpacing,title);
     break;
   case Month:
+      title += local->monthName(cd.month());
+      title += " ";
+      title += QString::number(cd.year());
+      p.drawText(5, lineSpacing, title );
+      break;
   case Week:
     
     title += local->formatDate(fd);


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

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