summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt6
-rw-r--r--korganizer/calendarview.cpp5
-rw-r--r--korganizer/datenavigator.cpp6
-rw-r--r--korganizer/datenavigator.h1
-rw-r--r--korganizer/interfaces/korganizer/baseview.h1
-rw-r--r--korganizer/komonthview.h1
6 files changed, 19 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index eb7cf13..4fff7e1 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,71 +1,77 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 1.9.14 ************
Fixed some problems with the dialog sizes when switching
portrait/landscape mode on 640x480 PDA display.
Fixed some other small bugs.
Fixed an ugly bug in KOpieMail:
KOpieMail was not able to write files (mails) to MSDOS file system,
like on an usual preformatted SD card. That should work now.
To save your mail data on the Sd card do the following:
Create a dir on the SD card:
mkdir /mnt/card/localmail
Go to your home dir:
cd
Go to kopiemail data storage dir:
cd kdepim/apps/kopiemail
Create a symlink to the SD card:
ls -s /mnt/card/localmail
Now KOpieMail will store all mails on the SD card.
+KO/Pi Monthview:
+Now "Go to Today" selects the current month from day 1-end,
+not the current date + some days.
+I.e. "Go to Today" shows now always
+the current month with first day of month in the first row.
+
********** VERSION 1.9.13 ************
Fixed nasty PwM/Pi file reading bug, when
the used hash algo of file is different then the global
hash algo.
Added KA/Pi support for opie mailit mailapplication.
Fixed some bugs in OM/Pi.
Now character conversion tables are available for the Zaurus
to make OM/Pi working properly.
To get the character conversion in OM/Pi working, please download
at the sourceforge project site the package
sr-character-conversion_SharpROM_arm.ipk.zip
(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
from the section "general files for KDE/Pim"
Instructions how to install this package are in a ReadMe in this file.
Fixed the orientation change problem in KA/Pi when switching
portrait/landscape mode.
French translation available for KA/Pi and OM/Pi.
Fixed some problems with categories in KO/Pi in DTM sync.
Added selection dialog for export to phone in KA/Pi.
If in KO/Pi is an attendee selected to add to a meeting and this
attendee is already in the list of attendees, this person is not added
again.
Some menu cleanup in KA/Pi.
********** VERSION 1.9.12 ************
Fix for the bug in KO/Pi What's Next view of version 1.9.11.
Bugfix: Licence file is now shown again.
OM/Pi now supports Unicode (utf8 charset).
Fixed some bugs in OM/Pi.
KA/Pi has more German translation.
********** VERSION 1.9.11 ************
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 3908dbb..47cd488 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1946,97 +1946,100 @@ void CalendarView::readFilterSettings(KConfig *config)
filter->setCriteria(config->readNumEntry("Criteria",0));
filter->setCategoryList(config->readListEntry("CategoryList"));
mFilters.append(filter);
++it;
}
if (mFilters.count() == 0) {
CalFilter *filter = new CalFilter(i18n("Default"));
mFilters.append(filter);
}
mFilterView->updateFilters();
config->setGroup("FilterView");
mFilterView->blockSignals(true);
mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled"));
mFilterView->setSelectedFilter(config->readEntry("Current Filter"));
mFilterView->blockSignals(false);
// We do it manually to avoid it being done twice by the above calls
updateFilter();
}
void CalendarView::writeFilterSettings(KConfig *config)
{
// kdDebug() << "CalendarView::writeFilterSettings()" << endl;
QStringList filterList;
CalFilter *filter = mFilters.first();
while(filter) {
// kdDebug() << " fn: " << filter->name() << endl;
filterList << filter->name();
config->setGroup("Filter_" + filter->name());
config->writeEntry("Criteria",filter->criteria());
config->writeEntry("CategoryList",filter->categoryList());
filter = mFilters.next();
}
config->setGroup("General");
config->writeEntry("CalendarFilters",filterList);
config->setGroup("FilterView");
config->writeEntry("FilterEnabled",mFilterView->filtersEnabled());
config->writeEntry("Current Filter",mFilterView->selectedFilter()->name());
}
void CalendarView::goToday()
{
- mNavigator->selectToday();
+ if ( mViewManager->currentView()->isMonthView() )
+ mNavigator->selectTodayMonth();
+ else
+ mNavigator->selectToday();
}
void CalendarView::goNext()
{
mNavigator->selectNext();
}
void CalendarView::goPrevious()
{
mNavigator->selectPrevious();
}
void CalendarView::goNextMonth()
{
mNavigator->selectNextMonth();
}
void CalendarView::goPreviousMonth()
{
mNavigator->selectPreviousMonth();
}
void CalendarView::writeLocale()
{
//KPimGlobalPrefs::instance()->setGlobalConfig();
#if 0
KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime );
KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday );
KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate );
KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage );
QString dummy = KOPrefs::instance()->mUserDateFormatLong;
KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
dummy = KOPrefs::instance()->mUserDateFormatShort;
KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving,
KOPrefs::instance()->mDaylightsavingStart,
KOPrefs::instance()->mDaylightsavingEnd );
KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId );
#endif
}
void CalendarView::updateConfig()
{
writeLocale();
if ( KOPrefs::instance()->mUseAppColors )
QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
emit configChanged();
mTodoList->updateConfig();
// mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont);
mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
// To make the "fill window" configurations work
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index e26e20b..3156b2b 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -154,96 +154,102 @@ void DateNavigator::selectWeek()
}
void DateNavigator::selectWeek( int num )
{
int year = mSelectedDates.first().year();
if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 )
++year;
if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 )
--year;
QDate d = QDate ( year, 1,1);
while ( d.dayOfWeek() != 4 )
d = d.addDays( 1 );
selectWeek( d.addDays ( (num-1) *7 ) );
}
void DateNavigator::selectWeek( const QDate &d )
{
int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d );
int weekStart = KGlobal::locale()->weekStartDay();
QDate firstDate = d.addDays( weekStart - dayOfWeek );
if ( weekStart != 1 && dayOfWeek < weekStart ) {
firstDate = firstDate.addDays(-7 );
}
selectDates( firstDate, 7 );
}
void DateNavigator::selectWorkWeek()
{
QDate d = mSelectedDates.first();
selectWorkWeek( d );
}
void DateNavigator::selectWorkWeek( const QDate &d )
{
int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d );
QDate firstDate = d.addDays( 1 - dayOfWeek );
int weekStart = KGlobal::locale()->weekStartDay();
if ( weekStart != 1 && dayOfWeek >= weekStart ) {
firstDate = firstDate.addDays( 7 );
}
selectDates( firstDate, 5 );
}
+void DateNavigator::selectTodayMonth()
+{
+ QDate date = QDate::currentDate().addDays( 1-QDate::currentDate().day() );
+ selectDates( date , date.daysInMonth ());
+
+}
void DateNavigator::selectToday()
{
QDate d = QDate::currentDate();
int dateCount = mSelectedDates.count();
if ( dateCount == 5 ) selectWorkWeek( d );
else if ( dateCount == 7 ) selectWeek( d );
else selectDates( d, dateCount );
}
void DateNavigator::selectPreviousYear()
{
QDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, -1 );
selectWeekByDay( weekDay, firstSelected );
}
void DateNavigator::selectPreviousMonth()
{
QDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, -1 );
if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 )
selectMonthByDate( firstSelected );
else
selectWeekByDay( weekDay, firstSelected );
}
void DateNavigator::selectNextMonth()
{
QDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 );
if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 )
selectMonthByDate( firstSelected );
else
selectWeekByDay( weekDay, firstSelected );
}
void DateNavigator::selectNextYear()
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h
index 747e3d3..4a19e17 100644
--- a/korganizer/datenavigator.h
+++ b/korganizer/datenavigator.h
@@ -16,74 +16,75 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef DATENAVIGATOR_H
#define DATENAVIGATOR_H
#include <libkcal/incidencebase.h>
#include <qobject.h>
#include "koviewmanager.h"
/**
This class controls date navigation. All requests to move the views to another
date are sent to the DateNavigator. The DateNavigator processes the new
selection of dates and emits the required signals for the views.
*/
class DateNavigator : public QObject
{
Q_OBJECT
public:
DateNavigator( QObject *parent = 0, const char *name = 0 , KOViewManager * v = 0);
~DateNavigator();
KCal::DateList selectedDates();
int datesCount() const;
public slots:
void selectDates( const KCal::DateList & );
void selectDate( const QDate & );
void selectDates( int count );
void selectDates( const QDate &, int count );
void selectWeek();
void selectWeek( int weeknum );
void selectWeek( const QDate & );
void selectWorkWeek();
void selectWorkWeek( const QDate & );
void selectWeekByDay( int weekDay, const QDate & );
void selectToday();
+ void selectTodayMonth();
void selectPreviousYear();
void selectPreviousMonth();
void selectNextMonth();
void selectNextYear();
void selectMonth();
void selectMonthByDate( const QDate & );
void selectPrevious();
void selectNext();
void slotMonthSelect( int );
void slotDaySelect( QDate d );
signals:
void datesSelected( const KCal::DateList & );
protected:
void emitSelected();
private:
KOViewManager * mViewManager;
KCal::DateList mSelectedDates;
};
#endif
diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h
index 09f8ba3..2ac9de1 100644
--- a/korganizer/interfaces/korganizer/baseview.h
+++ b/korganizer/interfaces/korganizer/baseview.h
@@ -89,96 +89,97 @@ class BaseView : public QWidget
more than one.
*/
virtual QPtrList<Incidence> selectedIncidences() = 0;
/**
@return a list of the dates of selected events. Most views can probably only
select a single event at a time, but some may be able to select
more than one.
*/
virtual DateList selectedDates() = 0;
/**
Generate a print preview of this event view.
@param calPrinter Calendar printer object used for printing
@param fd from date
@param td to date
*/
/*
The date parameters should be determined by the view itself and not given as
parameters. At the moment I just move the code from the topwidget to the
individual views.
*/
virtual void printPreview(CalPrinter *,
const QDate &, const QDate &)
{
KMessageBox::sorry(this, i18n("Unfortunately, we don't handle printing for\n"
"that view yet.\n"));
}
/**
Print this view.
@param calPrinter Calendar printer object used for printing
*/
virtual void print(CalPrinter *)
{
KMessageBox::sorry(this, i18n("Unfortunately, we don't handle printing for\n"
"that view yet.\n"));
}
/**
Return number of currently shown dates. A return value of 0 means no idea.
*/
virtual int currentDateCount() = 0;
/** Return if this view is a view for displaying events. */
virtual bool isEventView() { return false; }
+ virtual bool isMonthView() { return false; }
public slots:
/**
Show incidences for the given date range. The date range actually shown may be
different from the requested range, depending on the particular requirements
of the view.
@param start Start of date range.
@param end End of date range.
*/
virtual void showDates( const QDate &start, const QDate &end ) = 0;
/**
Show given events. Depending on the actual view it might not be possible to
show all given events.
@param eventList a list of events to show.
*/
virtual void showEvents(QPtrList<Event> eventList) = 0;
/**
Updates the current display to reflect changes that may have happened
in the calendar since the last display refresh.
*/
virtual void updateView() = 0;
/**
Write all unsaved data back to calendar store.
*/
virtual void flushView() {}
/**
Updates the current display to reflect the changes to one particular event.
*/
virtual void changeEventDisplay(Event *, int) = 0;
/**
Re-reads the KOrganizer configuration and picks up relevant
changes which are applicable to the view.
*/
virtual void updateConfig() {}
/**
Clear selection. The incidenceSelected signal is not emitted.
*/
virtual void clearSelection() {}
signals:
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index d976246..e94952f 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -155,96 +155,97 @@ class MonthViewCell : public QWidget
void newEvent();
private:
KOMonthView *mMonthView;
QDate mDate;
bool mPrimary;
bool mHoliday;
QString mHolidayString;
//QLabel *mLabel;
QPushButton *mLabel;
QListBox *mItemList;
QSize mLabelSize;
QSize mLabelBigSize;
QPalette mHolidayPalette;
QPalette mStandardPalette;
QPalette mPrimaryPalette;
QPalette mNonPrimaryPalette;
void setMyPalette();
QPalette getPalette ();
void keyPressEvent ( QKeyEvent * ) ;
};
class KOMonthView: public KOEventView
{
Q_OBJECT
public:
KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
~KOMonthView();
/** Returns maximum number of days supported by the komonthview */
virtual int maxDatesHint();
/** Returns number of currently shown dates. */
virtual int currentDateCount();
/** returns the currently selected events */
virtual QPtrList<Incidence> selectedIncidences();
/** returns dates of the currently selected events */
virtual DateList selectedDates();
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
+ bool isMonthView() { return true; }
MonthViewCell * selectedCell();
public slots:
virtual void updateView();
virtual void updateConfig();
virtual void showDates(const QDate &start, const QDate &end);
virtual void showEvents(QPtrList<Event> eventList);
void changeEventDisplay(Event *, int);
void clearSelection();
void showContextMenu( Incidence * );
void setSelectedCell( MonthViewCell * );
protected slots:
void processSelectionChange();
signals:
void selectWeekNum ( int );
protected:
void resizeEvent(QResizeEvent *);
void viewChanged();
void updateDayLabels();
private:
int mDaysPerWeek;
int mNumWeeks;
int mNumCells;
bool mWeekStartsMonday;
bool mShowSatSunComp;
void computeLayout();
QPtrVector<MonthViewCell> mCells;
QPtrVector<QLabel> mDayLabels;
QPtrVector<KOWeekButton> mWeekLabels;
bool mShortDayLabels;
int mWidthLongDayLabel;
QDate mStartDate;
MonthViewCell *mSelectedCell;
KOEventPopupMenu *mContextMenu;
void keyPressEvent ( QKeyEvent * ) ;
};