-rw-r--r-- | desktop/rpm/kdepim_rpm | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 11 | ||||
-rw-r--r-- | version | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/desktop/rpm/kdepim_rpm b/desktop/rpm/kdepim_rpm index 9093b40..f75cd48 100644 --- a/desktop/rpm/kdepim_rpm +++ b/desktop/rpm/kdepim_rpm | |||
@@ -1,27 +1,27 @@ | |||
1 | Summary: A collection of PIM programs | 1 | Summary: A collection of PIM programs |
2 | Name: KDE-Pim-Pi | 2 | Name: KDE-Pim-Pi |
3 | Version: 2.0.1 | 3 | Version: 2.0.2 |
4 | Release: SuSE_9.2 | 4 | Release: SuSE_9.2 |
5 | Copyright:GPL | 5 | Copyright:GPL |
6 | Group: Productivity/Pim | 6 | Group: Productivity/Pim |
7 | Source:http://sourceforge.net/projects/kdepimpi/ | 7 | Source:http://sourceforge.net/projects/kdepimpi/ |
8 | URL:http://sourceforge.net/projects/kdepimpi/ | 8 | URL:http://sourceforge.net/projects/kdepimpi/ |
9 | Packager: zautrix | 9 | Packager: zautrix |
10 | 10 | ||
11 | %description | 11 | %description |
12 | This package contains the platform-independent PIM programs from | 12 | This package contains the platform-independent PIM programs from |
13 | www.pi-sync.net, compiled for SuSE 9.2: | 13 | www.pi-sync.net, compiled for SuSE 9.2: |
14 | KTimeTacker/Pi | 14 | KTimeTacker/Pi |
15 | KPhone/Pi | 15 | KPhone/Pi |
16 | KAddressbook/Pi | 16 | KAddressbook/Pi |
17 | KOrganizer/Pi | 17 | KOrganizer/Pi |
18 | PasswordManager/Pi | 18 | PasswordManager/Pi |
19 | KOPieMail/Pi | 19 | KOPieMail/Pi |
20 | 20 | ||
21 | These applications do not need anything from the KDE-desktop | 21 | These applications do not need anything from the KDE-desktop |
22 | at all to run on Linux. However, there is a dependency from | 22 | at all to run on Linux. However, there is a dependency from |
23 | two KDE libs, because a small command line program is included | 23 | two KDE libs, because a small command line program is included |
24 | to make it possible to sync with the KDE-desktop applications. | 24 | to make it possible to sync with the KDE-desktop applications. |
25 | 25 | ||
26 | These applications are independent from the KDE-desktop | 26 | These applications are independent from the KDE-desktop |
27 | environment. That means, nothing of your existing | 27 | environment. That means, nothing of your existing |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 8c27c43..d3db89a 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -602,111 +602,112 @@ void KOAgendaView::resizeEvent( QResizeEvent* e ) | |||
602 | mBlockUpdating = false; | 602 | mBlockUpdating = false; |
603 | //mAgenda->setMinimumSize(800 , 600 ); | 603 | //mAgenda->setMinimumSize(800 , 600 ); |
604 | //qDebug("mAgenda->resize+++++++++++++++ "); | 604 | //qDebug("mAgenda->resize+++++++++++++++ "); |
605 | updateConfig(); | 605 | updateConfig(); |
606 | //qDebug("KOAgendaView::Updating now possible "); | 606 | //qDebug("KOAgendaView::Updating now possible "); |
607 | } else | 607 | } else |
608 | createDayLabels(); | 608 | createDayLabels(); |
609 | //qDebug("resizeEvent end "); | 609 | //qDebug("resizeEvent end "); |
610 | 610 | ||
611 | } | 611 | } |
612 | void KOAgendaView::slotDaylabelClicked() | 612 | void KOAgendaView::slotDaylabelClicked() |
613 | { | 613 | { |
614 | QString cap = ((QPushButton*) sender() )->caption(); | 614 | QString cap = ((QPushButton*) sender() )->caption(); |
615 | 615 | ||
616 | QDate firstDate = mSelectedDates.first(); | 616 | QDate firstDate = mSelectedDates.first(); |
617 | if ( cap == "0" ) | 617 | if ( cap == "0" ) |
618 | emit showDateView( 6, firstDate ); | 618 | emit showDateView( 6, firstDate ); |
619 | else if ( cap != "last" ) { | 619 | else if ( cap != "last" ) { |
620 | if ( mSelectedDates.count() == 1) | 620 | if ( mSelectedDates.count() == 1) |
621 | emit showDateView( 9, firstDate.addDays( cap.toInt()-1 ) ); | 621 | emit showDateView( 9, firstDate.addDays( cap.toInt()-1 ) ); |
622 | else | 622 | else |
623 | emit showDateView( 3, firstDate.addDays( cap.toInt()-1 ) ); | 623 | emit showDateView( 3, firstDate.addDays( cap.toInt()-1 ) ); |
624 | } | 624 | } |
625 | else | 625 | else |
626 | showDateView( 10, firstDate.addDays(1 ) ); | 626 | showDateView( 10, firstDate.addDays(1) ); |
627 | } | 627 | } |
628 | 628 | ||
629 | QPushButton* KOAgendaView::getNewDaylabel() | 629 | QPushButton* KOAgendaView::getNewDaylabel() |
630 | { | 630 | { |
631 | 631 | ||
632 | QPushButton * dayLabel = new QPushButton(mDayLabels); | 632 | QPushButton * dayLabel = new QPushButton(mDayLabels); |
633 | dayLabel->setFlat( true ); | 633 | dayLabel->setFlat( true ); |
634 | connect( dayLabel, SIGNAL( clicked() ), this, SLOT ( slotDaylabelClicked() ) ); | 634 | connect( dayLabel, SIGNAL( clicked() ), this, SLOT ( slotDaylabelClicked() ) ); |
635 | dayLabel->setFocusPolicy(NoFocus); | 635 | dayLabel->setFocusPolicy(NoFocus); |
636 | dayLabel->setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); | 636 | dayLabel->setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); |
637 | mDayLabelsList.append( dayLabel ); | 637 | mDayLabelsList.append( dayLabel ); |
638 | mLayoutDayLabels->addWidget(dayLabel); | 638 | mLayoutDayLabels->addWidget(dayLabel); |
639 | //mLayoutDayLabels->setStretchFactor(dayLabel, 100); | 639 | //mLayoutDayLabels->setStretchFactor(dayLabel, 100); |
640 | return dayLabel ; | 640 | return dayLabel ; |
641 | } | 641 | } |
642 | 642 | ||
643 | void KOAgendaView::createDayLabels() | 643 | void KOAgendaView::createDayLabels() |
644 | { | 644 | { |
645 | 645 | ||
646 | if ( mBlockUpdating || globalFlagBlockLabel == 1) { | 646 | if ( mBlockUpdating || globalFlagBlockLabel == 1) { |
647 | // qDebug(" KOAgendaView::createDayLabels() blocked "); | 647 | // qDebug(" KOAgendaView::createDayLabels() blocked "); |
648 | return; | 648 | return; |
649 | 649 | ||
650 | } | 650 | } |
651 | int newHight; | 651 | int newHight; |
652 | 652 | ||
653 | // ### Before deleting and recreating we could check if mSelectedDates changed... | 653 | // ### Before deleting and recreating we could check if mSelectedDates changed... |
654 | // It would remove some flickering and gain speed (since this is called by | 654 | // It would remove some flickering and gain speed (since this is called by |
655 | // each updateView() call) | 655 | // each updateView() call) |
656 | 656 | ||
657 | int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - 2; | 657 | int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - 2; |
658 | mDayLabelsFrame->setMaximumWidth( mUpcomingWidth ); | 658 | mDayLabelsFrame->setMaximumWidth( mUpcomingWidth ); |
659 | if ( maxWid < 0 ) | 659 | if ( maxWid < 0 ) |
660 | maxWid = 20; | 660 | maxWid = 20; |
661 | 661 | ||
662 | QFont dlf = KOPrefs::instance()->mTimeLabelsFont; | 662 | QFont dlf = KOPrefs::instance()->mTimeLabelsFont; |
663 | QFontMetrics fm ( dlf ); | 663 | QFontMetrics fm ( dlf ); |
664 | int selCount = mSelectedDates.count(); | 664 | int selCount = mSelectedDates.count(); |
665 | QString dayTest = "Mon 20"; | 665 | QString dayTest = "Won 20"; |
666 | //QString dayTest = "Mon 20"; | ||
666 | int wid = fm.width( dayTest ); | 667 | int wid = fm.width( dayTest ); |
667 | //maxWid -= ( selCount * 3 ); //working for QLabels | 668 | //maxWid -= ( selCount * 3 ); //working for QLabels |
668 | maxWid -= ( selCount * 5 ); //working for QPushButton | 669 | maxWid -= ( selCount * 5 ); //working for QPushButton |
669 | if ( maxWid < 0 ) | 670 | if ( maxWid < 0 ) |
670 | maxWid = 20; | 671 | maxWid = 20; |
671 | int needWid = wid * selCount; | 672 | int needWid = wid * selCount; |
672 | //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); | 673 | //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); |
673 | //if ( needWid > maxWid ) | 674 | //if ( needWid > maxWid ) |
674 | // qDebug("DAYLABELS TOOOOOOO BIG "); | 675 | // qDebug("DAYLABELS TOOOOOOO BIG "); |
675 | while ( needWid > maxWid ) { | 676 | while ( needWid > maxWid ) { |
676 | dayTest = dayTest.left( dayTest.length() - 1 ); | 677 | dayTest = dayTest.left( dayTest.length() - 1 ); |
677 | wid = fm.width( dayTest ); | 678 | wid = fm.width( dayTest )+1; |
678 | needWid = wid * selCount; | 679 | needWid = wid * selCount; |
679 | } | 680 | } |
680 | int maxLen = dayTest.length(); | 681 | int maxLen = dayTest.length(); |
681 | int fontPoint = dlf.pointSize(); | 682 | int fontPoint = dlf.pointSize(); |
682 | if ( maxLen < 2 ) { | 683 | if ( maxLen < 2 ) { |
683 | int fontPoint = dlf.pointSize(); | 684 | int fontPoint = dlf.pointSize(); |
684 | while ( fontPoint > 4 ) { | 685 | while ( fontPoint > 4 ) { |
685 | --fontPoint; | 686 | --fontPoint; |
686 | dlf.setPointSize( fontPoint ); | 687 | dlf.setPointSize( fontPoint ); |
687 | QFontMetrics f( dlf ); | 688 | QFontMetrics f( dlf ); |
688 | wid = f.width( "20" )+2; | 689 | wid = f.width( "30" )+3; |
689 | needWid = wid * selCount; | 690 | needWid = wid * selCount; |
690 | if ( needWid < maxWid ) | 691 | if ( needWid < maxWid ) |
691 | break; | 692 | break; |
692 | } | 693 | } |
693 | maxLen = 2; | 694 | maxLen = 2; |
694 | } | 695 | } |
695 | //qDebug("Max len %d ", dayTest.length() ); | 696 | //qDebug("Max len %d ", dayTest.length() ); |
696 | 697 | ||
697 | QFontMetrics tempF( dlf ); | 698 | QFontMetrics tempF( dlf ); |
698 | newHight = tempF.height(); | 699 | newHight = tempF.height(); |
699 | mDayLabels->setFont( dlf ); | 700 | mDayLabels->setFont( dlf ); |
700 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; | 701 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; |
701 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); | 702 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); |
702 | //mLayoutDayLabels->addSpacing( 2 ); | 703 | //mLayoutDayLabels->addSpacing( 2 ); |
703 | // QFont lFont = dlf; | 704 | // QFont lFont = dlf; |
704 | bool appendLabels = false; | 705 | bool appendLabels = false; |
705 | QPushButton *dayLabel; | 706 | QPushButton *dayLabel; |
706 | dayLabel = mDayLabelsList.first(); | 707 | dayLabel = mDayLabelsList.first(); |
707 | if ( !dayLabel ) { | 708 | if ( !dayLabel ) { |
708 | appendLabels = true; | 709 | appendLabels = true; |
709 | dayLabel = getNewDaylabel(); | 710 | dayLabel = getNewDaylabel(); |
710 | } | 711 | } |
711 | dayLabel->setFixedWidth( mTimeLabels->width()+2 ); | 712 | dayLabel->setFixedWidth( mTimeLabels->width()+2 ); |
712 | dayLabel->setFont( dlf ); | 713 | dayLabel->setFont( dlf ); |
@@ -976,50 +977,48 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) | |||
976 | endDt.setDate(startDate. | 977 | endDt.setDate(startDate. |
977 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 978 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
978 | } else { | 979 | } else { |
979 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 980 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
980 | endDt.setDate(startDate); | 981 | endDt.setDate(startDate); |
981 | } | 982 | } |
982 | } | 983 | } |
983 | } else { | 984 | } else { |
984 | // todo | 985 | // todo |
985 | qDebug("tooooodoooooo "); | 986 | qDebug("tooooodoooooo "); |
986 | if (item->lastMultiItem()) { | 987 | if (item->lastMultiItem()) { |
987 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 988 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
988 | endDt.setDate(startDate. | 989 | endDt.setDate(startDate. |
989 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 990 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
990 | } else { | 991 | } else { |
991 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); | 992 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); |
992 | if ( item->cellYBottom() > 0 ) | 993 | if ( item->cellYBottom() > 0 ) |
993 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 994 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
994 | else | 995 | else |
995 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); | 996 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); |
996 | endDt.setDate(startDate); | 997 | endDt.setDate(startDate); |
997 | } | 998 | } |
998 | } | 999 | } |
999 | } | 1000 | } |
1000 | |||
1001 | qDebug("to888"); | ||
1002 | if ( item->incidence()->type() == "Event" ) { | 1001 | if ( item->incidence()->type() == "Event" ) { |
1003 | item->incidence()->setDtStart(startDt); | 1002 | item->incidence()->setDtStart(startDt); |
1004 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); | 1003 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); |
1005 | } else if ( item->incidence()->type() == "Todo" ) { | 1004 | } else if ( item->incidence()->type() == "Todo" ) { |
1006 | (static_cast<Todo*>(item->incidence()))->setDtDue(endDt); | 1005 | (static_cast<Todo*>(item->incidence()))->setDtDue(endDt); |
1007 | } | 1006 | } |
1008 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); | 1007 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); |
1009 | item->incidence()->setRevision(item->incidence()->revision()+1); | 1008 | item->incidence()->setRevision(item->incidence()->revision()+1); |
1010 | item->setItemDate(startDt.date()); | 1009 | item->setItemDate(startDt.date()); |
1011 | //item->updateItem(); | 1010 | //item->updateItem(); |
1012 | if ( item->incidence()->type() == "Todo" ) { | 1011 | if ( item->incidence()->type() == "Todo" ) { |
1013 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); | 1012 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); |
1014 | 1013 | ||
1015 | } | 1014 | } |
1016 | else | 1015 | else |
1017 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); | 1016 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); |
1018 | item->updateItem(); | 1017 | item->updateItem(); |
1019 | } | 1018 | } |
1020 | 1019 | ||
1021 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) | 1020 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) |
1022 | { | 1021 | { |
1023 | // kdDebug() << "KOAgendaView::selectDates" << endl; | 1022 | // kdDebug() << "KOAgendaView::selectDates" << endl; |
1024 | 1023 | ||
1025 | mSelectedDates.clear(); | 1024 | mSelectedDates.clear(); |
@@ -1 +1 @@ | |||
version = "2.0.1"; | version = "2.0.2"; | ||