-rw-r--r-- | kabc/addresseeview.cpp | 1 | ||||
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index af149a0..0564e85 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -85,49 +85,48 @@ void AddresseeView::setSource(const QString& n) | |||
85 | else if ( n.left( 5 ) == "sipto" ) | 85 | else if ( n.left( 5 ) == "sipto" ) |
86 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); | 86 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); |
87 | 87 | ||
88 | } | 88 | } |
89 | void AddresseeView::setAddressee( const KABC::Addressee& addr ) | 89 | void AddresseeView::setAddressee( const KABC::Addressee& addr ) |
90 | { | 90 | { |
91 | ExternalAppHandler* eah = ExternalAppHandler::instance(); | 91 | ExternalAppHandler* eah = ExternalAppHandler::instance(); |
92 | bool kemailAvail = eah->isEmailAppAvailable(); | 92 | bool kemailAvail = eah->isEmailAppAvailable(); |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
96 | mAddressee = addr; | 96 | mAddressee = addr; |
97 | // clear view | 97 | // clear view |
98 | setText( QString::null ); | 98 | setText( QString::null ); |
99 | 99 | ||
100 | if ( mAddressee.isEmpty() ) | 100 | if ( mAddressee.isEmpty() ) |
101 | return; | 101 | return; |
102 | 102 | ||
103 | QString name = ( mAddressee.assembledName().isEmpty() ? | 103 | QString name = ( mAddressee.assembledName().isEmpty() ? |
104 | mAddressee.formattedName() : mAddressee.assembledName() ); | 104 | mAddressee.formattedName() : mAddressee.assembledName() ); |
105 | 105 | ||
106 | QString dynamicPart; | 106 | QString dynamicPart; |
107 | 107 | ||
108 | dynamicPart += getPhoneNumbers( true ); | 108 | dynamicPart += getPhoneNumbers( true ); |
109 | qDebug("dynamic preferred %s ",dynamicPart.latin1() ); | ||
110 | QStringList emails = mAddressee.emails(); | 109 | QStringList emails = mAddressee.emails(); |
111 | QStringList::ConstIterator emailIt; | 110 | QStringList::ConstIterator emailIt; |
112 | QString type = i18n( "Email" ); | 111 | QString type = i18n( "Email" ); |
113 | emailIt = emails.begin(); | 112 | emailIt = emails.begin(); |
114 | if ( emailIt != emails.end() ) { | 113 | if ( emailIt != emails.end() ) { |
115 | if ( kemailAvail ) { | 114 | if ( kemailAvail ) { |
116 | dynamicPart += QString( | 115 | dynamicPart += QString( |
117 | "<tr><td align=\"right\"><b>%1</b></td>" | 116 | "<tr><td align=\"right\"><b>%1</b></td>" |
118 | "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) | 117 | "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) |
119 | .arg( type ) | 118 | .arg( type ) |
120 | .arg( name ) | 119 | .arg( name ) |
121 | .arg( *emailIt ) | 120 | .arg( *emailIt ) |
122 | .arg( *emailIt ); | 121 | .arg( *emailIt ); |
123 | ++emailIt; | 122 | ++emailIt; |
124 | } else { | 123 | } else { |
125 | dynamicPart += QString( | 124 | dynamicPart += QString( |
126 | "<tr><td align=\"right\"><b>%1</b></td>" | 125 | "<tr><td align=\"right\"><b>%1</b></td>" |
127 | "<td align=\"left\">%2</td></tr>" ) | 126 | "<td align=\"left\">%2</td></tr>" ) |
128 | .arg( type ) | 127 | .arg( type ) |
129 | .arg( *emailIt ); | 128 | .arg( *emailIt ); |
130 | ++emailIt; | 129 | ++emailIt; |
131 | } | 130 | } |
132 | } | 131 | } |
133 | if ( mAddressee.birthday().date().isValid() ) { | 132 | if ( mAddressee.birthday().date().isValid() ) { |
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 50b6b6d..4db0a20 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp | |||
@@ -279,49 +279,49 @@ void AddresseeEditorWidget::setupTab1() | |||
279 | layout->addMultiCellWidget( label, 8, 9, 3, 3 ); | 279 | layout->addMultiCellWidget( label, 8, 9, 3, 3 ); |
280 | 280 | ||
281 | label = new QLabel( i18n( "URL:" ), tab1 ); | 281 | label = new QLabel( i18n( "URL:" ), tab1 ); |
282 | mURLEdit = new KLineEdit( tab1 ); | 282 | mURLEdit = new KLineEdit( tab1 ); |
283 | connect( mURLEdit, SIGNAL( textChanged( const QString& ) ), | 283 | connect( mURLEdit, SIGNAL( textChanged( const QString& ) ), |
284 | SLOT( textChanged( const QString& ) ) ); | 284 | SLOT( textChanged( const QString& ) ) ); |
285 | label->setBuddy( mURLEdit ); | 285 | label->setBuddy( mURLEdit ); |
286 | layout->addWidget( label, 8, 4 ); | 286 | layout->addWidget( label, 8, 4 ); |
287 | layout->addMultiCellWidget( mURLEdit, 8, 8, 5, 6 ); | 287 | layout->addMultiCellWidget( mURLEdit, 8, 8, 5, 6 ); |
288 | 288 | ||
289 | label = new QLabel( i18n( "&IM address:" ), tab1 ); | 289 | label = new QLabel( i18n( "&IM address:" ), tab1 ); |
290 | mIMAddressEdit = new KLineEdit( tab1 ); | 290 | mIMAddressEdit = new KLineEdit( tab1 ); |
291 | connect( mIMAddressEdit, SIGNAL( textChanged( const QString& ) ), | 291 | connect( mIMAddressEdit, SIGNAL( textChanged( const QString& ) ), |
292 | SLOT( textChanged( const QString& ) ) ); | 292 | SLOT( textChanged( const QString& ) ) ); |
293 | label->setBuddy( mIMAddressEdit ); | 293 | label->setBuddy( mIMAddressEdit ); |
294 | layout->addWidget( label, 9, 4 ); | 294 | layout->addWidget( label, 9, 4 ); |
295 | layout->addMultiCellWidget( mIMAddressEdit, 9, 9, 5, 6 ); | 295 | layout->addMultiCellWidget( mIMAddressEdit, 9, 9, 5, 6 ); |
296 | 296 | ||
297 | layout->addColSpacing( 6, 50 ); | 297 | layout->addColSpacing( 6, 50 ); |
298 | 298 | ||
299 | bar = new KSeparator( KSeparator::HLine, tab1 ); | 299 | bar = new KSeparator( KSeparator::HLine, tab1 ); |
300 | layout->addMultiCellWidget( bar, 10, 10, 0, 6 ); | 300 | layout->addMultiCellWidget( bar, 10, 10, 0, 6 ); |
301 | */ | 301 | */ |
302 | /////////////////////////////////////// | 302 | /////////////////////////////////////// |
303 | QHBox *categoryBox = new QHBox( tab1 ); | 303 | QHBox *categoryBox = new QHBox( tab1 ,"cato"); |
304 | categoryBox->setSpacing( KDialogBase::spacingHint() ); | 304 | categoryBox->setSpacing( KDialogBase::spacingHint() ); |
305 | categoryBox->setMargin( KDialogBase::marginHintSmall() ); | 305 | categoryBox->setMargin( KDialogBase::marginHintSmall() ); |
306 | 306 | ||
307 | // Categories | 307 | // Categories |
308 | button = new QPushButton( i18n( "Categories" ), categoryBox ); | 308 | button = new QPushButton( i18n( "Categories" ), categoryBox ); |
309 | connect( button, SIGNAL( clicked() ), SLOT( categoryButtonClicked() ) ); | 309 | connect( button, SIGNAL( clicked() ), SLOT( categoryButtonClicked() ) ); |
310 | 310 | ||
311 | mCategoryEdit = new KLineEdit( categoryBox ); | 311 | mCategoryEdit = new KLineEdit( categoryBox ); |
312 | mCategoryEdit->setReadOnly( true ); | 312 | mCategoryEdit->setReadOnly( true ); |
313 | connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ), | 313 | connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ), |
314 | SLOT( textChanged( const QString& ) ) ); | 314 | SLOT( textChanged( const QString& ) ) ); |
315 | 315 | ||
316 | mSecrecyWidget = new SecrecyWidget( categoryBox ); | 316 | mSecrecyWidget = new SecrecyWidget( categoryBox ); |
317 | connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); | 317 | connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); |
318 | 318 | ||
319 | //US layout->addMultiCellWidget( categoryBox, 11, 11, 0, 6 ); | 319 | //US layout->addMultiCellWidget( categoryBox, 11, 11, 0, 6 ); |
320 | layout->addMultiCellWidget( categoryBox, iii, iii, 0, 1 ); | 320 | layout->addMultiCellWidget( categoryBox, iii, iii, 0, 1 ); |
321 | 321 | ||
322 | // Build the layout and add to the tab widget | 322 | // Build the layout and add to the tab widget |
323 | layout->activate(); // required | 323 | layout->activate(); // required |
324 | 324 | ||
325 | mTabWidget->addTab( tab1, i18n( "&General" ) ); | 325 | mTabWidget->addTab( tab1, i18n( "&General" ) ); |
326 | } | 326 | } |
327 | 327 | ||
@@ -593,106 +593,101 @@ void AddresseeEditorWidget::setupTab2() | |||
593 | label->setBuddy( mAssistantEdit ); | 593 | label->setBuddy( mAssistantEdit ); |
594 | //US layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 ); | 594 | //US layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 ); |
595 | layout->addWidget( mAssistantEdit, 4, 2 ); | 595 | layout->addWidget( mAssistantEdit, 4, 2 ); |
596 | 596 | ||
597 | bar = new KSeparator( KSeparator::HLine, tab2 ); | 597 | bar = new KSeparator( KSeparator::HLine, tab2 ); |
598 | //US layout->addMultiCellWidget( bar, 3, 3, 0, 5 ); | 598 | //US layout->addMultiCellWidget( bar, 3, 3, 0, 5 ); |
599 | layout->addMultiCellWidget( bar, 5, 5, 0, 2 ); | 599 | layout->addMultiCellWidget( bar, 5, 5, 0, 2 ); |
600 | 600 | ||
601 | ///////////////////////////////////////////////// | 601 | ///////////////////////////////////////////////// |
602 | // Personal info | 602 | // Personal info |
603 | 603 | ||
604 | //label = new QLabel( tab2 ); | 604 | //label = new QLabel( tab2 ); |
605 | //US loadIcon call is ambiguous. Add one more parameter | 605 | //US loadIcon call is ambiguous. Add one more parameter |
606 | //US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) ); | 606 | //US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) ); |
607 | //label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) ); | 607 | //label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) ); |
608 | //US layout->addMultiCellWidget( label, 4, 5, 0, 0 ); | 608 | //US layout->addMultiCellWidget( label, 4, 5, 0, 0 ); |
609 | //layout->addMultiCellWidget( label, 6, 7, 0, 0 ); | 609 | //layout->addMultiCellWidget( label, 6, 7, 0, 0 ); |
610 | 610 | ||
611 | 611 | ||
612 | int iii = 6; | 612 | int iii = 6; |
613 | 613 | ||
614 | if ( QApplication::desktop()->width() == 640 ) { | 614 | if ( QApplication::desktop()->width() == 640 ) { |
615 | QHBox * nbox = new QHBox ( tab2 ); | 615 | QHBox * nbox = new QHBox ( tab2 ); |
616 | label = new QLabel( i18n( "Nick name:" )+" ", nbox ); | 616 | label = new QLabel( i18n( "Nick name:" )+" ", nbox ); |
617 | layout->addWidget( label, iii, 1 ); | ||
618 | mNicknameEdit = new KLineEdit( nbox ); | 617 | mNicknameEdit = new KLineEdit( nbox ); |
619 | connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), | 618 | connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), |
620 | SLOT( textChanged( const QString& ) ) ); | 619 | SLOT( textChanged( const QString& ) ) ); |
621 | label->setBuddy( mNicknameEdit ); | 620 | label->setBuddy( mNicknameEdit ); |
622 | 621 | ||
623 | label = new QLabel( " "+i18n( "Spouse's name:" )+" ", nbox ); | 622 | label = new QLabel( " "+i18n( "Spouse's name:" )+" ", nbox ); |
624 | layout->addWidget( label, iii, 1 ); | ||
625 | mSpouseEdit = new KLineEdit( nbox ); | 623 | mSpouseEdit = new KLineEdit( nbox ); |
626 | connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), | 624 | connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), |
627 | SLOT( textChanged( const QString& ) ) ); | 625 | SLOT( textChanged( const QString& ) ) ); |
628 | label->setBuddy( mSpouseEdit ); | 626 | label->setBuddy( mSpouseEdit ); |
629 | layout->addWidget( mSpouseEdit, iii, 2 ); | ||
630 | layout->addMultiCellWidget( nbox, iii, iii, 1, 2 ); | 627 | layout->addMultiCellWidget( nbox, iii, iii, 1, 2 ); |
631 | ++iii; | 628 | ++iii; |
632 | 629 | ||
633 | } else { | 630 | } else { |
634 | label = new QLabel( i18n( "Nick name:" ), tab2 ); | 631 | label = new QLabel( i18n( "Nick name:" ), tab2 ); |
635 | layout->addWidget( label, iii, 1 ); | 632 | layout->addWidget( label, iii, 1 ); |
636 | mNicknameEdit = new KLineEdit( tab2 ); | 633 | mNicknameEdit = new KLineEdit( tab2 ); |
637 | connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), | 634 | connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), |
638 | SLOT( textChanged( const QString& ) ) ); | 635 | SLOT( textChanged( const QString& ) ) ); |
639 | label->setBuddy( mNicknameEdit ); | 636 | label->setBuddy( mNicknameEdit ); |
640 | layout->addWidget( mNicknameEdit, iii, 2 ); | 637 | layout->addWidget( mNicknameEdit, iii, 2 ); |
641 | ++iii; | 638 | ++iii; |
642 | 639 | ||
643 | label = new QLabel( i18n( "Spouse's name:" ), tab2 ); | 640 | label = new QLabel( i18n( "Spouse's name:" ), tab2 ); |
644 | layout->addWidget( label, iii, 1 ); | 641 | layout->addWidget( label, iii, 1 ); |
645 | mSpouseEdit = new KLineEdit( tab2 ); | 642 | mSpouseEdit = new KLineEdit( tab2 ); |
646 | connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), | 643 | connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), |
647 | SLOT( textChanged( const QString& ) ) ); | 644 | SLOT( textChanged( const QString& ) ) ); |
648 | label->setBuddy( mSpouseEdit ); | 645 | label->setBuddy( mSpouseEdit ); |
649 | layout->addWidget( mSpouseEdit, iii, 2 ); | 646 | layout->addWidget( mSpouseEdit, iii, 2 ); |
650 | ++iii; | 647 | ++iii; |
651 | } | 648 | } |
652 | 649 | ||
653 | label = new QLabel( i18n( "Children's names:" ), tab2 ); | 650 | label = new QLabel( i18n( "Children's names:" ), tab2 ); |
654 | layout->addWidget( label, iii, 1 ); | 651 | layout->addWidget( label, iii, 1 ); |
655 | mChildEdit = new KLineEdit( tab2 ); | 652 | mChildEdit = new KLineEdit( tab2 ); |
656 | connect( mChildEdit, SIGNAL( textChanged( const QString& ) ), | 653 | connect( mChildEdit, SIGNAL( textChanged( const QString& ) ), |
657 | SLOT( textChanged( const QString& ) ) ); | 654 | SLOT( textChanged( const QString& ) ) ); |
658 | label->setBuddy( mChildEdit ); | 655 | label->setBuddy( mChildEdit ); |
659 | layout->addWidget( mChildEdit, iii, 2 ); | 656 | layout->addWidget( mChildEdit, iii, 2 ); |
660 | ++iii; | 657 | ++iii; |
661 | if ( QApplication::desktop()->width() == 640 ) { | 658 | if ( QApplication::desktop()->width() == 640 ) { |
662 | QHBox * nbox = new QHBox ( tab2 ); | 659 | QHBox * nbox = new QHBox ( tab2 ); |
663 | label = new QLabel( i18n( "Birthday:" )+" ", nbox ); | 660 | label = new QLabel( i18n( "Birthday:" )+" ", nbox ); |
664 | layout->addWidget( label, iii, 1 ); | ||
665 | mBirthdayPicker = new KDateEdit( nbox ); | 661 | mBirthdayPicker = new KDateEdit( nbox ); |
666 | mBirthdayPicker->toggleDateFormat(); | 662 | mBirthdayPicker->toggleDateFormat(); |
667 | mBirthdayPicker->setHandleInvalid( true ); | 663 | mBirthdayPicker->setHandleInvalid( true ); |
668 | connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), | 664 | connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), |
669 | SLOT( dateChanged( QDate ) ) ); | 665 | SLOT( dateChanged( QDate ) ) ); |
670 | 666 | ||
671 | label->setBuddy( mBirthdayPicker ); | 667 | label->setBuddy( mBirthdayPicker ); |
672 | 668 | ||
673 | label = new QLabel( " "+i18n( "Anniversary:" )+" ", nbox ); | 669 | label = new QLabel( " "+i18n( "Anniversary:" )+" ", nbox ); |
674 | layout->addWidget( label, iii, 1 ); | ||
675 | mAnniversaryPicker = new KDateEdit( nbox ); | 670 | mAnniversaryPicker = new KDateEdit( nbox ); |
676 | mAnniversaryPicker->setHandleInvalid( true ); | 671 | mAnniversaryPicker->setHandleInvalid( true ); |
677 | connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ), | 672 | connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ), |
678 | SLOT( dateChanged( QDate ) ) ); | 673 | SLOT( dateChanged( QDate ) ) ); |
679 | 674 | ||
680 | label->setBuddy( mAnniversaryPicker ); | 675 | label->setBuddy( mAnniversaryPicker ); |
681 | layout->addMultiCellWidget( nbox, iii, iii, 1, 2 ); | 676 | layout->addMultiCellWidget( nbox, iii, iii, 1, 2 ); |
682 | ++iii; | 677 | ++iii; |
683 | 678 | ||
684 | } else { | 679 | } else { |
685 | 680 | ||
686 | label = new QLabel( i18n( "Birthday:" ), tab2 ); | 681 | label = new QLabel( i18n( "Birthday:" ), tab2 ); |
687 | layout->addWidget( label, iii, 1 ); | 682 | layout->addWidget( label, iii, 1 ); |
688 | mBirthdayPicker = new KDateEdit( tab2 ); | 683 | mBirthdayPicker = new KDateEdit( tab2 ); |
689 | mBirthdayPicker->toggleDateFormat(); | 684 | mBirthdayPicker->toggleDateFormat(); |
690 | mBirthdayPicker->setHandleInvalid( true ); | 685 | mBirthdayPicker->setHandleInvalid( true ); |
691 | connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), | 686 | connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), |
692 | SLOT( dateChanged( QDate ) ) ); | 687 | SLOT( dateChanged( QDate ) ) ); |
693 | 688 | ||
694 | label->setBuddy( mBirthdayPicker ); | 689 | label->setBuddy( mBirthdayPicker ); |
695 | layout->addWidget( mBirthdayPicker, iii, 2 ); | 690 | layout->addWidget( mBirthdayPicker, iii, 2 ); |
696 | ++iii; | 691 | ++iii; |
697 | 692 | ||
698 | label = new QLabel( i18n( "Anniversary:" ), tab2 ); | 693 | label = new QLabel( i18n( "Anniversary:" ), tab2 ); |