summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 1009956..d6918d3 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -479,8 +479,9 @@ CalendarView::~CalendarView()
delete mViewManager;
delete mStorage;
delete mDateFrame ;
delete beamDialog;
+ delete mEventViewerDialog;
//kdDebug() << "~CalendarView() done" << endl;
}
void CalendarView::showDay( QDate d )
@@ -2526,9 +2527,15 @@ void CalendarView::showDatePicker( )
void CalendarView::showEventEditor()
{
#ifdef DESKTOP_VERSION
+ int x,y,w,h;
+ x = mEventEditor->geometry().x();
+ y = mEventEditor->geometry().y();
+ w = mEventEditor->width();
+ h = mEventEditor->height();
mEventEditor->show();
+ mEventEditor->setGeometry(x,y,w,h);
#else
if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
@@ -2542,9 +2549,15 @@ void CalendarView::showEventEditor()
}
void CalendarView::showTodoEditor()
{
#ifdef DESKTOP_VERSION
+ int x,y,w,h;
+ x = mTodoEditor->geometry().x();
+ y = mTodoEditor->geometry().y();
+ w = mTodoEditor->width();
+ h = mTodoEditor->height();
mTodoEditor->show();
+ mTodoEditor->setGeometry(x,y,w,h);
#else
if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
@@ -2792,9 +2805,9 @@ void CalendarView::editTodo( Todo *todo )
KOEventViewerDialog* CalendarView::getEventViewerDialog()
{
if ( !mEventViewerDialog ) {
- mEventViewerDialog = new KOEventViewerDialog(this);
+ mEventViewerDialog = new KOEventViewerDialog(0);
connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
@@ -3966,8 +3979,9 @@ void CalendarView::resetFocus()
}
if ( !mViewerCallerIsSearchDialog ) {
//mViewManager->currentView()->setFocus();
//qDebug("sssssssssssssssset focus ");
+ topLevelWidget()->raise();
setActiveWindow();
//setFocus();
}
mViewerCallerIsSearchDialog = false;