author | zautrix <zautrix> | 2005-07-07 04:18:11 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-07 04:18:11 (UTC) |
commit | b4d85da57e2d558ec088af6f3b2a34b1854462c0 (patch) (side-by-side diff) | |
tree | 0860bfaae1d15aae6cd24861eaa87d0331fb364a | |
parent | cb350dbe9151db2ded62942d29d11d6c8b88eabd (diff) | |
download | kdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.zip kdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.tar.gz kdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.tar.bz2 |
conflict
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 2 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 14 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 80 | ||||
-rw-r--r-- | korganizer/calendarview.h | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 69 |
5 files changed, 141 insertions, 28 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 79de197..814c541 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,23 +1,25 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 2.1.14 ************ Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. Added a button to add a subtodo quickly. +Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q" ). + ********** VERSION 2.1.13 ************ Fixed a problem in KA/Pi search. Fixed some minor problems in KO/Pi. Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. Fixed memory usage problems in KA/Pi: When loading data KA/Pi did load the file data twice. Example: A 600k file did consume 1200k memory during loading process. This is fixed, it does now consume only 600k during loading process. When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. This is fixed. Example: Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index bcc23dc..b225594 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1481,26 +1481,40 @@ { "Set categories","Setze Kategorien" }, { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, { "Reset","Neu setzen" }, { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, { "Edit","Edit" }, { "Last Modified","Zuletzt geändert" }, { "Journal viewer","Journal Anzeige" }, { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, { "Hide Completed","Verstecke erledigte Todos" }, { "Show not Running","Zeige nicht Laufende" }, { "Click to add new Todo","Klick für neues Todo!" }, +{ "Show next conflict for","Zeige nächsten Konflikt für" }, +{ "All events","Alle Termine" }, +{ "Allday events","Ganztagestermine" }, +{ "Events with time","Termine mit Zeit" }, +{ "No conflict found within the next two years","Kein Konflikt innerhalb der nächsten zwei Jahre gefunden" }, +{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, +{ "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index bc1c0c7..9a114d0 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -641,32 +641,98 @@ void CalendarView::init() #endif mDateNavigator->setCalendar( mCalendar ); } CalendarView::~CalendarView() { // kdDebug() << "~CalendarView()" << endl; //qDebug("CalendarView::~CalendarView() "); delete mDialogManager; delete mViewManager; delete mStorage; delete mDateFrame ; delete mEventViewerDialog; //kdDebug() << "~CalendarView() done" << endl; } +void CalendarView::nextConflict( bool all, bool allday ) +{ + QDate start = mNavigator->selectedDates().first().addDays(1); + QDate end = start.addDays( 365*2); + while ( start < end ) { + QPtrList<Event> eventList = calendar()->events( start ); + Event * ev = eventList.first(); + QPtrList<Event> test = eventList; + while ( ev ) { + //qDebug("found %d on %s ", eventList.count(), start.toString().latin1()); + Event * t_ev = test.first(); + QDateTime es = ev->dtStart(); + QDateTime ee = ev->dtEnd(); + if ( ev->doesFloat() ) + ee = ee.addDays( 1 ); + if ( ! all ) { + if ( ev->doesFloat() != allday ) + t_ev = 0; + } + while ( t_ev ) { + bool skip = false; + if ( ! all ) { + if ( t_ev->doesFloat() != allday ) + skip = true; + } + if ( !skip && ev != t_ev ) { + QDateTime ets = t_ev->dtStart(); + QDateTime ete = t_ev->dtEnd(); + if ( t_ev->doesFloat() ) + ete = ete.addDays( 1 ); + //qDebug("test %s -- %s -------- %s -- %s ", es.toString().latin1() , ee.toString().latin1(), ets.toString().latin1() , ete.toString().latin1() ); + if ( es < ete && ets < ee ) { + if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) + mViewManager->showDayView(); + mNavigator->slotDaySelect( start ); + int hour = es.time().hour(); + if ( ets > es ) + hour = ets.time().hour(); + mViewManager->agendaView()->setStartHour( hour ); + topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( ev->summary().left( 20 ) ).arg( t_ev->summary().left( 20 ) ) ); + return; + } + } + t_ev = test.next(); + } + ev = eventList.next(); + } + start = start.addDays( 1 ); + } + topLevelWidget()->setCaption( i18n("No conflict found within the next two years") ); + qDebug("No conflict found "); +} + +void CalendarView::conflictAll() +{ + nextConflict ( true, true ); +} +void CalendarView::conflictAllday() +{ + nextConflict ( false, true ); +} +void CalendarView::conflictNotAll() +{ + nextConflict ( false, false ); +} + void CalendarView::setCalReadOnly( int id, bool readO ) { if ( readO ) { emit save(); } mCalendar->setReadOnly( id, readO ); } void CalendarView::setScrollBarStep(int val ) { #ifdef DESKTOP_VERSION mDateScrollBar->setLineStep ( val ); #endif } void CalendarView::scrollBarValue(int val ) { #ifdef DESKTOP_VERSION @@ -3149,33 +3215,33 @@ void CalendarView::toggleCancelIncidence() void CalendarView::cancelIncidence(Incidence * inc ) { inc->setCancelled( ! inc->cancelled() ); changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); updateView(); } void CalendarView::cloneIncidence(Incidence * orgInc ) { Incidence * newInc = orgInc->clone(); newInc->recreate(); if ( newInc->typeID() == todoID ) { Todo* t = (Todo*) newInc; bool cloneSub = false; if ( orgInc->relations().count() ) { int result = KMessageBox::warningYesNoCancel(this, - i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ), + i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( KGlobal::formatMessage ( newInc->summary(),0 ) ), i18n("Todo has subtodos"), i18n("Yes"), i18n("No")); if ( result == KMessageBox::Cancel ) { delete t; return; } if (result == KMessageBox::Yes) cloneSub = true; } showTodoEditor(); mTodoEditor->editTodo( t ); if ( mTodoEditor->exec() ) { if ( cloneSub ) { orgInc->cloneRelations( t ); mCalendar->addIncidenceBranch( t ); @@ -3487,33 +3553,33 @@ void CalendarView::todo_resub( Todo * parent, Todo * sub ) sub->updated(); setModified(true); updateView(); } void CalendarView::todo_unsub(Todo *anTodo ) { todo_resub( 0, anTodo ); } void CalendarView::deleteTodo(Todo *todo) { if (!todo) { KNotifyClient::beep(); return; } if (KOPrefs::instance()->mConfirm) { - QString text = todo->summary().left(20); + QString text = KGlobal::formatMessage ( todo->summary(),0 ); if (!todo->relations().isEmpty()) { text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); } switch (msgItemDelete(i18n("Todo:") +"\n"+text)) { case KMessageBox::Continue: // OK bool deleteT = false; if (!todo->relations().isEmpty()) { deleteT = removeCompletedSubTodos( todo ); } // deleteT == true: todo already deleted in removeCompletedSubTodos if ( !deleteT ) { checkExternalId( todo ); calendar()->deleteTodo(todo); changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); updateView(); @@ -3533,67 +3599,67 @@ void CalendarView::deleteJournal(Journal *jour) { if (!jour) { KNotifyClient::beep(); return; } if (KOPrefs::instance()->mConfirm) { QString des; if ( !jour->summary().isEmpty() ) { des = jour->summary(); } else { des = jour->description().left(30); des = des.simplifyWhiteSpace (); des.replace (QRegExp ("\\n"),"" ); des.replace (QRegExp ("\\r"),"" ); } - switch (msgItemDelete( i18n("Journal:") +"\n"+des.left(20))) { + switch (msgItemDelete( i18n("Journal:") +"\n"+KGlobal::formatMessage ( des,0 ))) { 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; if (KOPrefs::instance()->mConfirm) { - km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + + km = KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), i18n("KO/Pi Confirmation"),i18n("Delete All")); if ( km == KMessageBox::Continue ) km = KMessageBox::No; // No = all below } else km = KMessageBox::No; } else { - km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + + km = KMessageBox::warningYesNoCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), i18n("KO/Pi Confirmation"),i18n("Current"), i18n("All")); } switch(km) { case KMessageBox::No: // Continue // all //qDebug("KMessageBox::No "); if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) schedule(Scheduler::Cancel,anEvent); checkExternalId( anEvent); mCalendar->deleteEvent(anEvent); changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); break; @@ -3608,33 +3674,33 @@ void CalendarView::deleteEvent(Event *anEvent) // return; //} //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { anEvent->addExDate(itemDate); int duration = anEvent->recurrence()->duration(); if ( duration > 0 ) { anEvent->recurrence()->setDuration( duration - 1 ); } changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); } break; //#endif } // switch } else { if (KOPrefs::instance()->mConfirm) { - switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + + switch (KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + i18n("\nAre you sure you want\nto delete this event?"), i18n("KO/Pi Confirmation"),i18n("Delete"))) { case KMessageBox::Continue: // OK if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) schedule(Scheduler::Cancel,anEvent); checkExternalId( anEvent); mCalendar->deleteEvent(anEvent); changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); break; } // switch } else { if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) schedule(Scheduler::Cancel,anEvent); checkExternalId( anEvent); mCalendar->deleteEvent(anEvent); changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); @@ -4567,33 +4633,33 @@ void CalendarView::setSyncManager(KSyncManager* manager) void CalendarView::removeSyncInfo( QString syncProfile) { qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); mCalendar->removeSyncInfo( syncProfile ); } void CalendarView::undo_delete() { //qDebug("undo_delete() "); Incidence* undo = mCalendar->undoIncidence(); if ( !undo ) { KMessageBox::sorry(this,i18n("There is nothing to undo!"), i18n("KO/Pi")); return; } - if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,undo->summary().left(25) + + if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( undo->summary(),0 ) + i18n("\nAre you sure you want\nto restore this?"), i18n("KO/Pi Confirmation"),i18n("Restore"))) { mCalendar->undoDeleteIncidence(); updateView(); } } void CalendarView::slotViewerClosed() { QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); } void CalendarView::resetFocus() { if ( mViewerCallerIsSearchDialog ) { if ( mDialogManager->getSearchDialog()->isVisible() ){ diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index a5f230a..51eb1d4 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -187,32 +187,36 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser /** Emitted, when the number of incoming messages has changed. */ void numIncomingChanged(int); /** Emitted, when the number of outgoing messages has changed. */ void numOutgoingChanged(int); /** Send status message, which can e.g. be displayed in the status bar. */ void statusMessage(const QString &); void calendarViewExpanded( bool ); void updateSearchDialog(); void filtersUpdated(); public slots: + void nextConflict( bool all, bool allday ); + void conflictAll(); + void conflictAllday(); + void conflictNotAll(); void setCalReadOnly( int id, bool readO ); void checkAlarms(); void checkFiles(); void slotprintSelInc(); void showNextAlarms(); void showOpenError(); void watchSavedFile(); void recheckTimerAlarm(); void checkNextTimerAlarm(); void addAlarm(const QDateTime &qdt, const QString ¬i ); void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); void removeAlarm(const QDateTime &qdt, const QString ¬i ); /** options dialog made a changed to the configuration. we catch this * and notify all widgets which need to update their configuration. */ void updateConfig(); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9c2ac82..bfae1b5 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -646,32 +646,33 @@ QPixmap MainWindow::loadPixmap( QString name ) void MainWindow::setUsesBigPixmaps ( bool b ) { qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); if ( b ) qDebug("KO: BigPixmaps are not supported "); } void MainWindow::initActions() { //KOPrefs::instance()->mShowFullMenu iconToolBar->clear(); KOPrefs *p = KOPrefs::instance(); //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); QPopupMenu *viewMenu = new QPopupMenu( this ); QPopupMenu *actionMenu = new QPopupMenu( this ); mCurrentItemMenu = new QPopupMenu ( this ); + QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); QPopupMenu *importMenu = new QPopupMenu( this ); QPopupMenu *importMenu_X = new QPopupMenu( this ); QPopupMenu *exportMenu_X = new QPopupMenu( this ); QPopupMenu *beamMenu_X = new QPopupMenu( this ); selectFilterMenu = new QPopupMenu( this ); selectFilterMenu->setCheckable( true ); syncMenu = new QPopupMenu( this ); configureAgendaMenu = new QPopupMenu( this ); configureToolBarMenu = new QPopupMenu( this ); QPopupMenu *helpMenu = new QPopupMenu( this ); QIconSet icon; int pixWid = 22, pixHei = 22; QString pathString = ""; if ( !p->mToolBarMiniIcons ) { if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { pathString += "icons16/"; @@ -776,41 +777,68 @@ void MainWindow::initActions() QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); today_action->addTo( actionMenu ); connect( today_action, SIGNAL( activated() ), mView, SLOT( goToday() ) ); icon = loadPixmap( pathString + "picker" ); QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); dPickerAction->addTo( actionMenu ); connect( dPickerAction, SIGNAL( activated() ), mView, SLOT( showDatePicker() ) ); icon = loadPixmap( pathString + "search" ); QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); search_action->addTo( actionMenu ); connect( search_action, SIGNAL( activated() ), mView->dialogManager(), SLOT( showSearchDialog() ) ); + actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); - actionMenu->insertSeparator(); - + action = new QAction( "Undo Delete", i18n("All events"), 0, this ); + action->addTo( nextConflictMenu ); + connect( action, SIGNAL( activated() ), + mView, SLOT( conflictAll() ) ); + action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); + action->addTo( nextConflictMenu ); + connect( action, SIGNAL( activated() ), + mView, SLOT( conflictAllday() ) ); - action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); - action->addTo( mCurrentItemMenu ); + action = new QAction( "Undo Delete", i18n("Events with time"), 0, this ); + action->addTo( nextConflictMenu ); connect( action, SIGNAL( activated() ), - mView, SLOT( undo_delete() ) ); + mView, SLOT( conflictNotAll() ) ); + + actionMenu->insertSeparator(); + + icon = loadPixmap( pathString + "newevent" ); + QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); + ne_action->addTo( mCurrentItemMenu ); + connect( ne_action, SIGNAL( activated() ), + mView, SLOT( newEvent() ) ); + icon = loadPixmap( pathString + "newtodo" ); + configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); + QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); + nt_action->addTo( mCurrentItemMenu ); + connect( nt_action, SIGNAL( activated() ), + mView, SLOT( newTodo() ) ); + mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, + this ); + mNewSubTodoAction->addTo( mCurrentItemMenu ); + connect( mNewSubTodoAction, SIGNAL( activated() ), + mView, SLOT( newSubTodo() ) ); + mCurrentItemMenu->insertSeparator(); icon = loadPixmap( pathString + "newevent" ); configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); configureToolBarMenu->insertSeparator(); configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); configureToolBarMenu->insertSeparator(); configureToolBarMenu->insertItem(i18n("Week Number"), 400); configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); mShowAction->addTo( mCurrentItemMenu ); connect( mShowAction, SIGNAL( activated() ), mView, SLOT( showIncidence() ) ); @@ -831,44 +859,38 @@ void MainWindow::initActions() mView, SLOT( cloneIncidence() ) ); mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); mMoveAction->addTo( mCurrentItemMenu ); connect( mMoveAction, SIGNAL( activated() ), mView, SLOT( moveIncidence() ) ); #ifndef DESKTOP_VERSION mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); mBeamAction->addTo(mCurrentItemMenu ); connect( mBeamAction, SIGNAL( activated() ), mView, SLOT( beamIncidence() ) ); #endif mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); mCancelAction->addTo( mCurrentItemMenu ); connect( mCancelAction, SIGNAL( activated() ), mView, SLOT( toggleCancelIncidence() ) ); - QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); - ne_action->addTo( actionMenu ); - connect( ne_action, SIGNAL( activated() ), - mView, SLOT( newEvent() ) ); - icon = loadPixmap( pathString + "newtodo" ); - configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); - QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); - nt_action->addTo( actionMenu ); - connect( nt_action, SIGNAL( activated() ), - mView, SLOT( newTodo() ) ); - + mCurrentItemMenu->insertSeparator(); + action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); + action->addTo( mCurrentItemMenu ); + connect( action, SIGNAL( activated() ), + mView, SLOT( undo_delete() ) ); // *********************** if ( KOPrefs::instance()->mVerticalScreen ) { icon = SmallIcon( "1updownarrow" ); } else { icon = SmallIcon("1leftrightarrow" ); } configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); FSaction->addTo( viewMenu ); connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); icon = loadPixmap( pathString + "filter" ); configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); icon = loadPixmap( pathString + "configure" ); @@ -983,37 +1005,33 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "todo" ); configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); todoview_action->addTo( viewMenu ); connect( todoview_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showTodoView() ) ); #if 0 action = new QAction( "view_timespan", "Time Span", 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView->viewManager(), SLOT( showTimeSpanView() ) ); #endif - mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, - this ); - mNewSubTodoAction->addTo( actionMenu ); - connect( mNewSubTodoAction, SIGNAL( activated() ), - mView, SLOT( newSubTodo() ) ); + action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, this ); action->addTo( actionMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); actionMenu->insertSeparator(); action = new QAction( "manage cat", i18n("Edit category list..."), 0, this ); action->addTo( actionMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); @@ -1552,32 +1570,33 @@ void MainWindow::about() #endif i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); } void MainWindow::keyBindings() { QString cap = i18n("KO/Pi Keys + Colors"); QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ + i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+ i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ i18n("<p><h3>In agenda view:</h3></p>\n") + i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ @@ -2086,32 +2105,40 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) mView->toggleExpand(); break; case Qt::Key_A: if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) mView->showNextAlarms(); else mView->toggleAllDaySize(); break; case Qt::Key_T: if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) mView->newTodo(); else { mView->goToday(); showSelectedDates = true; } break; + case Qt::Key_Q: + if ( e->state() == Qt::ControlButton ) + mView->conflictNotAll(); + else if ( e->state() == Qt::ShiftButton ) + mView->conflictAllday(); + else + mView->conflictAll(); + break; case Qt::Key_J: mView->viewManager()->showJournalView(); break; case Qt::Key_B: mView->editIncidenceDescription();; break; // case Qt::Key_Return: case Qt::Key_E: if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) mView->newEvent(); else mView->editIncidence(); break; case Qt::Key_Plus: size = p->mHourSize +2; if ( size <= 22 ) |