summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/komonthview.cpp18
-rw-r--r--korganizer/komonthview.h2
-rw-r--r--korganizer/koprefs.cpp3
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koprefsdialog.cpp5
6 files changed, 25 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 8c3b1e4..5a5b73e 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1170,56 +1170,56 @@
1170{ "&Print...","Drucke..." }, 1170{ "&Print...","Drucke..." },
1171{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1171{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1172{ "[Unconfigured]","[Unkonfiguriert]" }, 1172{ "[Unconfigured]","[Unkonfiguriert]" },
1173{ "OK","OK" }, 1173{ "OK","OK" },
1174{ "FilterEditor","FilterEditor" }, 1174{ "FilterEditor","FilterEditor" },
1175{ "Include","Inclusive" }, 1175{ "Include","Inclusive" },
1176{ "Exclude","Exclusive" }, 1176{ "Exclude","Exclusive" },
1177{ "Edit Selection...","Editiere Auswahl" }, 1177{ "Edit Selection...","Editiere Auswahl" },
1178{ "recurring events","wiederholende Termine" }, 1178{ "recurring events","wiederholende Termine" },
1179{ "recurr. events","wiederh.Termine" }, 1179{ "recurr. events","wiederh.Termine" },
1180{ "completed to-dos","erledigte Todos" }, 1180{ "completed to-dos","erledigte Todos" },
1181{ "events","Termine" }, 1181{ "events","Termine" },
1182{ "todos","Todos" }, 1182{ "todos","Todos" },
1183{ "journals","Journale" }, 1183{ "journals","Journale" },
1184{ "public","öffentl." }, 1184{ "public","öffentl." },
1185{ "private","privat" }, 1185{ "private","privat" },
1186{ "confidential","vertraul." }, 1186{ "confidential","vertraul." },
1187{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1187{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
1188{ "Yesterday","Gestern" }, 1188{ "Yesterday","Gestern" },
1189{ "Day after tomorrow","Übermorgen" }, 1189{ "Day after tomorrow","Übermorgen" },
1190{ "Tomorrow","Morgen" }, 1190{ "Tomorrow","Morgen" },
1191{ "Day before yesterday","Vorgestern" }, 1191{ "Day before yesterday","Vorgestern" },
1192{ "Size %1","Größe %1" }, 1192{ "Size %1","Größe %1" },
1193{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1193{ "New Agendasize: %1","Neue Agendagröße: %1" },
1194{ " (%1 y.)"," (%1 J.)" }, 1194{ " (%1 y.)"," (%1 J.)" },
1195{ "Allday:","Ganztägig:" }, 1195{ "Allday:","Ganztägig:" },
1196{ "compl.todos","erled.Todos" }, 1196{ "compl.todos","erled.Todos" },
1197{ "Day view","Tagesansicht" }, 1197{ "Day view","Tagesansicht" },
1198{ "Next days","Nächste Tage" }, 1198{ "Next days","Nächste Tage" },
1199{ "Next week","Nächste Woche" }, 1199{ "Next week","Nächste Woche" },
1200{ "Next two weeks","Nächste zwei Wochen" }, 1200{ "Next two weeks","Nächste zwei Wochen" },
1201{ "Next month","Nächster Monat" }, 1201{ "Next month","Nächster Monat" },
1202{ "Journal view","Journal" }, 1202{ "Journal view","Journal" },
1203{ "Display all opened","Zeige alle geöffnet" }, 1203{ "Display all opened","Zeige alle geöffnet" },
1204{ "Display all closed","Zeige alle geschlossen" }, 1204{ "Display all closed","Zeige alle geschlossen" },
1205{ "Display all flat","Zeige alle flach" }, 1205{ "Display all flat","Zeige alle flach" },
1206{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1206{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1207{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1207{ "Default todo done color:","Standard Todo erledigt Farbe" },
1208{ "Select week %1-%2","Selektiere Woche %1-%2" }, 1208{ "Select week %1-%2","Selektiere Woche %1-%2" },
1209{ "Select Week","Selektiere Woche" }, 1209{ "Select Week","Selektiere Woche" },
1210{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1210{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1211{ "Set reminder offset to:","Setze Alarm Offset auf:" }, 1211{ "Set reminder offset to:","Setze Alarm Offset auf:" },
1212{ "Set Alarm!","Setze Alarm!" }, 1212{ "Set Alarm!","Setze Alarm!" },
1213{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1213{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1214{ " and "," und " }, 1214{ " and "," und " },
1215{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1215{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1216{ "Mail to selected","Mail an Ausgewählte" }, 1216{ "Mail to selected","Mail an Ausgewählte" },
1217{ "Mail to all","Mail an Alle" }, 1217{ "Mail to all","Mail an Alle" },
1218{ "","" }, 1218{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1219{ "","" }, 1219{ "","" },
1220{ "","" }, 1220{ "","" },
1221{ "","" }, 1221{ "","" },
1222{ "","" }, 1222{ "","" },
1223{ "","" }, 1223{ "","" },
1224{ "","" }, 1224{ "","" },
1225{ "","" }, 1225{ "","" },
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index daa37fd..dfa89e2 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -569,99 +569,108 @@ void MonthViewCell::insertTodo(Todo *todo)
569 mItemList->insertItem( item ); 569 mItemList->insertItem( item );
570 mToolTip += text+"\n"; 570 mToolTip += text+"\n";
571} 571}
572void MonthViewCell::finishUpdateCell() 572void MonthViewCell::finishUpdateCell()
573{ 573{
574#ifdef DESKTOP_VERSION 574#ifdef DESKTOP_VERSION
575 if (mToolTip != "") 575 if (mToolTip != "")
576 QToolTip::add(this,mToolTip,toolTipGroup(),""); 576 QToolTip::add(this,mToolTip,toolTipGroup(),"");
577#endif 577#endif
578 mItemList->sort(); 578 mItemList->sort();
579 //setMyPalette(); 579 //setMyPalette();
580 setMyPalette(); 580 setMyPalette();
581 QString text; 581 QString text;
582 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog; 582 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog;
583 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) { 583 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) {
584 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " "; 584 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " ";
585 mLabel->resize( mLabelBigSize ); 585 mLabel->resize( mLabelBigSize );
586 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); 586 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
587 } else { 587 } else {
588 mLabel->resize( mLabelSize ); 588 mLabel->resize( mLabelSize );
589 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); 589 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
590 } 590 }
591 591
592 mLabel->setText( text ); 592 mLabel->setText( text );
593 resizeEvent( 0 ); 593 resizeEvent( 0 );
594} 594}
595void MonthViewCell::updateCell() 595void MonthViewCell::updateCell()
596{ 596{
597 if ( !mMonthView->isUpdatePossible() ) 597 if ( !mMonthView->isUpdatePossible() )
598 return; 598 return;
599 startUpdateCell(); 599 startUpdateCell();
600 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 600 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
601 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); 601 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true );
602 Event *event; 602 Event *event;
603 for( event = events.first(); event; event = events.next() ) { // for event 603 for( event = events.first(); event; event = events.next() ) { // for event
604 insertEvent(event); 604 insertEvent(event);
605 } 605 }
606 // insert due todos 606 // insert due todos
607 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); 607 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
608 Todo *todo; 608 Todo *todo;
609 for(todo = todos.first(); todo; todo = todos.next()) { 609 for(todo = todos.first(); todo; todo = todos.next()) {
610 insertTodo( todo ); 610 insertTodo( todo );
611 } 611 }
612 finishUpdateCell(); 612 finishUpdateCell();
613 // if ( isVisible()) 613 // if ( isVisible())
614 //qApp->processEvents(); 614 //qApp->processEvents();
615} 615}
616 616
617void MonthViewCell::updateConfig() 617void MonthViewCell::updateConfig( bool bigFont ) // = false
618{ 618{
619 setFont( KOPrefs::instance()->mMonthViewFont ); 619
620 if ( bigFont ) {
621 QFont fo = KOPrefs::instance()->mMonthViewFont;
622 int ps = fo.pointSize() + 2;
623 if ( ps < 18 )
624 ps += 2;
625 fo.setPointSize( ps );
626 setFont( fo );
627 } else
628 setFont( KOPrefs::instance()->mMonthViewFont );
620 629
621 QFontMetrics fm( font() ); 630 QFontMetrics fm( font() );
622 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); 631 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 );
623 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); 632 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 );
624 mHolidayPalette = mStandardPalette; 633 mHolidayPalette = mStandardPalette;
625 mPrimaryPalette = mStandardPalette; 634 mPrimaryPalette = mStandardPalette;
626 mNonPrimaryPalette = mStandardPalette; 635 mNonPrimaryPalette = mStandardPalette;
627 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) { 636 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) {
628 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor ); 637 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor );
629 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor ); 638 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor );
630 mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark()); 639 mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark());
631 mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark()); 640 mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark());
632 mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor); 641 mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor);
633 mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor); 642 mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor);
634 mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark()); 643 mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark());
635 mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor); 644 mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor);
636 mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor); 645 mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor);
637 } 646 }
638 //updateCell(); 647 //updateCell();
639} 648}
640 649
641void MonthViewCell::enableScrollBars( bool enabled ) 650void MonthViewCell::enableScrollBars( bool enabled )
642{ 651{
643 if ( enabled ) { 652 if ( enabled ) {
644 mItemList->setVScrollBarMode(QScrollView::Auto); 653 mItemList->setVScrollBarMode(QScrollView::Auto);
645 mItemList->setHScrollBarMode(QScrollView::Auto); 654 mItemList->setHScrollBarMode(QScrollView::Auto);
646 } else { 655 } else {
647 mItemList->setVScrollBarMode(QScrollView::AlwaysOff); 656 mItemList->setVScrollBarMode(QScrollView::AlwaysOff);
648 mItemList->setHScrollBarMode(QScrollView::AlwaysOff); 657 mItemList->setHScrollBarMode(QScrollView::AlwaysOff);
649 } 658 }
650} 659}
651 660
652Incidence *MonthViewCell::selectedIncidence() 661Incidence *MonthViewCell::selectedIncidence()
653{ 662{
654 int index = mItemList->currentItem(); 663 int index = mItemList->currentItem();
655 if ( index < 0 ) return 0; 664 if ( index < 0 ) return 0;
656 665
657 MonthViewItem *item = 666 MonthViewItem *item =
658 static_cast<MonthViewItem *>( mItemList->item( index ) ); 667 static_cast<MonthViewItem *>( mItemList->item( index ) );
659 668
660 if ( !item ) return 0; 669 if ( !item ) return 0;
661 670
662 return item->incidence(); 671 return item->incidence();
663} 672}
664 673
665QDate MonthViewCell::selectedIncidenceDate() 674QDate MonthViewCell::selectedIncidenceDate()
666{ 675{
667 QDate qd; 676 QDate qd;
@@ -824,96 +833,97 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
824 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 833 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
825 //label->setLineWidth(1); 834 //label->setLineWidth(1);
826 //label->setAlignment(AlignCenter); 835 //label->setAlignment(AlignCenter);
827 mWeekLabels.insert( i, label ); 836 mWeekLabels.insert( i, label );
828 } 837 }
829 mWeekLabels[mNumWeeks]->setText( i18n("W")); 838 mWeekLabels[mNumWeeks]->setText( i18n("W"));
830 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); 839 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
831 840
832 for( i = 0; i < 1+1; i++ ) { 841 for( i = 0; i < 1+1; i++ ) {
833 KOWeekButton *label = new KOWeekButton( mWeekView ); 842 KOWeekButton *label = new KOWeekButton( mWeekView );
834 label->setFont(bfont); 843 label->setFont(bfont);
835 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 844 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
836 label->setFlat(true); 845 label->setFlat(true);
837 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 846 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
838 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 847 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
839 //label->setLineWidth(1); 848 //label->setLineWidth(1);
840 //label->setAlignment(AlignCenter); 849 //label->setAlignment(AlignCenter);
841 mWeekLabelsW.insert( i, label ); 850 mWeekLabelsW.insert( i, label );
842 } 851 }
843 mWeekLabelsW[1]->setText( i18n("W")); 852 mWeekLabelsW[1]->setText( i18n("W"));
844 853
845 854
846 int row, col; 855 int row, col;
847 mCells.resize( mNumCells ); 856 mCells.resize( mNumCells );
848 for( row = 0; row < mNumWeeks; ++row ) { 857 for( row = 0; row < mNumWeeks; ++row ) {
849 for( col = 0; col < mDaysPerWeek; ++col ) { 858 for( col = 0; col < mDaysPerWeek; ++col ) {
850 MonthViewCell *cell = new MonthViewCell( this, mMonthView ); 859 MonthViewCell *cell = new MonthViewCell( this, mMonthView );
851 mCells.insert( row * mDaysPerWeek + col, cell ); 860 mCells.insert( row * mDaysPerWeek + col, cell );
852 861
853 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 862 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
854 SLOT( defaultAction( Incidence * ) ) ); 863 SLOT( defaultAction( Incidence * ) ) );
855 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 864 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
856 SIGNAL( newEventSignal( QDateTime ) ) ); 865 SIGNAL( newEventSignal( QDateTime ) ) );
857 connect( cell, SIGNAL( showDaySignal( QDate ) ), 866 connect( cell, SIGNAL( showDaySignal( QDate ) ),
858 SIGNAL( showDaySignal( QDate ) ) ); 867 SIGNAL( showDaySignal( QDate ) ) );
859 } 868 }
860 } 869 }
861 mCellsW.resize( mDaysPerWeek ); 870 mCellsW.resize( mDaysPerWeek );
862 for( col = 0; col < mDaysPerWeek; ++col ) { 871 for( col = 0; col < mDaysPerWeek; ++col ) {
863 MonthViewCell *cell = new MonthViewCell( this, mWeekView ); 872 MonthViewCell *cell = new MonthViewCell( this, mWeekView );
864 mCellsW.insert( col, cell ); 873 mCellsW.insert( col, cell );
865 874
866 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 875 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
867 SLOT( defaultAction( Incidence * ) ) ); 876 SLOT( defaultAction( Incidence * ) ) );
868 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 877 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
869 SIGNAL( newEventSignal( QDateTime ) ) ); 878 SIGNAL( newEventSignal( QDateTime ) ) );
870 connect( cell, SIGNAL( showDaySignal( QDate ) ), 879 connect( cell, SIGNAL( showDaySignal( QDate ) ),
871 SIGNAL( showDaySignal( QDate ) ) ); 880 SIGNAL( showDaySignal( QDate ) ) );
881 cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
872 } 882 }
873 883
874 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); 884 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
875 mContextMenu = eventPopup(); 885 mContextMenu = eventPopup();
876 // updateConfig(); //useless here 886 // updateConfig(); //useless here
877 887
878 //mWeekLabels[mNumWeeks]->setText( i18n("W")); 888 //mWeekLabels[mNumWeeks]->setText( i18n("W"));
879#if 0 889#if 0
880 mWidStack = new QWidgetStack( this ); 890 mWidStack = new QWidgetStack( this );
881 mMonthView = new QWidget( mWidStack ); 891 mMonthView = new QWidget( mWidStack );
882 mWeekView = new QWidget( mWidStack ); 892 mWeekView = new QWidget( mWidStack );
883#endif 893#endif
884 if ( mShowWeekView ) 894 if ( mShowWeekView )
885 mWidStack->raiseWidget( mWeekView ); 895 mWidStack->raiseWidget( mWeekView );
886 else 896 else
887 mWidStack->raiseWidget( mMonthView ); 897 mWidStack->raiseWidget( mMonthView );
888 898
889 emit incidenceSelected( 0 ); 899 emit incidenceSelected( 0 );
890} 900}
891 901
892KOMonthView::~KOMonthView() 902KOMonthView::~KOMonthView()
893{ 903{
894 delete mContextMenu; 904 delete mContextMenu;
895} 905}
896void KOMonthView::selectDateWeekNum ( int ) 906void KOMonthView::selectDateWeekNum ( int )
897{ 907{
898 908
899} 909}
900void KOMonthView::selectInternalWeekNum ( int n ) 910void KOMonthView::selectInternalWeekNum ( int n )
901{ 911{
902 switchView(); 912 switchView();
903 emit selectWeekNum ( n ); 913 emit selectWeekNum ( n );
904} 914}
905 915
906void KOMonthView::switchView() 916void KOMonthView::switchView()
907{ 917{
908 918
909 if ( selectedCell( ) ) 919 if ( selectedCell( ) )
910 selectedCell()->deselect(); 920 selectedCell()->deselect();
911 mShowWeekView = !mShowWeekView; 921 mShowWeekView = !mShowWeekView;
912 KOPrefs::instance()->mMonthViewWeek = mShowWeekView; 922 KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
913 //emit showNavigator( !mShowWeekView ); 923 //emit showNavigator( !mShowWeekView );
914 if ( clPending ) { 924 if ( clPending ) {
915 computeLayout(); 925 computeLayout();
916 updateConfig(); 926 updateConfig();
917 } 927 }
918 if ( mShowWeekView ) 928 if ( mShowWeekView )
919 mWidStack->raiseWidget( mWeekView ); 929 mWidStack->raiseWidget( mWeekView );
@@ -947,96 +957,100 @@ QPtrList<Incidence> KOMonthView::selectedIncidences()
947DateList KOMonthView::selectedDates() 957DateList KOMonthView::selectedDates()
948{ 958{
949 DateList selected; 959 DateList selected;
950 960
951 if ( mSelectedCell ) { 961 if ( mSelectedCell ) {
952 QDate qd = mSelectedCell->selectedIncidenceDate(); 962 QDate qd = mSelectedCell->selectedIncidenceDate();
953 if ( qd.isValid() ) selected.append( qd ); 963 if ( qd.isValid() ) selected.append( qd );
954 } 964 }
955 965
956 return selected; 966 return selected;
957} 967}
958 968
959void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, 969void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
960 const QDate &td) 970 const QDate &td)
961{ 971{
962#ifndef KORG_NOPRINTER 972#ifndef KORG_NOPRINTER
963 calPrinter->preview(CalPrinter::Month, fd, td); 973 calPrinter->preview(CalPrinter::Month, fd, td);
964#endif 974#endif
965} 975}
966 976
967void KOMonthView::updateConfig() 977void KOMonthView::updateConfig()
968{ 978{
969 979
970 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 980 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
971 981
972 if ( mShowWeekView ) { 982 if ( mShowWeekView ) {
973 mWeekStartsMonday = true; 983 mWeekStartsMonday = true;
974 } 984 }
975 QFontMetrics fontmetric(mDayLabels[0]->font()); 985 QFontMetrics fontmetric(mDayLabels[0]->font());
976 mWidthLongDayLabel = 0; 986 mWidthLongDayLabel = 0;
977 987
978 for (int i = 0; i < 7; i++) { 988 for (int i = 0; i < 7; i++) {
979 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 989 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
980 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 990 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
981 } 991 }
982 bool temp = mShowSatSunComp ; 992 bool temp = mShowSatSunComp ;
983 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 993 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
984 if ( ! mShowWeekView ) { 994 if ( ! mShowWeekView ) {
985 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) 995 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog )
986 computeLayout(); 996 computeLayout();
987 } 997 }
988 updateDayLabels(); 998 updateDayLabels();
989 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); 999 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks);
990 //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; 1000 //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks;
991 //resizeEvent( 0 ); 1001 //resizeEvent( 0 );
992 for (uint i = 0; i < mCells.count(); ++i) { 1002 for (uint i = 0; i < mCells.count(); ++i) {
993 mCells[i]->updateConfig(); 1003 mCells[i]->updateConfig();
994 } 1004 }
1005
1006 for (uint i = 0; i < mCellsW.count(); ++i) {
1007 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont);
1008 }
995#ifdef DESKTOP_VERSION 1009#ifdef DESKTOP_VERSION
996 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 1010 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
997#endif 1011#endif
998 updateView(); 1012 updateView();
999} 1013}
1000 1014
1001void KOMonthView::updateDayLabels() 1015void KOMonthView::updateDayLabels()
1002{ 1016{
1003 1017
1004 QPtrVector<QLabel> *mDayLabelsT; 1018 QPtrVector<QLabel> *mDayLabelsT;
1005#if 0 1019#if 0
1006 if (mShowWeekView ) 1020 if (mShowWeekView )
1007 mDayLabelsT = &mDayLabelsW; 1021 mDayLabelsT = &mDayLabelsW;
1008 else 1022 else
1009 mDayLabelsT = &mDayLabels; 1023 mDayLabelsT = &mDayLabels;
1010#endif 1024#endif
1011 1025
1012 mDayLabelsT = &mDayLabelsW; 1026 mDayLabelsT = &mDayLabelsW;
1013 for (int i = 0; i < 7; i++) { 1027 for (int i = 0; i < 7; i++) {
1014 if (mWeekStartsMonday) { 1028 if (mWeekStartsMonday) {
1015 bool show = mShortDayLabels; 1029 bool show = mShortDayLabels;
1016 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) 1030 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
1017 show = true; 1031 show = true;
1018 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 1032 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
1019 } else { 1033 } else {
1020 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); 1034 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels));
1021 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); 1035 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels));
1022 1036
1023 } 1037 }
1024 } 1038 }
1025 mDayLabelsT = &mDayLabels; 1039 mDayLabelsT = &mDayLabels;
1026 for (int i = 0; i < 7; i++) { 1040 for (int i = 0; i < 7; i++) {
1027 if (mWeekStartsMonday) { 1041 if (mWeekStartsMonday) {
1028 bool show = mShortDayLabels; 1042 bool show = mShortDayLabels;
1029 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) 1043 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
1030 show = true; 1044 show = true;
1031 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 1045 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
1032 } else { 1046 } else {
1033 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); 1047 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels));
1034 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); 1048 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels));
1035 1049
1036 } 1050 }
1037 } 1051 }
1038 1052
1039} 1053}
1040 1054
1041void KOMonthView::showDates(const QDate &start, const QDate &) 1055void KOMonthView::showDates(const QDate &start, const QDate &)
1042{ 1056{
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index b89b2bc..700f098 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -98,97 +98,97 @@ class MonthViewItem: public QListBoxItem
98 98
99 void setPalette(const QPalette &p) { mPalette = p; } 99 void setPalette(const QPalette &p) { mPalette = p; }
100 QPalette palette() const { return mPalette; } 100 QPalette palette() const { return mPalette; }
101 101
102 Incidence *incidence() const { return mIncidence; } 102 Incidence *incidence() const { return mIncidence; }
103 QDate incidenceDate() { return mDate; } 103 QDate incidenceDate() { return mDate; }
104 104
105 protected: 105 protected:
106 virtual void paint(QPainter *); 106 virtual void paint(QPainter *);
107 virtual int height(const QListBox *) const; 107 virtual int height(const QListBox *) const;
108 virtual int width(const QListBox *) const; 108 virtual int width(const QListBox *) const;
109 109
110 private: 110 private:
111 bool mRecur; 111 bool mRecur;
112 bool mAlarm; 112 bool mAlarm;
113 bool mReply; 113 bool mReply;
114 bool mInfo; 114 bool mInfo;
115 115
116 QPalette mPalette; 116 QPalette mPalette;
117 QDate mDate; 117 QDate mDate;
118 118
119 Incidence *mIncidence; 119 Incidence *mIncidence;
120}; 120};
121 121
122 122
123class KOMonthView; 123class KOMonthView;
124 124
125class MonthViewCell : public QWidget 125class MonthViewCell : public QWidget
126{ 126{
127 Q_OBJECT 127 Q_OBJECT
128 public: 128 public:
129 MonthViewCell(KOMonthView *,QWidget* ); 129 MonthViewCell(KOMonthView *,QWidget* );
130 130
131 void setDate( const QDate & ); 131 void setDate( const QDate & );
132 QDate date() const; 132 QDate date() const;
133 133
134 void setPrimary( bool ); 134 void setPrimary( bool );
135 bool isPrimary() const; 135 bool isPrimary() const;
136 136
137 void setHoliday( bool ); 137 void setHoliday( bool );
138 void setHoliday( const QString & ); 138 void setHoliday( const QString & );
139 139
140 void updateCell(); 140 void updateCell();
141 void startUpdateCell(); 141 void startUpdateCell();
142 void finishUpdateCell(); 142 void finishUpdateCell();
143 void insertEvent(Event *); 143 void insertEvent(Event *);
144 void insertTodo(Todo *); 144 void insertTodo(Todo *);
145 145
146 void updateConfig(); 146 void updateConfig( bool bigFont = false );
147 147
148 void enableScrollBars( bool ); 148 void enableScrollBars( bool );
149 149
150 Incidence *selectedIncidence(); 150 Incidence *selectedIncidence();
151 QDate selectedIncidenceDate(); 151 QDate selectedIncidenceDate();
152 152
153 void deselect(); 153 void deselect();
154 void select(); 154 void select();
155 void clear(); 155 void clear();
156 156
157#ifdef DESKTOP_VERSION 157#ifdef DESKTOP_VERSION
158 static QToolTipGroup *toolTipGroup(); 158 static QToolTipGroup *toolTipGroup();
159#endif 159#endif
160 signals: 160 signals:
161 void defaultAction( Incidence * ); 161 void defaultAction( Incidence * );
162 void newEventSignal( QDateTime ); 162 void newEventSignal( QDateTime );
163 void showDaySignal( QDate ); 163 void showDaySignal( QDate );
164 164
165 protected: 165 protected:
166 QString mToolTip; 166 QString mToolTip;
167 void resizeEvent( QResizeEvent * ); 167 void resizeEvent( QResizeEvent * );
168 168
169 protected slots: 169 protected slots:
170 void defaultAction( QListBoxItem * ); 170 void defaultAction( QListBoxItem * );
171 void contextMenu( QListBoxItem * ); 171 void contextMenu( QListBoxItem * );
172 void selection( QListBoxItem * ); 172 void selection( QListBoxItem * );
173 void cellClicked( QListBoxItem * ); 173 void cellClicked( QListBoxItem * );
174 void newEvent(); 174 void newEvent();
175 void showDay(); 175 void showDay();
176 176
177 private: 177 private:
178 KOMonthView *mMonthView; 178 KOMonthView *mMonthView;
179 179
180 QDate mDate; 180 QDate mDate;
181 bool mPrimary; 181 bool mPrimary;
182 bool mHoliday; 182 bool mHoliday;
183 QString mHolidayString; 183 QString mHolidayString;
184 184
185 //QLabel *mLabel; 185 //QLabel *mLabel;
186 QPushButton *mLabel; 186 QPushButton *mLabel;
187 QListBox *mItemList; 187 QListBox *mItemList;
188#ifdef DESKTOP_VERSION 188#ifdef DESKTOP_VERSION
189 static QToolTipGroup *mToolTipGroup; 189 static QToolTipGroup *mToolTipGroup;
190#endif 190#endif
191 QSize mLabelSize; 191 QSize mLabelSize;
192 QSize mLabelBigSize; 192 QSize mLabelBigSize;
193 QPalette mHolidayPalette; 193 QPalette mHolidayPalette;
194 QPalette mStandardPalette; 194 QPalette mStandardPalette;
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 2fb7c36..ea5aaa1 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -200,97 +200,98 @@ KOPrefs::KOPrefs() :
200 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); 200 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
201 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 201 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
202 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); 202 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
203 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); 203 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor);
204 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); 204 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor);
205 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); 205 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 ));
206 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); 206 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 ));
207 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); 207 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 ));
208 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); 208 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true);
209 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); 209 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true);
210 addItemBool("MonthViewWeek",&mMonthViewWeek,false); 210 addItemBool("MonthViewWeek",&mMonthViewWeek,false);
211 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); 211 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false);
212 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); 212 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 ));
213 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); 213 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 ));
214 addItemBool("UseAppColors",&mUseAppColors,false); 214 addItemBool("UseAppColors",&mUseAppColors,false);
215 215
216 216
217 217
218 KPrefs::setCurrentGroup("Views"); 218 KPrefs::setCurrentGroup("Views");
219 addItemBool("Show Date Navigator",&mShowDateNavigator,true); 219 addItemBool("Show Date Navigator",&mShowDateNavigator,true);
220 addItemInt("Hour Size",&mHourSize,8); 220 addItemInt("Hour Size",&mHourSize,8);
221 addItemBool("Show Daily Recurrences",&mDailyRecur,true); 221 addItemBool("Show Daily Recurrences",&mDailyRecur,true);
222 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); 222 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true);
223 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); 223 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true);
224 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); 224 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true);
225 addItemBool("ShowShortMonthName",&mMonthShowShort,false); 225 addItemBool("ShowShortMonthName",&mMonthShowShort,false);
226 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); 226 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true);
227#ifdef DESKTOP_VERION 227#ifdef DESKTOP_VERION
228 addItemBool("Enable ToolTips",&mEnableToolTips,true); 228 addItemBool("Enable ToolTips",&mEnableToolTips,true);
229#else 229#else
230 addItemBool("Enable ToolTips",&mEnableToolTips,false); 230 addItemBool("Enable ToolTips",&mEnableToolTips,false);
231#endif 231#endif
232 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); 232 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false);
233 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); 233 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false);
234 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); 234 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true);
235 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); 235 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true);
236 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); 236 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true);
237 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); 237 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false);
238 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); 238 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false);
239 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); 239 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true);
240 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); 240 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true);
241 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; 241 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);;
242 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); 242 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true);
243 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); 243 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false);
244 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); 244 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false);
245 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); 245 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true);
246 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); 246 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false);
247 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); 247 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false);
248 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); 248 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true);
249 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true);
249 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); 250 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false);
250 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); 251 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false);
251#ifdef DESKTOP_VERSION 252#ifdef DESKTOP_VERSION
252 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); 253 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true);
253#else 254#else
254 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); 255 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false);
255#endif 256#endif
256 addItemInt("Day Begins",&mDayBegins,7); 257 addItemInt("Day Begins",&mDayBegins,7);
257 addItemInt("Working Hours Start",&mWorkingHoursStart,8); 258 addItemInt("Working Hours Start",&mWorkingHoursStart,8);
258 addItemInt("Working Hours End",&mWorkingHoursEnd,17); 259 addItemInt("Working Hours End",&mWorkingHoursEnd,17);
259 addItemBool("Exclude Holidays",&mExcludeHolidays,true); 260 addItemBool("Exclude Holidays",&mExcludeHolidays,true);
260 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); 261 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true);
261 262
262 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); 263 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false);
263 addItemBool("Full View Month",&mFullViewMonth,true); 264 addItemBool("Full View Month",&mFullViewMonth,true);
264 addItemBool("Full View Todo",&mFullViewTodo,true); 265 addItemBool("Full View Todo",&mFullViewTodo,true);
265 addItemBool("Quick Todo",&mEnableQuickTodo,false); 266 addItemBool("Quick Todo",&mEnableQuickTodo,false);
266 267
267 addItemInt("Next X Days",&mNextXDays,3); 268 addItemInt("Next X Days",&mNextXDays,3);
268 269
269 KPrefs::setCurrentGroup("Printer"); 270 KPrefs::setCurrentGroup("Printer");
270 271
271 KPrefs::setCurrentGroup("Layout"); 272 KPrefs::setCurrentGroup("Layout");
272 273
273 addItemBool("CompactDialogs",&mCompactDialogs,false); 274 addItemBool("CompactDialogs",&mCompactDialogs,false);
274 addItemBool("VerticalScreen",&mVerticalScreen,true); 275 addItemBool("VerticalScreen",&mVerticalScreen,true);
275 276
276 KPrefs::setCurrentGroup("KOrganizer Plugins"); 277 KPrefs::setCurrentGroup("KOrganizer Plugins");
277 278
278 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); 279 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays");
279 280
280 KPrefs::setCurrentGroup("Group Scheduling"); 281 KPrefs::setCurrentGroup("Group Scheduling");
281 282
282 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); 283 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
283 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); 284 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
284 addItemStringList("AdditionalMails",&mAdditionalMails,""); 285 addItemStringList("AdditionalMails",&mAdditionalMails,"");
285 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); 286 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
286 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); 287 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
287 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); 288 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
288 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); 289 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto);
289 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); 290 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto);
290 291
291 KPrefs::setCurrentGroup( "Editors" ); 292 KPrefs::setCurrentGroup( "Editors" );
292 293
293 addItemStringList( "EventTemplates", &mEventTemplates ); 294 addItemStringList( "EventTemplates", &mEventTemplates );
294 addItemStringList( "TodoTemplates", &mTodoTemplates ); 295 addItemStringList( "TodoTemplates", &mTodoTemplates );
295 296
296 addItemInt("DestinationPolicy",&mDestination,standardDestination); 297 addItemInt("DestinationPolicy",&mDestination,standardDestination);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 6541af2..dddcdca 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -195,86 +195,87 @@ class KOPrefs : public KPimPrefs
195 bool mShowTimeInAgenda; 195 bool mShowTimeInAgenda;
196 bool mHideNonStartedTodos; 196 bool mHideNonStartedTodos;
197 197
198 int mLastSyncTime; 198 int mLastSyncTime;
199 void setCategoryColor(QString cat,const QColor & color); 199 void setCategoryColor(QString cat,const QColor & color);
200 QColor *categoryColor(QString cat); 200 QColor *categoryColor(QString cat);
201 201
202 QString mArchiveFile; 202 QString mArchiveFile;
203 QString mHtmlExportFile; 203 QString mHtmlExportFile;
204 bool mHtmlWithSave; 204 bool mHtmlWithSave;
205 205
206 QStringList mSelectedPlugins; 206 QStringList mSelectedPlugins;
207 207
208 QString mLastImportFile; 208 QString mLastImportFile;
209 QString mLastVcalFile; 209 QString mLastVcalFile;
210 QString mLastSaveFile; 210 QString mLastSaveFile;
211 QString mLastLoadFile; 211 QString mLastLoadFile;
212 212
213 213
214 QString mDefaultAlarmFile; 214 QString mDefaultAlarmFile;
215 int mIMIPScheduler; 215 int mIMIPScheduler;
216 int mIMIPSend; 216 int mIMIPSend;
217 QStringList mAdditionalMails; 217 QStringList mAdditionalMails;
218 int mIMIPAutoRefresh; 218 int mIMIPAutoRefresh;
219 int mIMIPAutoInsertReply; 219 int mIMIPAutoInsertReply;
220 int mIMIPAutoInsertRequest; 220 int mIMIPAutoInsertRequest;
221 int mIMIPAutoFreeBusy; 221 int mIMIPAutoFreeBusy;
222 int mIMIPAutoFreeBusyReply; 222 int mIMIPAutoFreeBusyReply;
223 223
224 QStringList mTodoTemplates; 224 QStringList mTodoTemplates;
225 QStringList mEventTemplates; 225 QStringList mEventTemplates;
226 226
227 int mDestination; 227 int mDestination;
228 228
229 229
230 bool mEditOnDoubleClick; 230 bool mEditOnDoubleClick;
231 bool mViewChangeHoldFullscreen; 231 bool mViewChangeHoldFullscreen;
232 bool mViewChangeHoldNonFullscreen; 232 bool mViewChangeHoldNonFullscreen;
233 bool mCenterOnCurrentTime; 233 bool mCenterOnCurrentTime;
234 bool mSetTimeToDayStartAt; 234 bool mSetTimeToDayStartAt;
235 bool mHighlightCurrentDay; 235 bool mHighlightCurrentDay;
236 bool mUseHighlightLightColor; 236 bool mUseHighlightLightColor;
237 bool mListViewMonthTimespan; 237 bool mListViewMonthTimespan;
238 bool mWNViewShowsParents; 238 bool mWNViewShowsParents;
239 bool mWNViewShowsPast; 239 bool mWNViewShowsPast;
240 bool mWNViewShowLocation; 240 bool mWNViewShowLocation;
241 bool mTodoViewShowsPercentage; 241 bool mTodoViewShowsPercentage;
242 bool mTodoViewUsesCatColors; 242 bool mTodoViewUsesCatColors;
243 bool mMonthViewUsesBigFont;
243 bool mTodoViewUsesSmallFont; 244 bool mTodoViewUsesSmallFont;
244 bool mTodoViewUsesForegroundColor; 245 bool mTodoViewUsesForegroundColor;
245 bool mMonthViewUsesForegroundColor; 246 bool mMonthViewUsesForegroundColor;
246 247
247 bool mHightlightDateTimeEdit; 248 bool mHightlightDateTimeEdit;
248 bool mShortDateInViewer; 249 bool mShortDateInViewer;
249 250
250 bool mShowDateNavigator; 251 bool mShowDateNavigator;
251 252
252 QStringList mLocationDefaults; 253 QStringList mLocationDefaults;
253 QStringList mEventSummaryUser; 254 QStringList mEventSummaryUser;
254 QStringList mTodoSummaryUser; 255 QStringList mTodoSummaryUser;
255 256
256 bool mUseInternalAlarmNotification; 257 bool mUseInternalAlarmNotification;
257 int mAlarmPlayBeeps; 258 int mAlarmPlayBeeps;
258 int mAlarmSuspendTime; 259 int mAlarmSuspendTime;
259 int mAlarmSuspendCount; 260 int mAlarmSuspendCount;
260 int mAlarmBeepInterval; 261 int mAlarmBeepInterval;
261 int mOldLanguage; 262 int mOldLanguage;
262 int mOldLoadedLanguage; 263 int mOldLoadedLanguage;
263 264
264 265
265 QString mActiveSyncPort; 266 QString mActiveSyncPort;
266 QString mActiveSyncIP; 267 QString mActiveSyncIP;
267 268
268 private: 269 private:
269 QDict<QColor> mCategoryColors; 270 QDict<QColor> mCategoryColors;
270 QColor mDefaultCategoryColor; 271 QColor mDefaultCategoryColor;
271 272
272 QFont mDefaultTimeBarFont; 273 QFont mDefaultTimeBarFont;
273 QFont mDefaultViewFont; 274 QFont mDefaultViewFont;
274 QFont mDefaultMonthViewFont; 275 QFont mDefaultMonthViewFont;
275 276
276 QString mName; 277 QString mName;
277 QString mEmail; 278 QString mEmail;
278}; 279};
279 280
280#endif 281#endif
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 580dff2..452d019 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -714,97 +714,100 @@ void KOPrefsDialog::setupViewsTab()
714 topLayout->setSpacing(spacingHint()); 714 topLayout->setSpacing(spacingHint());
715 topLayout->setMargin(marginHint()); 715 topLayout->setMargin(marginHint());
716 ii = 0; 716 ii = 0;
717 QLabel *lab; 717 QLabel *lab;
718 QHBox *habo = new QHBox( topFrame ); 718 QHBox *habo = new QHBox( topFrame );
719 if ( QApplication::desktop()->width() <= 480 ) { 719 if ( QApplication::desktop()->width() <= 480 ) {
720 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 720 lab = new QLabel ( i18n("Show events that recur "), topFrame );
721 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 721 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
722 ii++; 722 ii++;
723 } else { 723 } else {
724 new QLabel ( i18n("Show events that recur "), habo ); 724 new QLabel ( i18n("Show events that recur "), habo );
725 } 725 }
726 dailyRecur = 726 dailyRecur =
727 addWidBool(i18n("daily"), 727 addWidBool(i18n("daily"),
728 &(KOPrefs::instance()->mMonthDailyRecur),habo); 728 &(KOPrefs::instance()->mMonthDailyRecur),habo);
729 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 729 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
730 730
731 weeklyRecur = 731 weeklyRecur =
732 addWidBool(i18n("weekly"), 732 addWidBool(i18n("weekly"),
733 &(KOPrefs::instance()->mMonthWeeklyRecur),habo); 733 &(KOPrefs::instance()->mMonthWeeklyRecur),habo);
734 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 734 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
735 ii++; 735 ii++;
736 736
737 737
738 habo = new QHBox( topFrame ); 738 habo = new QHBox( topFrame );
739 if ( QApplication::desktop()->width() <= 480 ) { 739 if ( QApplication::desktop()->width() <= 480 ) {
740 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 740 lab = new QLabel (i18n("Show in every cell ") , topFrame );
741 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 741 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
742 ii++; 742 ii++;
743 743
744 } else { 744 } else {
745 new QLabel ( i18n("Show in every cell "), habo ); 745 new QLabel ( i18n("Show in every cell "), habo );
746 } 746 }
747 weeklyRecur = 747 weeklyRecur =
748 addWidBool(i18n("short month"), 748 addWidBool(i18n("short month"),
749 &(KOPrefs::instance()->mMonthShowShort),habo); 749 &(KOPrefs::instance()->mMonthShowShort),habo);
750 weeklyRecur = 750 weeklyRecur =
751 addWidBool(i18n("icons"), 751 addWidBool(i18n("icons"),
752 &(KOPrefs::instance()->mMonthShowIcons),habo); 752 &(KOPrefs::instance()->mMonthShowIcons),habo);
753 753
754 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 754 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
755 ii++; 755 ii++;
756#ifdef DESKTOP_VERSION 756#ifdef DESKTOP_VERSION
757 KPrefsDialogWidBool *enableMonthScroll = 757 KPrefsDialogWidBool *enableMonthScroll =
758 addWidBool(i18n("Enable scrollbars in month view cells"), 758 addWidBool(i18n("Enable scrollbars in month view cells"),
759 &(KOPrefs::instance()->mEnableMonthScroll),topFrame); 759 &(KOPrefs::instance()->mEnableMonthScroll),topFrame);
760 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); 760 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0);
761#endif 761#endif
762 762 dummy =
763 addWidBool(i18n("Week view mode uses bigger font"),
764 &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame);
765 topLayout->addWidget(dummy->checkBox(),ii++,0);
763 dummy = 766 dummy =
764 addWidBool(i18n("Show Sat/Sun together"), 767 addWidBool(i18n("Show Sat/Sun together"),
765 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); 768 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame);
766 topLayout->addWidget(dummy->checkBox(),ii++,0); 769 topLayout->addWidget(dummy->checkBox(),ii++,0);
767 770
768 KPrefsDialogWidBool *coloredCategoriesInMonthView = 771 KPrefsDialogWidBool *coloredCategoriesInMonthView =
769 addWidBool(i18n("Month view uses category colors"), 772 addWidBool(i18n("Month view uses category colors"),
770 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); 773 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame);
771 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 774 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
772 775
773 dummy = 776 dummy =
774 addWidBool(i18n("Categorie colors are applied to text"), 777 addWidBool(i18n("Categorie colors are applied to text"),
775 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); 778 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame);
776 topLayout->addWidget(dummy->checkBox(),ii++,0); 779 topLayout->addWidget(dummy->checkBox(),ii++,0);
777 coloredCategoriesInMonthView = 780 coloredCategoriesInMonthView =
778 addWidBool(i18n("Month view uses day colors"), 781 addWidBool(i18n("Month view uses day colors"),
779 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); 782 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame);
780 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 783 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
781 784
782 KPrefsDialogWidColor *holidayColor = 785 KPrefsDialogWidColor *holidayColor =
783 addWidColor(i18n("Day color odd months"), 786 addWidColor(i18n("Day color odd months"),
784 &(KOPrefs::instance()->mMonthViewOddColor),topFrame); 787 &(KOPrefs::instance()->mMonthViewOddColor),topFrame);
785 topLayout->addWidget(holidayColor->label(),ii,0); 788 topLayout->addWidget(holidayColor->label(),ii,0);
786 topLayout->addWidget(holidayColor->button(),ii++,1); 789 topLayout->addWidget(holidayColor->button(),ii++,1);
787 790
788 holidayColor = 791 holidayColor =
789 addWidColor(i18n("Day color even months"), 792 addWidColor(i18n("Day color even months"),
790 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); 793 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame);
791 topLayout->addWidget(holidayColor->label(),ii,0); 794 topLayout->addWidget(holidayColor->label(),ii,0);
792 topLayout->addWidget(holidayColor->button(),ii++,1); 795 topLayout->addWidget(holidayColor->button(),ii++,1);
793 796
794 797
795 holidayColor = 798 holidayColor =
796 addWidColor(i18n("Color for Sundays + category \"Holiday\""), 799 addWidColor(i18n("Color for Sundays + category \"Holiday\""),
797 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 800 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
798 topLayout->addWidget(holidayColor->label(),ii,0); 801 topLayout->addWidget(holidayColor->label(),ii,0);
799 topLayout->addWidget(holidayColor->button(),ii++,1); 802 topLayout->addWidget(holidayColor->button(),ii++,1);
800 // *********************** What'sNext View 803 // *********************** What'sNext View
801 topFrame = addPage(i18n("What's Next View"),0,0); 804 topFrame = addPage(i18n("What's Next View"),0,0);
802 // DesktopIcon("viewmag",KIcon::SizeMedium)); 805 // DesktopIcon("viewmag",KIcon::SizeMedium));
803 806
804 topLayout = new QGridLayout(topFrame,4,1); 807 topLayout = new QGridLayout(topFrame,4,1);
805 topLayout->setSpacing(spacingHint()); 808 topLayout->setSpacing(spacingHint());
806 topLayout->setMargin(marginHint()); 809 topLayout->setMargin(marginHint());
807 ii = 0; 810 ii = 0;
808 KPrefsDialogWidBool *passwdk = 811 KPrefsDialogWidBool *passwdk =
809 812
810 addWidBool(i18n("Show events, that are done in \nWhat's Next view"), 813 addWidBool(i18n("Show events, that are done in \nWhat's Next view"),