summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-01 09:50:16 (UTC)
committer zautrix <zautrix>2005-04-01 09:50:16 (UTC)
commitf8e027db1d950ec27a3c47fc2a5ea2fe49ae9772 (patch) (unidiff)
tree15edcb7a2b053eae5c5391191f71ba5c5c015211 /korganizer
parentb76ad1e7e329051a47e28c9d132ce3fcd0b25c5c (diff)
downloadkdepimpi-f8e027db1d950ec27a3c47fc2a5ea2fe49ae9772.zip
kdepimpi-f8e027db1d950ec27a3c47fc2a5ea2fe49ae9772.tar.gz
kdepimpi-f8e027db1d950ec27a3c47fc2a5ea2fe49ae9772.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp6
-rw-r--r--korganizer/kodialogmanager.cpp4
-rw-r--r--korganizer/koprefs.h11
-rw-r--r--korganizer/koviewmanager.cpp20
-rw-r--r--korganizer/mainwindow.cpp1
-rw-r--r--korganizer/searchdialog.cpp47
-rw-r--r--korganizer/searchdialog.h1
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
@@ -1841,3 +1841,4 @@ void CalendarView::readSettings()
1841 w = list[2].toInt(); 1841 w = list[2].toInt();
1842 h = list[3].toInt(); 1842 h = list[3].toInt();
1843 KApplication::testCoords( &x,&y,&w,&h );
1843 topLevelWidget()->setGeometry(x,y,w,h); 1844 topLevelWidget()->setGeometry(x,y,w,h);
@@ -1853,2 +1854,3 @@ void CalendarView::readSettings()
1853 h = list[3].toInt(); 1854 h = list[3].toInt();
1855 KApplication::testCoords( &x,&y,&w,&h );
1854 mEventEditor->setGeometry(x,y,w,h); 1856 mEventEditor->setGeometry(x,y,w,h);
@@ -1862,2 +1864,3 @@ void CalendarView::readSettings()
1862 h = list[3].toInt(); 1864 h = list[3].toInt();
1865 KApplication::testCoords( &x,&y,&w,&h );
1863 mTodoEditor->setGeometry(x,y,w,h); 1866 mTodoEditor->setGeometry(x,y,w,h);
@@ -1871,2 +1874,3 @@ void CalendarView::readSettings()
1871 h = list[3].toInt(); 1874 h = list[3].toInt();
1875 KApplication::testCoords( &x,&y,&w,&h );
1872 getEventViewerDialog()->setGeometry(x,y,w,h); 1876 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
@@ -42,2 +42,3 @@
42#include "kodialogmanager.h" 42#include "kodialogmanager.h"
43#include <kapplication.h>
43 44
@@ -206,2 +207,3 @@ void KODialogManager::showSearchDialog()
206 h = list[3].toInt(); 207 h = list[3].toInt();
208 KApplication::testCoords( &x,&y,&w,&h );
207 mSearchDialog->setGeometry(x,y,w,h); 209 mSearchDialog->setGeometry(x,y,w,h);
@@ -219,3 +221,3 @@ void KODialogManager::showSearchDialog()
219#endif 221#endif
220 mSearchDialog->raise(); 222 mSearchDialog->raiseAndSelect();
221} 223}
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 3a07348..cf8dae6 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -34,2 +34,11 @@ class QStringList;
34 34
35#define VIEW_WN_VIEW 1
36#define VIEW_NX_VIEW 2
37#define VIEW_J_VIEW 3
38#define VIEW_A_VIEW 4
39#define VIEW_ML_VIEW 5
40#define VIEW_M_VIEW 6
41#define VIEW_L_VIEW 7
42#define VIEW_T_VIEW 8
43
35class KOPrefs : public KPimPrefs 44class KOPrefs : public KPimPrefs
@@ -292,2 +301,4 @@ class KOPrefs : public KPimPrefs
292 301
302 int mCurrentDisplayedView;
303
293 private: 304 private:
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index c442d0b..406e741 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -229,11 +229,3 @@ void KOViewManager::showNextView()
229 if ( KOPrefs::instance()->mShowIconNextDays ) { 229 if ( KOPrefs::instance()->mShowIconNextDays ) {
230 globalFlagBlockAgenda = 1; 230 showNextXView();
231 if ( mCurrentAgendaView != 3 )
232 mCurrentAgendaView = -1;
233 showAgendaView(KOPrefs::instance()->mFullViewMonth);
234 globalFlagBlockAgenda = 2;
235 mMainView->dateNavigator()->selectDates( baseCycleDate ,
236 KOPrefs::instance()->mNextXDays );
237 mFlagShowNextxDays = true;
238 mCurrentAgendaView = 3 ;
239 goto ENTE ; 231 goto ENTE ;
@@ -409,3 +401,3 @@ void KOViewManager::showWhatsNextView()
409 //mWhatsNextView->updateView(); 401 //mWhatsNextView->updateView();
410 402 KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW;
411} 403}
@@ -455,2 +447,3 @@ void KOViewManager::showListView()
455 //mFlagShowNextxDays = temp; 447 //mFlagShowNextxDays = temp;
448 KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW;
456} 449}
@@ -520,3 +513,3 @@ void KOViewManager::showAgendaView( bool fullScreen )
520 showView( mAgendaView, full); 513 showView( mAgendaView, full);
521 514 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW;
522} 515}
@@ -594,2 +587,3 @@ void KOViewManager::showNextXView()
594 mCurrentAgendaView = 3 ; 587 mCurrentAgendaView = 3 ;
588 KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW;
595} 589}
@@ -678,2 +672,3 @@ void KOViewManager::showMonthViewWeek()
678 mMonthView->setKeyBFocus(); 672 mMonthView->setKeyBFocus();
673 KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ;
679} 674}
@@ -708,2 +703,3 @@ void KOViewManager::showMonthView()
708 mMonthView->setKeyBFocus(); 703 mMonthView->setKeyBFocus();
704 KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ;
709 705
@@ -763,2 +759,3 @@ void KOViewManager::showTodoView()
763 showView( mTodoView, true ); 759 showView( mTodoView, true );
760 KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ;
764 761
@@ -780,2 +777,3 @@ void KOViewManager::showJournalView()
780 mMainView->dateNavigator()->selectDates( 1 ); 777 mMainView->dateNavigator()->selectDates( 1 );
778 KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ;
781} 779}
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index d98915b..357154e 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -147,2 +147,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
147 KPimGlobalPrefs::instance()->setGlobalConfig(); 147 KPimGlobalPrefs::instance()->setGlobalConfig();
148 p->mCurrentDisplayedView = 0;
148 if ( p->mHourSize > 22 ) 149 if ( 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
@@ -79,3 +79,3 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
79 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); 79 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
80 mSearchEvent->setChecked(true); 80 //mSearchEvent->setChecked(true);
81 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); 81 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
@@ -131,2 +131,45 @@ SearchDialog::~SearchDialog()
131} 131}
132void SearchDialog::raiseAndSelect()
133{
134
135 static int currentState = 0;
136
137 if ( !mSearchJournal->isChecked() && !mSearchTodo->isChecked() && !mSearchEvent->isChecked() )
138 currentState = 0;
139 int newState = 0;
140 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
141 newState = VIEW_J_VIEW;
142 }
143 else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
144 newState = VIEW_T_VIEW;
145 }
146 else {
147 newState = VIEW_A_VIEW;
148 }
149 if ( newState != currentState ) {
150 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
151 if ( ! mSearchJournal->isChecked() ) {
152 mSearchJournal->setChecked( true );
153 mSearchTodo->setChecked( false );
154 mSearchEvent->setChecked( false );
155 }
156 }
157 else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
158 if ( ! mSearchTodo->isChecked() ) {
159 mSearchTodo->setChecked( true );
160 mSearchJournal->setChecked( false );
161 mSearchEvent->setChecked( false );
162 }
163 }
164 else {
165 if ( ! mSearchEvent->isChecked() ) {
166 mSearchEvent->setChecked( true );
167 mSearchJournal->setChecked( false );
168 mSearchTodo->setChecked( false );
169 }
170 }
171 }
172 currentState = newState;
173 raise();
174}
132void SearchDialog::setFocusToList() 175void SearchDialog::setFocusToList()
@@ -203,3 +246,3 @@ void SearchDialog::updateView()
203{ 246{
204 247 //qDebug("SearchDialog::updateView() %d ", isVisible());
205 QRegExp re; 248 QRegExp re;
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index b730ed5..4559d20 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -51,2 +51,3 @@ class SearchDialog : public QVBox
51 void updateView(); 51 void updateView();
52 void raiseAndSelect();
52 53