author | zautrix <zautrix> | 2005-02-23 18:47:45 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-23 18:47:45 (UTC) |
commit | 31f24d21cd23bb7e4033e7ffa000e6c979133ce7 (patch) (unidiff) | |
tree | 2fa81f67efc6544a3664e6039a9602ef6f3466b9 /korganizer/calendarview.cpp | |
parent | faedffc5ce8391204e0340a21eaaf582319ac824 (diff) | |
download | kdepimpi-31f24d21cd23bb7e4033e7ffa000e6c979133ce7.zip kdepimpi-31f24d21cd23bb7e4033e7ffa000e6c979133ce7.tar.gz kdepimpi-31f24d21cd23bb7e4033e7ffa000e6c979133ce7.tar.bz2 |
many focus fixes
-rw-r--r-- | korganizer/calendarview.cpp | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 3dac20b..1009956 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -231,3 +231,4 @@ CalendarView::CalendarView( Calendar *calendar, | |||
231 | mTodoEditor = 0; | 231 | mTodoEditor = 0; |
232 | init();} | 232 | init(); |
233 | } | ||
233 | 234 | ||
@@ -235,2 +236,5 @@ void CalendarView::init() | |||
235 | { | 236 | { |
237 | |||
238 | setFocusPolicy ( WheelFocus ); | ||
239 | mViewerCallerIsSearchDialog = false; | ||
236 | mBlockShowDates = false; | 240 | mBlockShowDates = false; |
@@ -2622,2 +2626,3 @@ void CalendarView::cloneIncidence(Incidence * orgInc ) | |||
2622 | } | 2626 | } |
2627 | setActiveWindow(); | ||
2623 | } | 2628 | } |
@@ -2679,2 +2684,4 @@ void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) | |||
2679 | } | 2684 | } |
2685 | mEventEditor->exec(); | ||
2686 | setActiveWindow(); | ||
2680 | } | 2687 | } |
@@ -2715,2 +2722,4 @@ void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) | |||
2715 | } | 2722 | } |
2723 | mTodoEditor->exec(); | ||
2724 | setActiveWindow(); | ||
2716 | } | 2725 | } |
@@ -2733,2 +2742,4 @@ void CalendarView::newSubTodo(Todo *parentEvent) | |||
2733 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); | 2742 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); |
2743 | mTodoEditor->exec(); | ||
2744 | setActiveWindow(); | ||
2734 | } | 2745 | } |
@@ -2755,2 +2766,5 @@ void CalendarView::editEvent( Event *event ) | |||
2755 | mEventEditor->editEvent( event , mFlagEditDescription); | 2766 | mEventEditor->editEvent( event , mFlagEditDescription); |
2767 | mEventEditor->exec(); | ||
2768 | setActiveWindow(); | ||
2769 | |||
2756 | } | 2770 | } |
@@ -2773,2 +2787,4 @@ void CalendarView::editTodo( Todo *todo ) | |||
2773 | mTodoEditor->editTodo( todo ,mFlagEditDescription); | 2787 | mTodoEditor->editTodo( todo ,mFlagEditDescription); |
2788 | mTodoEditor->exec(); | ||
2789 | setActiveWindow(); | ||
2774 | 2790 | ||
@@ -2786,2 +2802,4 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog() | |||
2786 | viewManager(), SLOT( showAgendaView( bool ) ) ); | 2802 | viewManager(), SLOT( showAgendaView( bool ) ) ); |
2803 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), | ||
2804 | this, SLOT( slotViewerClosed() ) ); | ||
2787 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), | 2805 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), |
@@ -3740,2 +3758,3 @@ void CalendarView::showIncidence() | |||
3740 | { | 3758 | { |
3759 | mViewerCallerIsSearchDialog = false; | ||
3741 | Incidence *incidence = currentSelection(); | 3760 | Incidence *incidence = currentSelection(); |
@@ -3775,2 +3794,9 @@ void CalendarView::showIncidence(Incidence *incidence) | |||
3775 | { | 3794 | { |
3795 | mViewerCallerIsSearchDialog = false; | ||
3796 | //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() ); | ||
3797 | if ( sender() && mDialogManager->getSearchDialog() ) { | ||
3798 | if ( sender () == mDialogManager->getSearchDialog()->listview() ) { | ||
3799 | mViewerCallerIsSearchDialog = true; | ||
3800 | } | ||
3801 | } | ||
3776 | if ( incidence ) { | 3802 | if ( incidence ) { |
@@ -3924 +3950,25 @@ void CalendarView::undo_delete() | |||
3924 | } | 3950 | } |
3951 | |||
3952 | void CalendarView::slotViewerClosed() | ||
3953 | { | ||
3954 | QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); | ||
3955 | } | ||
3956 | |||
3957 | void CalendarView::resetFocus() | ||
3958 | { | ||
3959 | if ( mViewerCallerIsSearchDialog ) { | ||
3960 | if ( mDialogManager->getSearchDialog()->isVisible() ){ | ||
3961 | mDialogManager->getSearchDialog()->raise(); | ||
3962 | mDialogManager->getSearchDialog()->setActiveWindow(); | ||
3963 | mDialogManager->getSearchDialog()->listview()->resetFocus(); | ||
3964 | } else | ||
3965 | mViewerCallerIsSearchDialog = false; | ||
3966 | } | ||
3967 | if ( !mViewerCallerIsSearchDialog ) { | ||
3968 | //mViewManager->currentView()->setFocus(); | ||
3969 | //qDebug("sssssssssssssssset focus "); | ||
3970 | setActiveWindow(); | ||
3971 | //setFocus(); | ||
3972 | } | ||
3973 | mViewerCallerIsSearchDialog = false; | ||
3974 | } | ||