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

List:       kde-commits
Subject:    KDE/kdepim/kontact/plugins/planner
From:       Oral Timocin <oral.timocin () kdemail ! net>
Date:       2008-10-02 15:51:53
Message-ID: 1222962713.331835.1453.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 867001 by timocin:

Special Dates are completely implemented

 M  +14 -3     planner.cpp  


--- trunk/KDE/kdepim/kontact/plugins/planner/planner.cpp #867000:867001
@@ -613,9 +613,6 @@
   KConfigGroup hconfig( &_hconfig, "Time & Date" );
   QString location = hconfig.readEntry( "Holidays" );
   if ( !location.isEmpty() ) {
-    if ( mHolidays ) {
-      delete mHolidays;
-    }
     mHolidays = new LibKHolidays::KHolidays( location );
     return true;
   }
@@ -655,6 +652,20 @@
       }
     }
   }
+
+  if( mHolidaysCal ){
+    if( initHolidays() ){
+      Q_FOREACH( LibKHolidays::KHoliday holiday, mHolidays->getHolidays( date ) ){
+        SDEntry entry;
+        entry.type = IncidenceTypeEvent;
+        entry.category = ( holiday.Category == LibKHolidays::KHolidays::HOLIDAY )?
+                          CategoryHoliday : CategoryOther;
+        entry.date = date;
+        entry.summary = holiday.text;
+        mDates.append( entry );
+      }
+    }
+  }
 }
 
 int Planner::showSd( int counter, const QDate &date )
[prev in list] [next in list] [prev in thread] [next in thread] 

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