summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-12-13 12:35:00 (UTC)
committer zautrix <zautrix>2004-12-13 12:35:00 (UTC)
commit7ac6c21e832b7d16bd0888d0b66252b6e152005a (patch) (side-by-side diff)
treec7610e0e25020f19af82ac6257c2debab2638316 /korganizer
parent17b25691f0332e648dd1d800e89ccf4e1da8955d (diff)
downloadkdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.zip
kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.gz
kdepimpi-7ac6c21e832b7d16bd0888d0b66252b6e152005a.tar.bz2
many bugfixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 15c5dd9..a46cd87 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2470,27 +2470,29 @@ void CalendarView::showDatePicker( )
void CalendarView::showEventEditor()
{
#ifdef DESKTOP_VERSION
mEventEditor->show();
#else
- if ( mEventEditor->width() != QApplication::desktop()->width() ) {
- qDebug("CalendarView: recreate mEventEditor ");
+ if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
+ topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
+ qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
delete mEventEditor;
mEventEditor = mDialogManager->getEventEditor();
}
mEventEditor->showMaximized();
#endif
}
void CalendarView::showTodoEditor()
{
#ifdef DESKTOP_VERSION
mTodoEditor->show();
#else
- if ( mTodoEditor->width() != QApplication::desktop()->width() ) {
- qDebug("CalendarView: recreate mTodoEditor ");
+ if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
+ topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
+ qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
delete mTodoEditor;
mTodoEditor = mDialogManager->getTodoEditor();
}
mTodoEditor->showMaximized();
#endif
}
@@ -2539,25 +2541,25 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
{
Incidence * newInc = orgInc->clone();
newInc->recreate();
if ( newInc->type() == "Todo" ) {
Todo* t = (Todo*) newInc;
- mTodoEditor->editTodo( t );
showTodoEditor();
+ mTodoEditor->editTodo( t );
if ( mTodoEditor->exec() ) {
mCalendar->addTodo( t );
updateView();
} else {
delete t;
}
}
else {
Event* e = (Event*) newInc;
- mEventEditor->editEvent( e );
showEventEditor();
+ mEventEditor->editEvent( e );
if ( mEventEditor->exec() ) {
mCalendar->addEvent( e );
updateView();
} else {
delete e;
}
@@ -2603,22 +2605,22 @@ void CalendarView::newEvent(QDate dt)
QDateTime(dt, QTime(0,0,0)), true);
}
void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
{
+ showEventEditor();
mEventEditor->newEvent(fromHint,toHint,allDay);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mEventEditor->setCategories(filter->categoryList().join(",") );
}
if ( filter )
mEventEditor->setSecrecy( filter->getSecrecy() );
}
- showEventEditor();
}
void CalendarView::todoAdded(Todo * t)
{
changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
updateTodoViews();
@@ -2641,35 +2643,35 @@ void CalendarView::todoDeleted()
void CalendarView::newTodo()
{
+ showTodoEditor();
mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mTodoEditor->setCategories(filter->categoryList().join(",") );
}
if ( filter )
mTodoEditor->setSecrecy( filter->getSecrecy() );
}
- showTodoEditor();
}
void CalendarView::newSubTodo()
{
Todo *todo = selectedTodo();
if ( todo ) newSubTodo( todo );
}
void CalendarView::newSubTodo(Todo *parentEvent)
{
- mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
showTodoEditor();
+ mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
}
void CalendarView::newFloatingEvent()
{
DateList tmpList = mNavigator->selectedDates();
QDate date = tmpList.first();
@@ -2684,14 +2686,14 @@ void CalendarView::editEvent( Event *event )
if ( !event ) return;
if ( event->isReadOnly() ) {
showEvent( event );
return;
}
- mEventEditor->editEvent( event , mFlagEditDescription);
showEventEditor();
+ mEventEditor->editEvent( event , mFlagEditDescription);
}
void CalendarView::editJournal( Journal *jour )
{
if ( !jour ) return;
mDialogManager->hideSearchDialog();
mViewManager->showJournalView();
@@ -2702,14 +2704,14 @@ void CalendarView::editTodo( Todo *todo )
if ( !todo ) return;
if ( todo->isReadOnly() ) {
showTodo( todo );
return;
}
- mTodoEditor->editTodo( todo ,mFlagEditDescription);
showTodoEditor();
+ mTodoEditor->editTodo( todo ,mFlagEditDescription);
}
KOEventViewerDialog* CalendarView::getEventViewerDialog()
{
if ( !mEventViewerDialog ) {