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,26 +1,43 @@
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.
Please read the changelog of VERSION 1.9.17 as well.
Cleaned up the syncing config dialog.
Added sync config options for date range for events.
Added sync config options for filters on incoming data.
Added sync config options for filters on outgoing data.
Please read the updated SyncHowTo about the new filter settings.
These filter settings make it now possible to sync with shared
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
@@ -65,49 +65,48 @@
{ "April","April" },
{"Ask for every entry on conflict","Frage bei Konflikten nach"},
{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" },
{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" },
{ "Attendees","Teilnehmer" },
{ "Aug","Aug" },
{ "August","August" },
{ "Auto-Save","Automatisches Abspeichern" },
{ "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" },
{ "Confidential","Vertraulich" },
{ "Configure...","Einstellungen..." },
{ "Confirm &deletes","Löschvogang bestätigen" },
{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." },
{ "Counter-event Viewer","Terminzähler Ansicht" },
{ "Daily ending hour:","Feierabend:" },
{ "Daily starting hour:","Anfangszeit:" },
{ "Daily","Täglich" },
@@ -778,51 +777,51 @@
{ "Configure Toolbar","Konfiguriere Toolbar" },
{ "Stretched TB","Gedehnte TB" },
{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" },
{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" },
{ "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" },
{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" },
{ "Imported file successfully","Datei erfolgreich importiert" },
{ "Error importing file","Fehler beim Importieren der Datei" },
{ "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..." },
{ "Anniversary","Jahrestag" },
{ "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" },
{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
{ "<b>Access: </b>","<b>Zugriff: </b>" },
{ "(%1 min before)","(%1 min vorher)" },
{ "<b>Categories: </b>","<b>Kategorien: </b>" },
@@ -1170,29 +1169,33 @@
{ "&To:","Bis:" },
{ "Print &all todo items","Drucke alle Todo Items" },
{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
{ "Todo List","Todo Liste" },
{ "&Title:","&Titel:" },
{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
{ "Todo list","Todo Liste" },
{ "&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
@@ -2164,51 +2164,51 @@ void CalendarView::updateTodoViews()
void CalendarView::updateView(const QDate &start, const QDate &end)
{
mTodoList->updateView();
mViewManager->updateView(start, end);
//mDateNavigator->updateView();
}
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);
}
}
if (!anEvent) {
KNotifyClient::beep();
return;
}
DndFactory factory( mCalendar );
factory.cutEvent(anEvent);
changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
@@ -2867,82 +2867,85 @@ void CalendarView::todo_resub( Todo * parent, Todo * sub )
parent->updated();
setModified(true);
updateView();
}
void CalendarView::todo_unsub(Todo *anTodo )
{
// Todo *anTodo = selectedTodo();
if (!anTodo) return;
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();
return;
}
if (anEvent->recurrence()->doesRecur()) {
QDate itemDate = mViewManager->currentSelectionDate();
int km;
if (!itemDate.isValid()) {
//kdDebug() << "Date Not Valid" << endl;
@@ -3462,48 +3465,65 @@ void CalendarView::checkClipboard()
emit pasteEnabled(true);
} else {
emit pasteEnabled(false);
}
#endif
}
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;
filter = mFilters.next();
}
mDialogManager->showFilterEditDialog(&mFilters);
}
void CalendarView::toggleFilter()
{
showFilter(! mFilterView->isVisible());
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index e27da9a..c8d6bdd 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -464,49 +464,49 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
// show a standard warning
// returns KMsgBox::yesNoCancel()
int msgCalModified();
virtual bool sync(KSyncManager* manager, QString filename, int mode);
virtual bool syncExternal(KSyncManager* manager, QString resource);
virtual void removeSyncInfo( QString syncProfile);
void setSyncManager(KSyncManager* manager);
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 );
void setSyncEventsReadOnly();
QDateTime loadedFileVersion;
void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete );
void checkExternalId( Incidence * inc );
int mGlobalSyncMode;
QString mCurrentSyncDevice;
QString mCurrentSyncName;
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 94e1f4c..b4fe965 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -262,68 +262,82 @@ void KOEditorGeneral::pickAlarmProgram()
QToolTip::add(mAlarmProgramButton, i18n("No program set"));
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
} else {
QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0));
if (!fileName.isEmpty()) {
mAlarmProgram = fileName;
QToolTip::remove(mAlarmProgramButton);
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 );
}
void KOEditorGeneral::alarmDisable(bool disable)
{
if (!disable) {
//mAlarmBell->setEnabled(true);
mAlarmButton->setEnabled(true);
} else {
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index c58335e..de8edaf 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -84,29 +84,30 @@ class KOEditorGeneral : public QObject
signals:
void openCategoryDialog();
void allAccepted();
protected:
//QLineEdit *mSummaryEdit;
//QLineEdit *mLocationEdit;
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
@@ -797,54 +797,49 @@ void KOTodoView::cancelTodo()
void KOTodoView::moveTodo()
{
if (mActiveItem) {
emit moveTodoSignal((Incidence*)mActiveItem->todo());
}
}
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 ()) {
if (mPercentage[index] == 100) {
mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
} else {
mActiveItem->todo()->setCompleted(false);
}
mActiveItem->todo()->setPercentComplete(mPercentage[index]);
mActiveItem->construct();
todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 151b55b..7b07a2e 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1683,49 +1683,58 @@ void MainWindow::configureToolBar( int item )
p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
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 )
configureAgendaMenu->setItemChecked( i, false );
configureAgendaMenu->setItemChecked( item, true );
if ( p->mHourSize == item )
return;
p->mHourSize=item;
mView->viewManager()->agendaView()->updateConfig();
}
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 12294c0..0eba6a9 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -181,50 +181,50 @@ bool CalendarLocal::addTodoNoDup( Todo *todo )
//qDebug("duplicate todo found! not inserted! ");
return false;
}
}
return addTodo( todo );
}
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;
}
return 0;
}
void CalendarLocal::removeSyncInfo( QString syncProfile)
{
QPtrList<Incidence> all = rawIncidences() ;
Incidence *inc;
for ( inc = all.first(); inc; inc = all.next() ) {
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index 146291b..508ce31 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -323,60 +323,63 @@ KDateTable::contentsMousePressEvent(QMouseEvent *e)
{
if(e->type()!=QEvent::MouseButtonPress)
{ // the KDatePicker only reacts on mouse press events:
return;
}
if(!isEnabled())
{
KNotifyClient::beep();
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;
return false;
}
if(date!=date_)
{
date=date_;
changed=true;
}
mMarkCurrent = ( date.month() == QDate::currentDate().month() && date.year() == QDate::currentDate().year() );