summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-22 10:18:16 (UTC)
committer zautrix <zautrix>2005-01-22 10:18:16 (UTC)
commit6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452 (patch) (side-by-side diff)
tree006248579ca44ad2e0c1a67db55b1a8013180ed7
parentb715b109b70b8cd24a2d9da1d4863c44d79fb2a4 (diff)
downloadkdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.zip
kdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.tar.gz
kdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.tar.bz2
some small fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt17
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt13
-rw-r--r--korganizer/calendarview.cpp52
-rw-r--r--korganizer/calendarview.h2
-rw-r--r--korganizer/koeditorgeneral.cpp20
-rw-r--r--korganizer/koeditorgeneral.h1
-rw-r--r--korganizer/kotodoview.cpp5
-rw-r--r--korganizer/mainwindow.cpp11
-rw-r--r--libkcal/calendarlocal.cpp2
-rw-r--r--microkde/kdatetbl.cpp5
10 files changed, 95 insertions, 33 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index fbe16d8..adbfd67 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,18 +1,35 @@
Info about the changes in new versions of KDE-Pim/Pi
+********** VERSION 1.9.20 ************
+
+KO/Pi:
+Made it possible to delete a Todo, which has sub-todos.
+Fixed two small problems in the todo view.
+Added missing German translation for filter edit and print dialog.
+Made search dialog closeable by cancel key.
+
+Made it possible to select in the date picker the (ligt grey )
+dates of the prev./next month with the mouse.
+
+Added for the "dislplay one day" agenda mode info in the caption:
+Now it is displayed, if the selected day is from "day before yesterday"
+to "day after tomorrow".
+
+
+
********** VERSION 1.9.19 ************
Added a lot of missing translations to KA/Pi,
Added some missing translations to KO/Pi and OM/Pi.
Fixed some minor problems in KA/Pi + KO/Pi.
Fixed a crash when closing PwM/Pi.
Added German translation for PwM/Pi.
Made view change and Month View update faster in KO/Pi.
********** VERSION 1.9.18 ************
FYI: The VERSION 1.9.17 was a testing release only.
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 0eb46e8..d260be3 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -73,33 +73,32 @@
{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" },
{ "Auto saving...","Automatische Sicherung..." },
{ "Begin on:","Starte mit:" },
{ "Begins on: %1","Starte mit: %1" },
{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" },
{ "Bigger","Größer" },
{ "Biggest","Riesig" },
{ "Big","Groß" },
{ "<b>On:</b> %1","<b>Am:</b> %1" },
{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" },
{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" },
{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" },
{ "Busy","Belegt" },
{ "&Cancel","Abbre&chen" },
{ "Cancel","Abbrechen" },
{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" },
-{ "Cannot delete To-Do which has children.","Kann Todo nicht löschen, da noch Einträge vorhanden sind" },
{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." },
{ "Categories...","Kategorien..." },
{ "Categories","Kategorien" },
{ "Category","Kategorie" },
{ "Center View","Zentriere Ansicht" },
{ "Change","Ändere" },
{ "Cinema","Kino" },
{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" },
{ "Clone Item","Klone Eintrag" },
{ "&Close","S&chließen" },
{ "Close","Schließen" },
{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" },
{ "Colors","Farben" },
{ "completed","erledigt" },
{ "completed on %1","erledigt am %1" },
{ "Complete","Erledigt" },
@@ -786,35 +785,35 @@
{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
{ "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" },
{ "Overwrite!","Überschreiben!" },
{ "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" },
{ "Load backup filename","Lade Backup Dateiname" },
{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
{ "Save backup filename","Speichere Backup Dateiname" },
{ "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" },
{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
{ "Details of attendee","Teilnehmerdetails" },
{ "Work phone:\n","Telefon Arbeit:\n" },
{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
{ "Home phone:\n","Telefon privat:\n" },
{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
{ "Email:\n","Email:\n" },
-{ "Alarm disabled","Alarm deaktiviert" },
-{ "Audio.Al.: ","Audio Al.: " },
-{ "Proc.Al.: ","Proc.Al.: " },
+{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
+{ "Audio Al.: ","Audio Al.: " },
+{ "Proc.Al.: ","Proz.Al.: " },
{ "No sound set","Kein Sound definiert" },
{ "*.wav|Wav Files","*.wav|Wav Dateien" },
{ "No program set","Kein Programm definiert" },
{ "Running '%1'","Ausführen '%1'" },
{ "Playing '%1'","Abspielen '%1'" },
{ "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" },
{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
{ "Load!","Laden!" },
{ "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" },
{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
{ "Features + hints...","Eigenschaften + Tipps..." },
{ "User translation...","Benutzer Übersetzung..." },
{ "Sync HowTo...","Synchronisation HowTo..." },
{ "Print calendar...","Drucke Kalender..." },
@@ -1178,21 +1177,25 @@
{ "&Print...","Drucke..." },
{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
{ "[Unconfigured]","[Unkonfiguriert]" },
{ "OK","OK" },
{ "FilterEditor","FilterEditor" },
{ "Include","Inclusive" },
{ "Exclude","Exclusive" },
{ "Edit Selection...","Editiere Selektion..." },
{ "recurring events","wiederholende Ereignisse" },
{ "completed to-dos","erledigte Todos" },
{ "events","Ereignisse" },
{ "todos","Todos" },
{ "journals","Journale" },
{ "public","öffentlich" },
{ "private","privat" },
{ "confidential","vertraulich" },
-{ "","" },
+{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
+{ "Yesterday","Gestern" },
+{ "Day after tomorrow","Übermorgen" },
+{ "Tomorrow","Morgen" },
+{ "Day before yesterday","Vorgestern" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8f05276..038da54 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2172,35 +2172,35 @@ void CalendarView::updateView(const QDate &start, const QDate &end)
void CalendarView::updateView()
{
DateList tmpList = mNavigator->selectedDates();
if ( KOPrefs::instance()->mHideNonStartedTodos )
mTodoList->updateView();
// We assume that the navigator only selects consecutive days.
updateView( tmpList.first(), tmpList.last() );
}
void CalendarView::updateUnmanagedViews()
{
mDateNavigator->updateDayMatrix();
}
-int CalendarView::msgItemDelete()
+int CalendarView::msgItemDelete(const QString name)
{
- return KMessageBox::warningContinueCancel(this,
+ return KMessageBox::warningContinueCancel(this,name +"\n\n"+
i18n("This item will be\npermanently deleted."),
i18n("KO/Pi Confirmation"),i18n("Delete"));
}
void CalendarView::edit_cut()
{
Event *anEvent=0;
Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
if (mViewManager->currentView()->isEventView()) {
if ( incidence && incidence->type() == "Event" ) {
anEvent = static_cast<Event *>(incidence);
}
}
@@ -2875,66 +2875,69 @@ void CalendarView::todo_unsub(Todo *anTodo )
if (!anTodo->relatedTo()) return;
anTodo->relatedTo()->removeRelation(anTodo);
anTodo->setRelatedTo(0);
anTodo->updated();
anTodo->setRelatedToUid("");
setModified(true);
updateView();
}
void CalendarView::deleteTodo(Todo *todo)
{
if (!todo) {
KNotifyClient::beep();
return;
}
if (KOPrefs::instance()->mConfirm) {
- switch (msgItemDelete()) {
+ QString text = todo->summary().left(20);
+ if (!todo->relations().isEmpty()) {
+ text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!");
+
+ }
+ switch (msgItemDelete(text)) {
case KMessageBox::Continue: // OK
+ bool deleteT = false;
if (!todo->relations().isEmpty()) {
- KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."),
- i18n("Delete To-Do"));
- } else {
+ deleteT = removeCompletedSubTodos( todo );
+ }
+ // deleteT == true: todo already deleted in removeCompletedSubTodos
+ if ( !deleteT ) {
checkExternalId( todo );
calendar()->deleteTodo(todo);
changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
updateView();
}
break;
} // switch
} else {
- if (!todo->relations().isEmpty()) {
- KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."),
- i18n("Delete To-Do"));
- } else {
- checkExternalId( todo );
- mCalendar->deleteTodo(todo);
- changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
- updateView();
- }
+ checkExternalId( todo );
+ mCalendar->deleteTodo(todo);
+ changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
+ updateView();
}
+
emit updateSearchDialog();
}
void CalendarView::deleteJournal(Journal *jour)
{
if (!jour) {
KNotifyClient::beep();
return;
}
if (KOPrefs::instance()->mConfirm) {
- switch (msgItemDelete()) {
+ switch (msgItemDelete( jour->description().left(20))) {
case KMessageBox::Continue: // OK
calendar()->deleteJournal(jour);
updateView();
break;
} // switch
} else {
calendar()->deleteJournal(jour);;
updateView();
}
emit updateSearchDialog();
}
void CalendarView::deleteEvent(Event *anEvent)
{
if (!anEvent) {
KNotifyClient::beep();
@@ -3470,32 +3473,49 @@ void CalendarView::showDates(const DateList &selectedDates)
{
// kdDebug() << "CalendarView::selectDates()" << endl;
if ( !mBlockShowDates ) {
if ( mViewManager->currentView() ) {
updateView( selectedDates.first(), selectedDates.last() );
} else {
mViewManager->showAgendaView();
}
}
QString selDates;
selDates = KGlobal::locale()->formatDate( selectedDates.first(), true);
if (selectedDates.first() < selectedDates.last() )
selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true);
+ else {
+ QString addString;
+ if ( selectedDates.first() == QDateTime::currentDateTime().date() )
+ addString = i18n("Today");
+ else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
+ addString = i18n("Tomorrow");
+ else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
+ addString = i18n("Yesterday");
+ else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
+ addString = i18n("Day before yesterday");
+ else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
+ addString = i18n("Day after tomorrow");
+ if ( !addString.isEmpty() ) {
+ topLevelWidget()->setCaption( addString+", " + selDates );
+ return;
+ }
+ }
topLevelWidget()->setCaption( i18n("Dates: ") + selDates );
}
QPtrList<CalFilter> CalendarView::filters()
{
return mFilters;
}
void CalendarView::editFilters()
{
// kdDebug() << "CalendarView::editFilters()" << endl;
CalFilter *filter = mFilters.first();
while(filter) {
kdDebug() << " Filter: " << filter->name() << endl;
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index e27da9a..c8d6bdd 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -472,33 +472,33 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
void setLoadedFileVersion(QDateTime);
bool checkFileVersion(QString fn);
bool checkFileChanged(QString fn);
Event* getLastSyncEvent();
/** Adapt navigation units correpsonding to step size of navigation of the
* current view.
*/
void adaptNavigationUnits();
bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode );
int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false );
//Attendee* getYourAttendee(Event *event);
void setBlockShowDates( bool b ) { mBlockShowDates = b ;}
protected:
void schedule(Scheduler::Method, Incidence *incidence = 0);
// returns KMsgBox::OKCandel()
- int msgItemDelete();
+ int msgItemDelete(const QString name);
void showEventEditor();
void showTodoEditor();
void writeLocale();
Todo *selectedTodo();
private:
bool mBlockShowDates;
KSyncManager* mSyncManager;
AlarmDialog * mAlarmDialog;
QString mAlarmNotification;
QString mSuspendAlarmNotification;
QTimer* mSuspendTimer;
QTimer* mAlarmTimer;
QTimer* mRecheckAlarmTimer;
void computeAlarm( QString );
void startAlarm( QString, QString );
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 94e1f4c..b4fe965 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -270,52 +270,66 @@ void KOEditorGeneral::pickAlarmProgram()
QString dispStr = i18n("Running '%1'").arg(fileName);
QToolTip::add(mAlarmProgramButton, dispStr);
mAlarmSoundButton->setOn(false);
mAlarmProgramButton->setOn(true);
} else {
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
}
}
if (mAlarmProgramButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram );
if ( mAlarmSoundButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + mAlarmSound );
}
+QString KOEditorGeneral::getFittingPath( const QString s )
+{
+ int maxlen = 50;
+ if ( QApplication::desktop()->width() < 640 ) {
+ if ( QApplication::desktop()->width() < 320 )
+ maxlen = 22;
+ else
+ maxlen = 35;
+ }
+ if ( s.length() > maxlen ) {
+ return "..."+s.right(maxlen -3);
+ }
+ return s;
+}
void KOEditorGeneral::enableAlarmEdit(bool enable)
{
if ( enable ) {
if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) {
mAlarmSoundButton->setOn( true );
if ( mAlarmSound.isEmpty() )
mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
else {
if ( ! QFile::exists( mAlarmSound ) )
mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
}
}
if (mAlarmProgramButton->isOn())
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram );
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn())
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + mAlarmSound );
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
}
else {
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Alarm disabled"));
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Alarm disabled for this item"));
}
mAlarmTimeEdit->setEnabled(enable);
mAlarmSoundButton->setEnabled(enable);
mAlarmProgramButton->setEnabled(enable);
mAlarmIncrCombo->setEnabled(enable);
}
void KOEditorGeneral::disableAlarmEdit(bool disable)
{
enableAlarmEdit( !disable );
}
void KOEditorGeneral::enableAlarm( bool enable )
{
enableAlarmEdit( enable );
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index c58335e..de8edaf 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -92,21 +92,22 @@ class KOEditorGeneral : public QObject
KOLocationBox *mSummaryEdit;
KOLocationBox *mLocationEdit;
QLabel *mAlarmBell;
QCheckBox *mAlarmButton;
QSpinBox *mAlarmTimeEdit;
QPushButton *mAlarmSoundButton;
QPushButton *mAlarmProgramButton;
QComboBox *mAlarmIncrCombo;
KTextEdit *mDescriptionEdit;
QLabel *mOwnerLabel;
QComboBox *mSecrecyCombo;
QCheckBox *mCancelBox;
QPushButton *mCategoriesButton;
QLabel *mCategoriesLabel;
private:
+ QString getFittingPath( const QString ) ;
QString mAlarmSound;
QString mAlarmProgram;
};
#endif
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 97b4a03..30adb06 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -805,38 +805,33 @@ void KOTodoView::beamTodo()
if (mActiveItem) {
emit beamTodoSignal((Incidence*)mActiveItem->todo());
}
}
void KOTodoView::showTodo()
{
if (mActiveItem) {
emit showTodoSignal(mActiveItem->todo());
}
}
void KOTodoView::deleteTodo()
{
if (mActiveItem) {
- if (mActiveItem->childCount()) {
- KMessageBox::sorry(this,i18n("Cannot delete To-Do which has children."),
- i18n("Delete To-Do"));
- } else {
emit deleteTodoSignal(mActiveItem->todo());
- }
}
}
void KOTodoView::setNewPriority(int index)
{
if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
mActiveItem->todo()->setPriority(mPriority[index]);
mActiveItem->construct();
todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
}
}
void KOTodoView::setNewPercentage(int index)
{
if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 151b55b..7b07a2e 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1691,33 +1691,42 @@ void MainWindow::configureToolBar( int item )
p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
// initActions();
}
void MainWindow::setCaptionToDates()
{
QString selDates;
selDates = KGlobal::locale()->formatDate(mView->startDate(), true);
if (mView->startDate() < mView->endDate() )
- selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
+ selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
+ else {
+ QString addString;
+ if ( mView->startDate() == QDateTime::currentDateTime().date() )
+ addString = i18n("Today");
+ else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) )
+ addString = i18n("Tomorrow");
+ if ( !addString.isEmpty() )
+ selDates = addString+", "+selDates ;
+ }
setCaption( i18n("Dates: ") + selDates );
}
// parameter item == 0: reinit
void MainWindow::configureAgenda( int item )
{
KOPrefs *p = KOPrefs::instance();
int i;
// do not allow 4 for widgets higher than 480
// if ( QApplication::desktop()->height() > 480 ) {
// if ( item == 4 )
// item = 6;
// }
for ( i = 4; i <= 18; i= i+2 )
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 12294c0..0eba6a9 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -189,34 +189,34 @@ bool CalendarLocal::addTodo( Todo *todo )
mTodoList.append( todo );
todo->registerObserver( this );
// Set up subtask relations
setupRelations( todo );
setModified( true );
return true;
}
void CalendarLocal::deleteTodo( Todo *todo )
{
// Handle orphaned children
if ( mUndoIncidence ) delete mUndoIncidence;
- mUndoIncidence = todo->clone();
removeRelations( todo );
+ mUndoIncidence = todo->clone();
if ( mTodoList.removeRef( todo ) ) {
setModified( true );
}
}
QPtrList<Todo> CalendarLocal::rawTodos()
{
return mTodoList;
}
Todo *CalendarLocal::todo( QString syncProf, QString id )
{
Todo *todo;
for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
if ( todo->getID( syncProf ) == id ) return todo;
}
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index 146291b..508ce31 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -331,44 +331,47 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
return;
}
int dayoff = KGlobal::locale()->weekStartsMonday() ? 1 : 0;
// -----
int row, col, pos, temp;
QPoint mouseCoord;
// -----
mouseCoord = e->pos();
row=rowAt(mouseCoord.y());
col=columnAt(mouseCoord.x());
if(row<0 || col<0)
{ // the user clicked on the frame of the table
return;
}
pos=7*(row-1)+col+1;
+#if 0
if(pos+dayoff<=firstday)
{ // this day is in the previous month
KNotifyClient::beep();
return;
}
if(firstday+numdays<pos+dayoff)
{ // this date is in the next month
KNotifyClient::beep();
return;
}
+#endif
temp=firstday+date.day()-dayoff-1;
- setDate(QDate(date.year(), date.month(), pos-firstday+dayoff));
+ QDate da = QDate(date.year(), date.month(),1);
+ setDate(da.addDays( pos-firstday+dayoff-1));
updateCell(temp/7+1, temp%7); // Update the previously selected cell
updateCell(row, col); // Update the selected cell
// assert(QDate(date.year(), date.month(), pos-firstday+dayoff).isValid());
emit(tableClicked());
}
bool
KDateTable::setDate(const QDate& date_)
{
bool changed=false;
QDate temp;
mMarkCurrent = false;
// -----
if(!date_.isValid())
{
kdDebug() << "KDateTable::setDate: refusing to set invalid date." << endl;