-rw-r--r-- | korganizer/calendarview.cpp | 29 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 13 |
3 files changed, 35 insertions, 13 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1024b4e..b3686aa 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -3922,35 +3922,56 @@ void CalendarView::editFilters() | |||
3922 | kdDebug() << " Filter: " << filter->name() << endl; | 3922 | kdDebug() << " Filter: " << filter->name() << endl; |
3923 | filter = mFilters.next(); | 3923 | filter = mFilters.next(); |
3924 | } | 3924 | } |
3925 | 3925 | ||
3926 | mDialogManager->showFilterEditDialog(&mFilters); | 3926 | mDialogManager->showFilterEditDialog(&mFilters); |
3927 | } | 3927 | } |
3928 | void CalendarView::toggleFilter() | 3928 | void CalendarView::toggleFilter() |
3929 | { | 3929 | { |
3930 | showFilter(! mFilterView->isVisible()); | 3930 | showFilter(! mCalEditView->isVisible()); |
3931 | } | 3931 | } |
3932 | 3932 | ||
3933 | KOFilterView *CalendarView::filterView() | 3933 | KOFilterView *CalendarView::filterView() |
3934 | { | 3934 | { |
3935 | return mFilterView; | 3935 | return mFilterView; |
3936 | } | 3936 | } |
3937 | void CalendarView::selectFilter( int fil ) | 3937 | void CalendarView::selectFilter( int fil ) |
3938 | { | 3938 | { |
3939 | mFilterView->setSelectedFilter( fil ); | 3939 | mFilterView->setSelectedFilter( fil ); |
3940 | } | 3940 | } |
3941 | void CalendarView::showFilter(bool visible) | 3941 | void CalendarView::showFilter(bool visible) |
3942 | { | 3942 | { |
3943 | #if 1 | 3943 | #if 1 |
3944 | if (visible) { | 3944 | if (visible) { |
3945 | mCalEditView->readConfig(); | 3945 | mCalEditView->readConfig(); |
3946 | mCalEditView->show(); | 3946 | mCalEditView->show(); |
3947 | QValueList<int> sizes; | ||
3948 | sizes = mLeftFrame->sizes(); | ||
3949 | if ( sizes.count() == 4 && sizes[3] < 20 ) { | ||
3950 | sizes.clear(); | ||
3951 | sizes << 100; | ||
3952 | sizes << 0; | ||
3953 | sizes << 0; | ||
3954 | sizes << 100; | ||
3955 | mLeftFrame->setSizes(sizes); | ||
3956 | } | ||
3957 | #if 0 | ||
3958 | sizes = mLeftFrame->sizes(); | ||
3959 | int ccc = 0; | ||
3960 | while ( ccc < sizes.count()) { | ||
3961 | qDebug("size %d %d ", ccc, sizes[ccc]); | ||
3962 | ++ccc; | ||
3963 | } | ||
3964 | #endif | ||
3965 | |||
3966 | } | ||
3967 | else { | ||
3968 | mCalEditView->hide(); | ||
3947 | } | 3969 | } |
3948 | else mCalEditView->hide(); | ||
3949 | #else | 3970 | #else |
3950 | if (visible) mFilterView->show(); | 3971 | if (visible) mFilterView->show(); |
3951 | else mFilterView->hide(); | 3972 | else mFilterView->hide(); |
3952 | #endif | 3973 | #endif |
3953 | } | 3974 | } |
3954 | void CalendarView::toggleFilerEnabled( ) | 3975 | void CalendarView::toggleFilerEnabled( ) |
3955 | { | 3976 | { |
3956 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 3977 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index bc6aae4..9fe285c 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -441,17 +441,17 @@ void KOPrefs::usrReadConfig() | |||
441 | mNextAvailableCalendar = 1; | 441 | mNextAvailableCalendar = 1; |
442 | if ( numCals == 0 ) { | 442 | if ( numCals == 0 ) { |
443 | KopiCalendarFile *kkf = getNewCalendar(); | 443 | KopiCalendarFile *kkf = getNewCalendar(); |
444 | kkf->isStandard = true; | 444 | kkf->isStandard = true; |
445 | kkf->mName = i18n("Standard"); | 445 | kkf->mName = i18n("Standard"); |
446 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 446 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); |
447 | } | 447 | } |
448 | while ( mNextAvailableCalendar <= numCals ) { | 448 | while ( mNextAvailableCalendar <= numCals ) { |
449 | qDebug("Read cal #%d ", mNextAvailableCalendar ); | 449 | //qDebug("Read cal #%d ", mNextAvailableCalendar ); |
450 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); | 450 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); |
451 | KopiCalendarFile *kkf = getNewCalendar(); | 451 | KopiCalendarFile *kkf = getNewCalendar(); |
452 | kkf->isStandard = config()->readBoolEntry( prefix+"_isStandard", false ); | 452 | kkf->isStandard = config()->readBoolEntry( prefix+"_isStandard", false ); |
453 | kkf->isEnabled = config()->readBoolEntry( prefix+"_isEnabled", true); | 453 | kkf->isEnabled = config()->readBoolEntry( prefix+"_isEnabled", true); |
454 | kkf->isAlarmEnabled = config()->readBoolEntry( prefix+"_isAlarmEnabled", true); | 454 | kkf->isAlarmEnabled = config()->readBoolEntry( prefix+"_isAlarmEnabled", true); |
455 | kkf->isReadOnly = config()->readBoolEntry( prefix+"_isReadOnly", false); | 455 | kkf->isReadOnly = config()->readBoolEntry( prefix+"_isReadOnly", false); |
456 | kkf->mName = config()->readEntry( prefix+"_Name", "Calendar"); | 456 | kkf->mName = config()->readEntry( prefix+"_Name", "Calendar"); |
457 | kkf->mFileName = config()->readEntry( prefix+"_FileName", kkf->mFileName); | 457 | kkf->mFileName = config()->readEntry( prefix+"_FileName", kkf->mFileName); |
@@ -515,20 +515,20 @@ void KOPrefs::usrWriteConfig() | |||
515 | } | 515 | } |
516 | config()->setGroup("CCal"); | 516 | config()->setGroup("CCal"); |
517 | config()->writeEntry("NumberCalendars",mCalendars.count()); | 517 | config()->writeEntry("NumberCalendars",mCalendars.count()); |
518 | int numCal = 1; | 518 | int numCal = 1; |
519 | int writeCal = 0; | 519 | int writeCal = 0; |
520 | while ( numCal < mNextAvailableCalendar ) { | 520 | while ( numCal < mNextAvailableCalendar ) { |
521 | KopiCalendarFile * kkf = mCalendars.first(); | 521 | KopiCalendarFile * kkf = mCalendars.first(); |
522 | while ( kkf ) { | 522 | while ( kkf ) { |
523 | qDebug("cal num %d %d ", kkf->mCalNumber, numCal); | 523 | //qDebug("cal num %d %d ", kkf->mCalNumber, numCal); |
524 | if ( kkf->mCalNumber == numCal ) { | 524 | if ( kkf->mCalNumber == numCal ) { |
525 | ++writeCal; | 525 | ++writeCal; |
526 | qDebug("Write calendar %d %d ", numCal , writeCal); | 526 | //qDebug("Write calendar %d %d ", numCal , writeCal); |
527 | QString prefix = "Cal_" + QString::number( writeCal ); | 527 | QString prefix = "Cal_" + QString::number( writeCal ); |
528 | config()->writeEntry( prefix+"_isStandard", kkf->isStandard ); | 528 | config()->writeEntry( prefix+"_isStandard", kkf->isStandard ); |
529 | config()->writeEntry( prefix+"_isEnabled", kkf->isEnabled ); | 529 | config()->writeEntry( prefix+"_isEnabled", kkf->isEnabled ); |
530 | config()->writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); | 530 | config()->writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); |
531 | config()->writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); | 531 | config()->writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); |
532 | config()->writeEntry( prefix+"_Name", kkf->mName); | 532 | config()->writeEntry( prefix+"_Name", kkf->mName); |
533 | config()->writeEntry( prefix+"_FileName", kkf->mFileName); | 533 | config()->writeEntry( prefix+"_FileName", kkf->mFileName); |
534 | config()->writeEntry( prefix+"_Color",kkf->mDefaultColor); | 534 | config()->writeEntry( prefix+"_Color",kkf->mDefaultColor); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 0cb0bce..95e1607 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -782,17 +782,18 @@ void MainWindow::initActions() | |||
782 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | 782 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); |
783 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 783 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
784 | action->addTo( viewMenu ); | 784 | action->addTo( viewMenu ); |
785 | connect( action, SIGNAL( activated() ), | 785 | connect( action, SIGNAL( activated() ), |
786 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 786 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
787 | mToggleNav = action ; | 787 | mToggleNav = action ; |
788 | icon = loadPixmap( pathString + "filter" ); | 788 | icon = loadPixmap( pathString + "filter" ); |
789 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); | 789 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); |
790 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 790 | icon = loadPixmap( pathString + "configure" ); |
791 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); | ||
791 | action->addTo( viewMenu ); | 792 | action->addTo( viewMenu ); |
792 | connect( action, SIGNAL( activated() ), | 793 | connect( action, SIGNAL( activated() ), |
793 | mView, SLOT( toggleFilter() ) ); | 794 | mView, SLOT( toggleFilter() ) ); |
794 | mToggleFilter = action; | 795 | mToggleFilter = action; |
795 | icon = loadPixmap( pathString + "allday" ); | 796 | icon = loadPixmap( pathString + "allday" ); |
796 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | 797 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); |
797 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 798 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
798 | action->addTo( viewMenu ); | 799 | action->addTo( viewMenu ); |
@@ -1483,17 +1484,17 @@ void MainWindow::keyBindings() | |||
1483 | { | 1484 | { |
1484 | QString cap = i18n("KO/Pi Keys + Colors"); | 1485 | QString cap = i18n("KO/Pi Keys + Colors"); |
1485 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1486 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1486 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1487 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1487 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + | 1488 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + |
1488 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + | 1489 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + |
1489 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1490 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1490 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1491 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1491 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1492 | i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ |
1492 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1493 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1493 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1494 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1494 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ | 1495 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ |
1495 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1496 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1496 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1497 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1497 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1498 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1498 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1499 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1499 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1500 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
@@ -1982,20 +1983,20 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1982 | break; | 1983 | break; |
1983 | case Qt::Key_C: | 1984 | case Qt::Key_C: |
1984 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 1985 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
1985 | break; | 1986 | break; |
1986 | case Qt::Key_P: | 1987 | case Qt::Key_P: |
1987 | mView->showDatePicker( ); | 1988 | mView->showDatePicker( ); |
1988 | break; | 1989 | break; |
1989 | case Qt::Key_F: | 1990 | case Qt::Key_F: |
1990 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1991 | mView->editFilters(); |
1991 | mView->editFilters(); | 1992 | break; |
1992 | else | 1993 | case Qt::Key_R: |
1993 | mView->toggleFilter(); | 1994 | mView->toggleFilter(); |
1994 | break; | 1995 | break; |
1995 | case Qt::Key_X: | 1996 | case Qt::Key_X: |
1996 | if ( e->state() == Qt::ControlButton ) | 1997 | if ( e->state() == Qt::ControlButton ) |
1997 | mView->toggleDateNavigatorWidget(); | 1998 | mView->toggleDateNavigatorWidget(); |
1998 | else { | 1999 | else { |
1999 | mView->viewManager()->showNextXView(); | 2000 | mView->viewManager()->showNextXView(); |
2000 | showSelectedDates = true; | 2001 | showSelectedDates = true; |
2001 | } | 2002 | } |