Index: kdatepickerpopup.cpp
===================================================================
--- kdatepickerpopup.cpp	(wersja 551850)
+++ kdatepickerpopup.cpp	(kopia robocza)
@@ -1,7 +1,8 @@
 /*
   This file is part of libkdepim.
 
-  Copyright (c) 2004 Bram Schoenmakers <bramschoenmakers@kde.nl>
+  Copyright (c) 2004 Bram Schoenmakers <bramschoenmakers@kde.nl>,
+            (c) 2006 Mikolaj Machowski <mikmach@wp.pl>
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
@@ -68,11 +69,11 @@
 
   if ( mItems & Words ) {
     insertItem( i18n("&Today"), this, SLOT( slotToday() ) );
-    insertItem( i18n("To&morrow"), this, SLOT( slotTomorrow() ) );
-    insertItem( i18n("&Friday"), this, SLOT( slotFriday() ) );
-    insertItem( i18n("&Sunday"), this, SLOT( slotSunday() ) );
-    insertItem( i18n("Next &Week"), this, SLOT( slotNextWeek() ) );
-    insertItem( i18n("Next M&onth"), this, SLOT( slotNextMonth() ) );
+    insertItem( i18n("Y&esterday"), this, SLOT( slotYesterday() ) );
+    insertItem( i18n("Last &Monday"), this, SLOT( slotPrevMonday() ) );
+    insertItem( i18n("Last &Friday"), this, SLOT( slotPrevFriday() ) );
+    insertItem( i18n("Last &Week"), this, SLOT( slotPrevWeek() ) );
+    insertItem( i18n("Last M&onth"), this, SLOT( slotPrevMonth() ) );
 
     if ( mItems & NoDate )
       insertSeparator();
@@ -111,27 +112,27 @@
   emit dateChanged( QDate::currentDate() );
 }
 
-void KDatePickerPopup::slotTomorrow()
+void KDatePickerPopup::slotYesterday()
 {
-  emit dateChanged( QDate::currentDate().addDays( 1 ) );
+  emit dateChanged( QDate::currentDate().addDays( -1 ) );
 }
 
-void KDatePickerPopup::slotFriday()
+void KDatePickerPopup::slotPrevFriday()
 {
   QDate date = QDate::currentDate();
   int day = date.dayOfWeek();
   if ( day < 6 )
+    date = date.addDays( 5 - 7 - day );
+  else
     date = date.addDays( 5 - day );
-  else
-    date = date.addDays( 5 - day + 7 );
 
   emit dateChanged( date );
 }
 
-void KDatePickerPopup::slotSunday()
+void KDatePickerPopup::slotPrevMonday()
 {
   QDate date = QDate::currentDate();
-  emit dateChanged( date.addDays( 7 - date.dayOfWeek() ) );
+  emit dateChanged( date.addDays( 1 - date.dayOfWeek() ) );
 }
 
 void KDatePickerPopup::slotNoDate()
@@ -139,14 +140,14 @@
   emit dateChanged( QDate() );
 }
 
-void KDatePickerPopup::slotNextWeek()
+void KDatePickerPopup::slotPrevWeek()
 {
-  emit dateChanged( QDate::currentDate().addDays( 7 ) );
+  emit dateChanged( QDate::currentDate().addDays( -7 ) );
 }
 
-void KDatePickerPopup::slotNextMonth()
+void KDatePickerPopup::slotPrevMonth()
 {
-  emit dateChanged( QDate::currentDate().addMonths( 1 ) );
+  emit dateChanged( QDate::currentDate().addMonths( -1 ) );
 }
 
 }  // namespace Digikam
Index: kdatepickerpopup.h
===================================================================
--- kdatepickerpopup.h	(wersja 551850)
+++ kdatepickerpopup.h	(kopia robocza)
@@ -35,19 +35,19 @@
 {
 
 /**
-   @short This menu helps the user to select a date quickly.
+   @short This menu helps the user to select a past date quickly.
 
-   This menu helps the user to select a date quicly. It offers various ways of selecting, e.g. with a KDatePicker or with words like "Tomorrow".
+   This menu helps the user to select a past date quickly. It offers various ways of selecting, e.g. with a KDatePicker or with words like "Yesterday".
 
    The available items are:
 
    @li NoDate: A menu-item with "No Date". If choosen, the datepicker will emit a null QDate.
    @li DatePicker: Show a KDatePicker-widget.
-   @li Words: Show items like "Today", "Tomorrow" or "Next Week".
+   @li Words: Show items like "Today", "Yesterday" or "Previous Week".
 
    When supplying multiple items, separate each item with a bitwise OR.
 
-   @author Bram Schoenmakers <bram_s@softhome.net>
+   @author Bram Schoenmakers <bram_s@softhome.net>, Mikolaj Machowski <mikmach@wp.pl>
 */
 class KDatePickerPopup: public QPopupMenu
 {
@@ -95,11 +95,11 @@
     void slotDateChanged ( QDate );
 
     void slotToday();
-    void slotTomorrow();
-    void slotFriday();
-    void slotSunday();
-    void slotNextWeek();
-    void slotNextMonth();
+    void slotYesterday();
+    void slotPrevMonday();
+    void slotPrevFriday();
+    void slotPrevWeek();
+    void slotPrevMonth();
     void slotNoDate();
 
   private:
