summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp17
-rw-r--r--kabc/addressee.h3
-rw-r--r--kabc/field.cpp6
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp2
-rw-r--r--korganizer/koagendaitem.cpp28
-rw-r--r--korganizer/komonthview.cpp21
6 files changed, 36 insertions, 41 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 7f592e9..155ce24 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -50,9 +50,8 @@ struct Addressee::AddresseeData : public KShared
50{ 50{
51 QString uid; 51 QString uid;
52 QString name; 52 QString name;
53 QString formattedName; 53 QString formattedName;
54 QString defaultFormattedName;
55 QString familyName; 54 QString familyName;
56 QString givenName; 55 QString givenName;
57 QString additionalName; 56 QString additionalName;
58 QString prefix; 57 QString prefix;
@@ -747,35 +746,19 @@ void Addressee::setFormattedName( const QString &formattedName )
747 detach(); 746 detach();
748 mData->empty = false; 747 mData->empty = false;
749 mData->formattedName = formattedName; 748 mData->formattedName = formattedName;
750} 749}
751void Addressee::setDefaultFormattedName( const QString &formattedName )
752{
753 if ( formattedName == mData->defaultFormattedName ) return;
754 detach();
755 mData->empty = false;
756 mData->defaultFormattedName = formattedName;
757}
758 750
759QString Addressee::formattedName() const 751QString Addressee::formattedName() const
760{ 752{
761 return mData->formattedName; 753 return mData->formattedName;
762} 754}
763QString Addressee::defaultFormattedName() const
764{
765 return mData->defaultFormattedName;
766}
767 755
768QString Addressee::formattedNameLabel() 756QString Addressee::formattedNameLabel()
769{ 757{
770 return i18n("Formatted Name"); 758 return i18n("Formatted Name");
771} 759}
772 760
773QString Addressee::defaultFormattedNameLabel()
774{
775 return i18n("Def.Formatted Name");
776}
777
778 761
779void Addressee::setFamilyName( const QString &familyName ) 762void Addressee::setFamilyName( const QString &familyName )
780{ 763{
781 if ( familyName == mData->familyName ) return; 764 if ( familyName == mData->familyName ) return;
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 0d688f8..a2fbcf5 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -153,19 +153,16 @@ class Addressee
153 /** 153 /**
154 Set formatted name. 154 Set formatted name.
155 */ 155 */
156 void setFormattedName( const QString &formattedName ); 156 void setFormattedName( const QString &formattedName );
157 void setDefaultFormattedName( const QString &formattedName );
158 /** 157 /**
159 Return formatted name. 158 Return formatted name.
160 */ 159 */
161 QString formattedName() const; 160 QString formattedName() const;
162 QString defaultFormattedName() const;
163 /** 161 /**
164 Return translated label for formattedName field. 162 Return translated label for formattedName field.
165 */ 163 */
166 static QString formattedNameLabel(); 164 static QString formattedNameLabel();
167 static QString defaultFormattedNameLabel();
168 165
169 /** 166 /**
170 Set family name. 167 Set family name.
171 */ 168 */
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 5c561c3..fd51026 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -86,9 +86,8 @@ class Field::FieldImpl
86 Note, 86 Note,
87 Url, 87 Url,
88 Resource, 88 Resource,
89 Sip, 89 Sip,
90 DefaultFormattedName,
91 MobileWorkPhone, 90 MobileWorkPhone,
92 MobileHomePhone 91 MobileHomePhone
93 }; 92 };
94 93
@@ -128,10 +127,8 @@ QString Field::label()
128{ 127{
129 switch ( mImpl->fieldId() ) { 128 switch ( mImpl->fieldId() ) {
130 case FieldImpl::FormattedName: 129 case FieldImpl::FormattedName:
131 return Addressee::formattedNameLabel(); 130 return Addressee::formattedNameLabel();
132 case FieldImpl::DefaultFormattedName:
133 return Addressee::defaultFormattedNameLabel();
134 case FieldImpl::FamilyName: 131 case FieldImpl::FamilyName:
135 return Addressee::familyNameLabel(); 132 return Addressee::familyNameLabel();
136 case FieldImpl::GivenName: 133 case FieldImpl::GivenName:
137 return Addressee::givenNameLabel(); 134 return Addressee::givenNameLabel();
@@ -247,10 +244,8 @@ QString Field::value( const KABC::Addressee &a )
247{ 244{
248 switch ( mImpl->fieldId() ) { 245 switch ( mImpl->fieldId() ) {
249 case FieldImpl::FormattedName: 246 case FieldImpl::FormattedName:
250 return a.formattedName(); 247 return a.formattedName();
251 case FieldImpl::DefaultFormattedName:
252 return a.defaultFormattedName();
253 case FieldImpl::FamilyName: 248 case FieldImpl::FamilyName:
254 return a.familyName(); 249 return a.familyName();
255 case FieldImpl::GivenName: 250 case FieldImpl::GivenName:
256 return a.givenName(); 251 return a.givenName();
@@ -407,9 +402,8 @@ bool Field::isCustom()
407Field::List Field::allFields() 402Field::List Field::allFields()
408{ 403{
409 if ( mAllFields.isEmpty() ) { 404 if ( mAllFields.isEmpty() ) {
410 createField( FieldImpl::FormattedName, Frequent ); 405 createField( FieldImpl::FormattedName, Frequent );
411 createField( FieldImpl::DefaultFormattedName, Frequent );
412 createField( FieldImpl::FamilyName, Frequent ); 406 createField( FieldImpl::FamilyName, Frequent );
413 createField( FieldImpl::GivenName, Frequent ); 407 createField( FieldImpl::GivenName, Frequent );
414 createField( FieldImpl::AdditionalName ); 408 createField( FieldImpl::AdditionalName );
415 createField( FieldImpl::Prefix ); 409 createField( FieldImpl::Prefix );
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index b3da428..294ce7d 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -55,9 +55,9 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent )
55 mPopUp = new QPopupMenu( this ); 55 mPopUp = new QPopupMenu( this );
56 mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); 56 mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) );
57 mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); 57 mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) );
58 mPopUp->insertSeparator(); 58 mPopUp->insertSeparator();
59 mPopUp->insertItem( "What's Todo?", this, SLOT ( showTodo() ) ); 59 mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) );
60 mPopUp->insertSeparator(); 60 mPopUp->insertSeparator();
61 mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); 61 mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) );
62 mPopUp->insertSeparator(); 62 mPopUp->insertSeparator();
63 mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); 63 mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) );
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 23afe7a..e545ca8 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -442,24 +442,33 @@ void KOAgendaItem::resizePixmap( int w , int h )
442} 442}
443QPixmap * KOAgendaItem::paintPix() 443QPixmap * KOAgendaItem::paintPix()
444{ 444{
445 static QPixmap* mPaintPix = 0; 445 static QPixmap* mPaintPix = 0;
446 if ( ! mPaintPix ) 446 if ( ! mPaintPix ) {
447 mPaintPix = new QPixmap(1,1); 447 int w = QApplication::desktop()->width();
448 int h = QApplication::desktop()->height();
449 mPaintPix = new QPixmap(w,h);
450 }
448 return mPaintPix ; 451 return mPaintPix ;
449} 452}
450QPixmap * KOAgendaItem::paintPixAllday() 453QPixmap * KOAgendaItem::paintPixAllday()
451{ 454{
452 static QPixmap* mPaintPixA = 0; 455 static QPixmap* mPaintPixA = 0;
453 if ( ! mPaintPixA ) 456 if ( ! mPaintPixA ) {
454 mPaintPixA = new QPixmap(1,1); 457 int w = QApplication::desktop()->width();
458 int h = QApplication::desktop()->height()/3;
459 mPaintPixA = new QPixmap(w,h);
460 }
455 return mPaintPixA ; 461 return mPaintPixA ;
456} 462}
457QPixmap * KOAgendaItem::paintPixSel() 463QPixmap * KOAgendaItem::paintPixSel()
458{ 464{
459 static QPixmap* mPaintPixSel = 0; 465 static QPixmap* mPaintPixSel = 0;
460 if ( ! mPaintPixSel ) 466 if ( ! mPaintPixSel ) {
461 mPaintPixSel = new QPixmap(1,1); 467 int w = QApplication::desktop()->width();
468 int h = QApplication::desktop()->height();
469 mPaintPixSel = new QPixmap(w,h);
470 }
462 return mPaintPixSel ; 471 return mPaintPixSel ;
463} 472}
464void KOAgendaItem::paintEvent ( QPaintEvent *e ) 473void KOAgendaItem::paintEvent ( QPaintEvent *e )
465{ 474{
@@ -524,9 +533,8 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
524 bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,CopyROP); 533 bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,CopyROP);
525} 534}
526void KOAgendaItem::computeText() 535void KOAgendaItem::computeText()
527{ 536{
528
529 mDisplayedText = mIncidence->summary(); 537 mDisplayedText = mIncidence->summary();
530 if ( (mIncidence->type() == "Todo") ) { 538 if ( (mIncidence->type() == "Todo") ) {
531 if ( static_cast<Todo*>(mIncidence)->hasDueDate() ) { 539 if ( static_cast<Todo*>(mIncidence)->hasDueDate() ) {
532 if ( static_cast<Todo*>(mIncidence)->dtDue().date() < QDate::currentDate() ) 540 if ( static_cast<Todo*>(mIncidence)->dtDue().date() < QDate::currentDate() )
@@ -535,9 +543,9 @@ void KOAgendaItem::computeText()
535 mDisplayedText += i18n(" (") +KGlobal::locale()->formatTime((static_cast<Todo*>(mIncidence))->dtDue().time())+")"; 543 mDisplayedText += i18n(" (") +KGlobal::locale()->formatTime((static_cast<Todo*>(mIncidence))->dtDue().time())+")";
536 } 544 }
537 } else { 545 } else {
538 if ( !(mIncidence->doesFloat()) && KOPrefs::instance()->mShowTimeInAgenda) 546 if ( !(mIncidence->doesFloat()) && KOPrefs::instance()->mShowTimeInAgenda)
539 mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + "-" + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ; 547 mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + " - " + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ;
540 548
541 if ( mAllDay ) { 549 if ( mAllDay ) {
542 if ( mIncidence->dtStart().date().addDays(3) < mIncidence->dtEnd().date() ) { 550 if ( mIncidence->dtStart().date().addDays(3) < mIncidence->dtEnd().date() ) {
543 mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ; 551 mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ;
@@ -552,9 +560,9 @@ void KOAgendaItem::computeText()
552 else 560 else
553 mDisplayedText += "\n("; 561 mDisplayedText += "\n(";
554 mDisplayedText += mIncidence->location() +")"; 562 mDisplayedText += mIncidence->location() +")";
555 } 563 }
556 564#ifdef DESKTOP_VERSION
557 QString tipText = mIncidence->summary(); 565 QString tipText = mIncidence->summary();
558 if ( !mIncidence->doesFloat() ) { 566 if ( !mIncidence->doesFloat() ) {
559 if ( mIncidence->type() == "Event" ) { 567 if ( mIncidence->type() == "Event" ) {
560 if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) { 568 if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) {
@@ -582,9 +590,9 @@ void KOAgendaItem::computeText()
582 if (!mIncidence->location().isEmpty()) { 590 if (!mIncidence->location().isEmpty()) {
583 tipText += "\n"+i18n("Location: ")+mIncidence->location(); 591 tipText += "\n"+i18n("Location: ")+mIncidence->location();
584 } 592 }
585 QToolTip::add(this,tipText,toolTipGroup(),""); 593 QToolTip::add(this,tipText,toolTipGroup(),"");
586 594#endif
587} 595}
588void KOAgendaItem::updateItem() 596void KOAgendaItem::updateItem()
589{ 597{
590 computeText(); 598 computeText();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 4dfb9df..65d6acf 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -640,8 +640,12 @@ void MonthViewCell::startUpdateCell()
640} 640}
641 641
642int MonthViewCell::insertEvent(Event *event) 642int MonthViewCell::insertEvent(Event *event)
643{ 643{
644 bool useToolTips = true;
645#ifndef DEKSTOP_VERSION
646 useToolTips = false;
647#endif
644 QString mToolTipText; 648 QString mToolTipText;
645 setFocusPolicy(WheelFocus); 649 setFocusPolicy(WheelFocus);
646 if ( !(event->doesRecur() == Recurrence::rNone) ) { 650 if ( !(event->doesRecur() == Recurrence::rNone) ) {
647 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) 651 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
@@ -686,20 +690,26 @@ int MonthViewCell::insertEvent(Event *event)
686 time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; 690 time = KGlobal::locale()->formatTime(event->dtEnd().time())+" ";
687 691
688 } 692 }
689 text = time + event->summary(); 693 text = time + event->summary();
690 mToolTipText += prefix + text; 694 if ( useToolTips )
695 mToolTipText += prefix + text;
691 } else { 696 } else {
692 if (event->doesFloat()) { 697 if (event->doesFloat()) {
693 text = event->summary(); 698 text = event->summary();
694 mToolTipText += text; 699 if ( useToolTips )
700 mToolTipText += text;
695 } 701 }
696 else { 702 else {
697 text = KGlobal::locale()->formatTime(event->dtStart().time()); 703 text = KGlobal::locale()->formatTime(event->dtStart().time());
698 text += " " + event->summary(); 704 text += " " + event->summary();
699 mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); 705 if ( useToolTips )
706 mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary();
700 } 707 }
701 } 708 }
709 if ( useToolTips && ! event->location().isEmpty() ) {
710 mToolTipText += " (" + event->location() +")";
711 }
702 MonthViewItem *item ; 712 MonthViewItem *item ;
703 713
704 if ( mAvailItemList.count() ) { 714 if ( mAvailItemList.count() ) {
705 item = mAvailItemList.first(); 715 item = mAvailItemList.first();
@@ -763,9 +773,10 @@ int MonthViewCell::insertEvent(Event *event)
763 ++pos; 773 ++pos;
764 } 774 }
765 insertItem( item ,pos); 775 insertItem( item ,pos);
766 } 776 }
767 mToolTip.append( mToolTipText ); 777 if ( useToolTips )
778 mToolTip.append( mToolTipText );
768 return mdayCount; 779 return mdayCount;
769} 780}
770void MonthViewCell::insertTodo(Todo *todo) 781void MonthViewCell::insertTodo(Todo *todo)
771{ 782{
@@ -815,9 +826,11 @@ void MonthViewCell::insertTodo(Todo *todo)
815 item->setRecur( todo->recurrence()->doesRecur() ); 826 item->setRecur( todo->recurrence()->doesRecur() );
816 item->setAlarm( todo->isAlarmEnabled() ); 827 item->setAlarm( todo->isAlarmEnabled() );
817 item->setMoreInfo( todo->description().length() > 0 ); 828 item->setMoreInfo( todo->description().length() > 0 );
818 insertItem( item , count()); 829 insertItem( item , count());
830#ifdef DESKTOP_VERSION
819 mToolTip.append( text ); 831 mToolTip.append( text );
832#endif
820} 833}
821void MonthViewCell::repaintfinishUpdateCell() 834void MonthViewCell::repaintfinishUpdateCell()
822{ 835{
823 MonthViewItem *mitem = (MonthViewItem*) firstItem (); 836 MonthViewItem *mitem = (MonthViewItem*) firstItem ();