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 | |
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 | ||||
-rw-r--r-- | microkde/KDGanttMinimizeSplitter.cpp | 7 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 15 | ||||
-rw-r--r-- | microkde/kapplication.h | 1 | ||||
-rw-r--r-- | microkde/kresources/factory.cpp | 6 |
11 files changed, 100 insertions, 19 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() w = list[2].toInt(); - h = list[3].toInt(); + h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); topLevelWidget()->setGeometry(x,y,w,h); @@ -1853,2 +1854,3 @@ void CalendarView::readSettings() h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); mEventEditor->setGeometry(x,y,w,h); @@ -1862,2 +1864,3 @@ void CalendarView::readSettings() h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); mTodoEditor->setGeometry(x,y,w,h); @@ -1871,2 +1874,3 @@ void CalendarView::readSettings() 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 @@ -42,2 +42,3 @@ #include "kodialogmanager.h" +#include <kapplication.h> @@ -206,2 +207,3 @@ void KODialogManager::showSearchDialog() h = list[3].toInt(); + KApplication::testCoords( &x,&y,&w,&h ); mSearchDialog->setGeometry(x,y,w,h); @@ -219,3 +221,3 @@ void KODialogManager::showSearchDialog() #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 @@ -34,2 +34,11 @@ 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 @@ -292,2 +301,4 @@ class KOPrefs : public KPimPrefs + int mCurrentDisplayedView; + 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() 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 ; @@ -409,3 +401,3 @@ void KOViewManager::showWhatsNextView() //mWhatsNextView->updateView(); - + KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; } @@ -455,2 +447,3 @@ void KOViewManager::showListView() //mFlagShowNextxDays = temp; + KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; } @@ -520,3 +513,3 @@ void KOViewManager::showAgendaView( bool fullScreen ) showView( mAgendaView, full); - + KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; } @@ -594,2 +587,3 @@ void KOViewManager::showNextXView() mCurrentAgendaView = 3 ; + KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; } @@ -678,2 +672,3 @@ void KOViewManager::showMonthViewWeek() mMonthView->setKeyBFocus(); + KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; } @@ -708,2 +703,3 @@ void KOViewManager::showMonthView() mMonthView->setKeyBFocus(); + KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; @@ -763,2 +759,3 @@ void KOViewManager::showTodoView() showView( mTodoView, true ); + KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; @@ -780,2 +777,3 @@ void KOViewManager::showJournalView() 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 @@ -147,2 +147,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : KPimGlobalPrefs::instance()->setGlobalConfig(); + p->mCurrentDisplayedView = 0; 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) mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); - mSearchEvent->setChecked(true); + //mSearchEvent->setChecked(true); mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); @@ -131,2 +131,45 @@ 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() @@ -203,3 +246,3 @@ void SearchDialog::updateView() { - + //qDebug("SearchDialog::updateView() %d ", isVisible()); 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 void updateView(); + void raiseAndSelect(); diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp index c60b566..029f14b 100644 --- a/microkde/KDGanttMinimizeSplitter.cpp +++ b/microkde/KDGanttMinimizeSplitter.cpp @@ -114,3 +114,3 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e ) - mouseOffset; - if ( true /*opaque()*/ ) { + if ( opaque() ) { s->moveSplitter( pos, id() ); @@ -485,2 +485,7 @@ void KDGanttMinimizeSplitter::init() setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) ); +#ifndef DESKTOP_VERSION + setOpaqueResize( false ); +#else + setOpaqueResize( true ); +#endif } diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index f05b91b..80a83e0 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -48,2 +48,17 @@ void KApplication::showLicence() +void KApplication::testCoords( int* x, int* y, int* wid, int * hei ) +{ + int dWid = QApplication::desktop()->width() ; + int dHei = QApplication::desktop()->height(); + if ( *x + *wid > dWid ) { + *x = 0; + if ( *wid > dWid ) + *wid = dWid; + } + if ( *y + *hei > dHei ) { + *y = 0; + if ( *hei > dHei ) + *hei = dHei; + } +} void KApplication::showFile(QString caption, QString fn) diff --git a/microkde/kapplication.h b/microkde/kapplication.h index 497ec2f..f7eb1ef 100644 --- a/microkde/kapplication.h +++ b/microkde/kapplication.h @@ -23,2 +23,3 @@ class KApplication static void showLicence(); + static void testCoords( int* x, int* y, int* wid, int * hei ); static void showFile(QString caption, QString file); diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp index 3d1889f..a3b7fff 100644 --- a/microkde/kresources/factory.cpp +++ b/microkde/kresources/factory.cpp @@ -82,3 +82,3 @@ Factory::Factory( const QString& resourceFamily) : info->nameLabel = i18n( "file" ); - info->descriptionLabel = i18n( "Choose one file" ); + info->descriptionLabel = i18n( "One file" ); mTypeMap.insert( "file", info ); @@ -88,3 +88,3 @@ Factory::Factory( const QString& resourceFamily) : info->nameLabel = i18n( "dir" ); - info->descriptionLabel = i18n( "Choose a directory with may files" ); + info->descriptionLabel = i18n( "A directory with many files" ); mTypeMap.insert( "dir", info ); @@ -94,3 +94,3 @@ Factory::Factory( const QString& resourceFamily) : info->nameLabel = i18n( "ldap" ); - info->descriptionLabel = i18n( "No description available" ); + info->descriptionLabel = i18n( "Connect to a directory server" ); mTypeMap.insert( "ldap", info ); |