[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: Re: [Kde-pim] kdepim 3.4 feature list
From: Martin Koller <m.koller () surfeu ! at>
Date: 2004-12-24 20:18:34
Message-ID: 200412242118.39293.m.koller () surfeu ! at
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
On Friday 24 December 2004 18:31, Allen Winter wrote:
>
> Apparently you also patched libkholidays. Can you please send me that
> patch too?
Ooops, sorry.
Here's the patch.
--
Best regards/Schöne Grüße
Martin () ascii ribbon campaign - against html mail
/\ - against microsoft attachments
Some operating systems are called 'user friendly',
Linux however is 'expert friendly'.
["kholidays.patch" (text/x-diff)]
? holidays.patch
? kholidays.patch
Index: kholidays.cpp
===================================================================
RCS file: /home/kde/kdepim/libkholidays/kholidays.cpp,v
retrieving revision 1.3
diff -u -3 -p -r1.3 kholidays.cpp
--- kholidays.cpp 4 Dec 2004 01:14:12 -0000 1.3
+++ kholidays.cpp 24 Dec 2004 20:16:49 -0000
@@ -36,8 +36,20 @@ extern "C" {
extern struct holiday holiday[366];
}
+QStringList KHolidays::locations()
+{
+ QStringList files = KGlobal::dirs()->findAllResources("data", "libkholidays/holiday_*", false, true);
+ QStringList locs;
+
+ QStringList::ConstIterator it;
+ for ( it = files.begin(); it != files.end(); ++it )
+ locs.append( (*it).mid((*it).findRev('_') + 1) );
+
+ return locs;
+}
KHolidays::KHolidays( const QString& location )
+ : mLocation( location )
{
mHolidayFile = locate( "data", "libkholidays/holiday_" + location );
@@ -48,6 +60,11 @@ KHolidays::~KHolidays()
{
}
+QString KHolidays::location() const
+{
+ return mLocation;
+}
+
QString KHolidays::shortText( const QDate &date )
{
return getHoliday( date );
Index: kholidays.h
===================================================================
RCS file: /home/kde/kdepim/libkholidays/kholidays.h,v
retrieving revision 1.2
diff -u -3 -p -r1.2 kholidays.h
--- kholidays.h 24 Nov 2004 19:52:42 -0000 1.2
+++ kholidays.h 24 Dec 2004 20:16:49 -0000
@@ -21,13 +21,22 @@
#define KHOLIDAYS_HOLIDAYS_H
#include <qstring.h>
+#include <qstringlist.h>
#include <qdatetime.h>
class KHolidays {
public:
- KHolidays( const QString& );
+ /** return a list of all available locations which have a holiday definition
+ One of these can then be passed to the contructor for a new KHolidays object
+ */
+ static QStringList locations();
+
+ KHolidays( const QString& location);
~KHolidays();
+ /// return the location with which this object was constructed
+ QString location() const;
+
QString shortText( const QDate& );
QString getHoliday( const QDate& );
@@ -38,6 +47,7 @@ class KHolidays {
private:
bool parseFile( const QDate& );
+ QString mLocation;
QString mHolidayFile; // name of file containing holiday data
int mYearLast; // save off the last year we have seen
};
[Attachment #8 (application/pgp-signature)]
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic