summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
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
@@ -1840,5 +1840,6 @@ void CalendarView::readSettings()
1840 y = list[1].toInt(); 1840 y = list[1].toInt();
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);
1844 1845
@@ -1852,4 +1853,5 @@ void CalendarView::readSettings()
1852 w = list[2].toInt(); 1853 w = list[2].toInt();
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);
1855 1857
@@ -1861,4 +1863,5 @@ void CalendarView::readSettings()
1861 w = list[2].toInt(); 1863 w = list[2].toInt();
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);
1864 1867
@@ -1870,4 +1873,5 @@ void CalendarView::readSettings()
1870 w = list[2].toInt(); 1873 w = list[2].toInt();
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);
1873 } 1877 }
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 @@
41#include "kconfig.h" 41#include "kconfig.h"
42#include "kodialogmanager.h" 42#include "kodialogmanager.h"
43#include <kapplication.h>
43 44
44KODialogManager::KODialogManager( CalendarView *mainView ) : 45KODialogManager::KODialogManager( CalendarView *mainView ) :
@@ -205,4 +206,5 @@ void KODialogManager::showSearchDialog()
205 w = list[2].toInt(); 206 w = list[2].toInt();
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);
208 210
@@ -218,5 +220,5 @@ void KODialogManager::showSearchDialog()
218 mSearchDialog->showMaximized(); 220 mSearchDialog->showMaximized();
219#endif 221#endif
220 mSearchDialog->raise(); 222 mSearchDialog->raiseAndSelect();
221} 223}
222 224
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;
33class QStringList; 33class 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
36{ 45{
@@ -291,4 +300,6 @@ class KOPrefs : public KPimPrefs
291 bool mWTshowChanged; 300 bool mWTshowChanged;
292 301
302 int mCurrentDisplayedView;
303
293 private: 304 private:
294 QDict<QColor> mCategoryColors; 305 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()
228 NEXT_X: 228 NEXT_X:
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 ;
240 } 232 }
@@ -408,5 +400,5 @@ void KOViewManager::showWhatsNextView()
408 showView(mWhatsNextView, true ); 400 showView(mWhatsNextView, true );
409 //mWhatsNextView->updateView(); 401 //mWhatsNextView->updateView();
410 402 KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW;
411} 403}
412 404
@@ -454,4 +446,5 @@ void KOViewManager::showListView()
454 showView(mListView, KOPrefs::instance()->mFullViewTodo); 446 showView(mListView, KOPrefs::instance()->mFullViewTodo);
455 //mFlagShowNextxDays = temp; 447 //mFlagShowNextxDays = temp;
448 KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW;
456} 449}
457 450
@@ -519,5 +512,5 @@ void KOViewManager::showAgendaView( bool fullScreen )
519 512
520 showView( mAgendaView, full); 513 showView( mAgendaView, full);
521 514 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW;
522} 515}
523 516
@@ -593,4 +586,5 @@ void KOViewManager::showNextXView()
593 mFlagShowNextxDays = true; 586 mFlagShowNextxDays = true;
594 mCurrentAgendaView = 3 ; 587 mCurrentAgendaView = 3 ;
588 KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW;
595} 589}
596bool KOViewManager::showsNextDays() 590bool KOViewManager::showsNextDays()
@@ -677,4 +671,5 @@ void KOViewManager::showMonthViewWeek()
677 showView(mMonthView, full ); 671 showView(mMonthView, full );
678 mMonthView->setKeyBFocus(); 672 mMonthView->setKeyBFocus();
673 KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ;
679} 674}
680 675
@@ -707,4 +702,5 @@ void KOViewManager::showMonthView()
707 showView(mMonthView, full ); 702 showView(mMonthView, full );
708 mMonthView->setKeyBFocus(); 703 mMonthView->setKeyBFocus();
704 KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ;
709 705
710} 706}
@@ -762,4 +758,5 @@ void KOViewManager::showTodoView()
762 globalFlagBlockAgenda = 1; 758 globalFlagBlockAgenda = 1;
763 showView( mTodoView, true ); 759 showView( mTodoView, true );
760 KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ;
764 761
765} 762}
@@ -779,4 +776,5 @@ void KOViewManager::showJournalView()
779 showView(mJournalView); 776 showView(mJournalView);
780 mMainView->dateNavigator()->selectDates( 1 ); 777 mMainView->dateNavigator()->selectDates( 1 );
778 KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ;
781} 779}
782 780
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) :
146 KOPrefs *p = KOPrefs::instance(); 146 KOPrefs *p = KOPrefs::instance();
147 KPimGlobalPrefs::instance()->setGlobalConfig(); 147 KPimGlobalPrefs::instance()->setGlobalConfig();
148 p->mCurrentDisplayedView = 0;
148 if ( p->mHourSize > 22 ) 149 if ( p->mHourSize > 22 )
149 p->mHourSize = 22; 150 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)
78 78
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);
82 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); 82 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
@@ -130,4 +130,47 @@ SearchDialog::~SearchDialog()
130 130
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()
133{ 176{
@@ -202,5 +245,5 @@ void SearchDialog::updateConfig()
202void SearchDialog::updateView() 245void SearchDialog::updateView()
203{ 246{
204 247 //qDebug("SearchDialog::updateView() %d ", isVisible());
205 QRegExp re; 248 QRegExp re;
206 re.setWildcard(true); // most people understand these better. 249 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
50 KOListView *listview(){ return listView;} 50 KOListView *listview(){ return listView;}
51 void updateView(); 51 void updateView();
52 void raiseAndSelect();
52 53
53 public slots: 54 public slots: