author | zautrix <zautrix> | 2005-04-01 09:50:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-01 09:50:16 (UTC) |
commit | f8e027db1d950ec27a3c47fc2a5ea2fe49ae9772 (patch) (side-by-side diff) | |
tree | 15edcb7a2b053eae5c5391191f71ba5c5c015211 /korganizer | |
parent | b76ad1e7e329051a47e28c9d132ce3fcd0b25c5c (diff) | |
download | kdepimpi-f8e027db1d950ec27a3c47fc2a5ea2fe49ae9772.zip kdepimpi-f8e027db1d950ec27a3c47fc2a5ea2fe49ae9772.tar.gz kdepimpi-f8e027db1d950ec27a3c47fc2a5ea2fe49ae9772.tar.bz2 |
fixes
-rw-r--r-- | korganizer/calendarview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kodialogmanager.cpp | 4 | ||||
-rw-r--r-- | korganizer/koprefs.h | 11 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 20 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 1 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 47 | ||||
-rw-r--r-- | korganizer/searchdialog.h | 1 |
7 files changed, 75 insertions, 15 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1e83236..beb19d9 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1840,5 +1840,6 @@ void CalendarView::readSettings() y = list[1].toInt(); w = list[2].toInt(); - h = list[3].toInt(); + h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); topLevelWidget()->setGeometry(x,y,w,h); @@ -1852,4 +1853,5 @@ void CalendarView::readSettings() w = list[2].toInt(); h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); mEventEditor->setGeometry(x,y,w,h); @@ -1861,4 +1863,5 @@ void CalendarView::readSettings() w = list[2].toInt(); h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); mTodoEditor->setGeometry(x,y,w,h); @@ -1870,4 +1873,5 @@ void CalendarView::readSettings() w = list[2].toInt(); h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); getEventViewerDialog()->setGeometry(x,y,w,h); } diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index a8652ea..c927b37 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp @@ -41,4 +41,5 @@ #include "kconfig.h" #include "kodialogmanager.h" +#include <kapplication.h> KODialogManager::KODialogManager( CalendarView *mainView ) : @@ -205,4 +206,5 @@ void KODialogManager::showSearchDialog() w = list[2].toInt(); h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); mSearchDialog->setGeometry(x,y,w,h); @@ -218,5 +220,5 @@ void KODialogManager::showSearchDialog() mSearchDialog->showMaximized(); #endif - mSearchDialog->raise(); + mSearchDialog->raiseAndSelect(); } diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 3a07348..cf8dae6 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -33,4 +33,13 @@ class QColor; class QStringList; +#define VIEW_WN_VIEW 1 +#define VIEW_NX_VIEW 2 +#define VIEW_J_VIEW 3 +#define VIEW_A_VIEW 4 +#define VIEW_ML_VIEW 5 +#define VIEW_M_VIEW 6 +#define VIEW_L_VIEW 7 +#define VIEW_T_VIEW 8 + class KOPrefs : public KPimPrefs { @@ -291,4 +300,6 @@ class KOPrefs : public KPimPrefs bool mWTshowChanged; + int mCurrentDisplayedView; + private: QDict<QColor> mCategoryColors; diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index c442d0b..406e741 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -228,13 +228,5 @@ void KOViewManager::showNextView() NEXT_X: if ( KOPrefs::instance()->mShowIconNextDays ) { - globalFlagBlockAgenda = 1; - if ( mCurrentAgendaView != 3 ) - mCurrentAgendaView = -1; - showAgendaView(KOPrefs::instance()->mFullViewMonth); - globalFlagBlockAgenda = 2; - mMainView->dateNavigator()->selectDates( baseCycleDate , - KOPrefs::instance()->mNextXDays ); - mFlagShowNextxDays = true; - mCurrentAgendaView = 3 ; + showNextXView(); goto ENTE ; } @@ -408,5 +400,5 @@ void KOViewManager::showWhatsNextView() showView(mWhatsNextView, true ); //mWhatsNextView->updateView(); - + KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; } @@ -454,4 +446,5 @@ void KOViewManager::showListView() showView(mListView, KOPrefs::instance()->mFullViewTodo); //mFlagShowNextxDays = temp; + KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; } @@ -519,5 +512,5 @@ void KOViewManager::showAgendaView( bool fullScreen ) showView( mAgendaView, full); - + KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; } @@ -593,4 +586,5 @@ void KOViewManager::showNextXView() mFlagShowNextxDays = true; mCurrentAgendaView = 3 ; + KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; } bool KOViewManager::showsNextDays() @@ -677,4 +671,5 @@ void KOViewManager::showMonthViewWeek() showView(mMonthView, full ); mMonthView->setKeyBFocus(); + KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; } @@ -707,4 +702,5 @@ void KOViewManager::showMonthView() showView(mMonthView, full ); mMonthView->setKeyBFocus(); + KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; } @@ -762,4 +758,5 @@ void KOViewManager::showTodoView() globalFlagBlockAgenda = 1; showView( mTodoView, true ); + KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; } @@ -779,4 +776,5 @@ void KOViewManager::showJournalView() showView(mJournalView); mMainView->dateNavigator()->selectDates( 1 ); + KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index d98915b..357154e 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -146,4 +146,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : KOPrefs *p = KOPrefs::instance(); KPimGlobalPrefs::instance()->setGlobalConfig(); + p->mCurrentDisplayedView = 0; if ( p->mHourSize > 22 ) p->mHourSize = 22; diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 341a839..db60383 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -78,5 +78,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); - mSearchEvent->setChecked(true); + //mSearchEvent->setChecked(true); mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); @@ -130,4 +130,47 @@ SearchDialog::~SearchDialog() } +void SearchDialog::raiseAndSelect() +{ + + static int currentState = 0; + + if ( !mSearchJournal->isChecked() && !mSearchTodo->isChecked() && !mSearchEvent->isChecked() ) + currentState = 0; + int newState = 0; + if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { + newState = VIEW_J_VIEW; + } + else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { + newState = VIEW_T_VIEW; + } + else { + newState = VIEW_A_VIEW; + } + if ( newState != currentState ) { + if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { + if ( ! mSearchJournal->isChecked() ) { + mSearchJournal->setChecked( true ); + mSearchTodo->setChecked( false ); + mSearchEvent->setChecked( false ); + } + } + else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { + if ( ! mSearchTodo->isChecked() ) { + mSearchTodo->setChecked( true ); + mSearchJournal->setChecked( false ); + mSearchEvent->setChecked( false ); + } + } + else { + if ( ! mSearchEvent->isChecked() ) { + mSearchEvent->setChecked( true ); + mSearchJournal->setChecked( false ); + mSearchTodo->setChecked( false ); + } + } + } + currentState = newState; + raise(); +} void SearchDialog::setFocusToList() { @@ -202,5 +245,5 @@ void SearchDialog::updateConfig() void SearchDialog::updateView() { - + //qDebug("SearchDialog::updateView() %d ", isVisible()); QRegExp re; re.setWildcard(true); // most people understand these better. diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h index b730ed5..4559d20 100644 --- a/korganizer/searchdialog.h +++ b/korganizer/searchdialog.h @@ -50,4 +50,5 @@ class SearchDialog : public QVBox KOListView *listview(){ return listView;} void updateView(); + void raiseAndSelect(); public slots: |