-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 91 |
1 files changed, 56 insertions, 35 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 93538ec..d3797ae 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -176,7 +176,8 @@ void KDEPIMConfigWidget::setupStoreTab() | |||
176 | topLayout->addWidget( (QWidget* )holidayColor->button()); | 176 | topLayout->addWidget( (QWidget* )holidayColor->button()); |
177 | 177 | ||
178 | 178 | ||
179 | QVBox *storePage = new QVBox( this ); | 179 | QVBox *storePage = new QVBox( this ); |
180 | if ( QApplication::desktop()->height() > 240 ) | ||
180 | new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); | 181 | new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); |
181 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); | 182 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); |
182 | mStoreUrl = new KURLRequester( storePage ); | 183 | mStoreUrl = new KURLRequester( storePage ); |
@@ -290,32 +291,35 @@ void KDEPIMConfigWidget::setupExternalAppTab() | |||
290 | mParameters = new QLineEdit(mExternalAppGroupBox); | 291 | mParameters = new QLineEdit(mExternalAppGroupBox); |
291 | mParameters->setReadOnly(true); | 292 | mParameters->setReadOnly(true); |
292 | boxLayout->addWidget( mParameters, 4, 1 ); | 293 | boxLayout->addWidget( mParameters, 4, 1 ); |
293 | 294 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | |
294 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | 295 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); |
295 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); | 296 | |
296 | 297 | ||
297 | 298 | if ( QApplication::desktop()->height() > 240 ) { | |
298 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); | 299 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); |
299 | boxLayout->addWidget( lab, 6, 0 ); | 300 | boxLayout->addWidget( lab, 6, 0 ); |
300 | mMessage2 = new QLineEdit(mExternalAppGroupBox); | 301 | mMessage2 = new QLineEdit(mExternalAppGroupBox); |
301 | mMessage2->setReadOnly(true); | 302 | mMessage2->setReadOnly(true); |
302 | boxLayout->addWidget( mMessage2 , 7, 0); | 303 | boxLayout->addWidget( mMessage2 , 7, 0); |
303 | 304 | ||
304 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); | 305 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); |
305 | boxLayout->addWidget( lab, 6, 1 ); | 306 | boxLayout->addWidget( lab, 6, 1 ); |
306 | mParameters2 = new QLineEdit(mExternalAppGroupBox); | 307 | mParameters2 = new QLineEdit(mExternalAppGroupBox); |
307 | mParameters2->setReadOnly(true); | 308 | mParameters2->setReadOnly(true); |
308 | boxLayout->addWidget( mParameters2, 7, 1 ); | 309 | boxLayout->addWidget( mParameters2, 7, 1 ); |
309 | 310 | ||
310 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); | 311 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); |
311 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); | 312 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); |
312 | 313 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | |
314 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | ||
315 | } else { | ||
316 | mMessage2 = 0; | ||
317 | mParameters2 = 0; | ||
318 | } | ||
313 | 319 | ||
314 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 320 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
315 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 321 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
316 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 322 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
317 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | ||
318 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | ||
319 | 323 | ||
320 | 324 | ||
321 | layout->addWidget( mExternalAppGroupBox ); | 325 | layout->addWidget( mExternalAppGroupBox ); |
@@ -374,12 +378,15 @@ void KDEPIMConfigWidget::setupLocaleDateTab() | |||
374 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 378 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
375 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 379 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
376 | ++iii; | 380 | ++iii; |
377 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 381 | //qDebug(" QApplication::desktop()->height()xx %d ", QApplication::desktop()->height() ); |
378 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 382 | if ( QApplication::desktop()->height() > 240 ) { |
379 | ++iii; | 383 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
380 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 384 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
381 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 385 | ++iii; |
382 | ++iii; | 386 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
387 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | ||
388 | ++iii; | ||
389 | } | ||
383 | 390 | ||
384 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 391 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
385 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 392 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
@@ -628,8 +635,10 @@ void KDEPIMConfigWidget::saveEditFieldSettings() | |||
628 | mEmailOtherChannel = mChannel->text(); | 635 | mEmailOtherChannel = mChannel->text(); |
629 | mEmailOtherMessage = mMessage->text(); | 636 | mEmailOtherMessage = mMessage->text(); |
630 | mEmailOtherMessageParameters = mParameters->text(); | 637 | mEmailOtherMessageParameters = mParameters->text(); |
631 | mEmailOtherMessage2 = mMessage2->text(); | 638 | if ( mMessage2 ) |
632 | mEmailOtherMessageParameters2 = mParameters2->text(); | 639 | mEmailOtherMessage2 = mMessage2->text(); |
640 | if ( mParameters2 ) | ||
641 | mEmailOtherMessageParameters2 = mParameters2->text(); | ||
633 | } | 642 | } |
634 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 643 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
635 | { | 644 | { |
@@ -693,8 +702,10 @@ void KDEPIMConfigWidget::updateClientWidgets() | |||
693 | //Otherwise take the default data from externalapphandler. | 702 | //Otherwise take the default data from externalapphandler. |
694 | mChannel->setText(dai->_channel); | 703 | mChannel->setText(dai->_channel); |
695 | mMessage->setText(dai->_message); | 704 | mMessage->setText(dai->_message); |
696 | mParameters->setText(dai->_parameters); | 705 | mParameters->setText(dai->_parameters); |
697 | mMessage2->setText(dai->_message2); | 706 | if ( mMessage2 ) |
707 | mMessage2->setText(dai->_message2); | ||
708 | if ( mParameters2 ) | ||
698 | mParameters2->setText(dai->_parameters2); | 709 | mParameters2->setText(dai->_parameters2); |
699 | 710 | ||
700 | 711 | ||
@@ -702,8 +713,10 @@ void KDEPIMConfigWidget::updateClientWidgets() | |||
702 | { | 713 | { |
703 | mChannel->setText(mEmailOtherChannel); | 714 | mChannel->setText(mEmailOtherChannel); |
704 | mMessage->setText(mEmailOtherMessage); | 715 | mMessage->setText(mEmailOtherMessage); |
705 | mParameters->setText(mEmailOtherMessageParameters); | 716 | mParameters->setText(mEmailOtherMessageParameters); |
717 | if ( mMessage2 ) | ||
706 | mMessage2->setText(mEmailOtherMessage2); | 718 | mMessage2->setText(mEmailOtherMessage2); |
719 | if ( mParameters2 ) | ||
707 | mParameters2->setText(mEmailOtherMessageParameters2); | 720 | mParameters2->setText(mEmailOtherMessageParameters2); |
708 | } | 721 | } |
709 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 722 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
@@ -773,14 +786,18 @@ void KDEPIMConfigWidget::updateClientWidgets() | |||
773 | 786 | ||
774 | mChannel->setReadOnly(readonly); | 787 | mChannel->setReadOnly(readonly); |
775 | mMessage->setReadOnly(readonly); | 788 | mMessage->setReadOnly(readonly); |
776 | mParameters->setReadOnly(readonly); | 789 | mParameters->setReadOnly(readonly); |
790 | if ( mMessage2 ) | ||
777 | mMessage2->setReadOnly(readonly); | 791 | mMessage2->setReadOnly(readonly); |
792 | if ( mParameters2 ) | ||
778 | mParameters2->setReadOnly(readonly); | 793 | mParameters2->setReadOnly(readonly); |
779 | 794 | ||
780 | mChannel->setEnabled(enabled); | 795 | mChannel->setEnabled(enabled); |
781 | mMessage->setEnabled(enabled); | 796 | mMessage->setEnabled(enabled); |
782 | mParameters->setEnabled(enabled); | 797 | mParameters->setEnabled(enabled); |
798 | if ( mMessage2 ) | ||
783 | mMessage2->setEnabled(enabled); | 799 | mMessage2->setEnabled(enabled); |
800 | if ( mParameters2 ) | ||
784 | mParameters2->setEnabled(enabled); | 801 | mParameters2->setEnabled(enabled); |
785 | 802 | ||
786 | 803 | ||
@@ -794,12 +811,16 @@ void KDEPIMConfigWidget::updateClientWidgets() | |||
794 | } | 811 | } |
795 | else | 812 | else |
796 | { | 813 | { |
814 | if ( mMessage2 ) | ||
797 | mMessage2->setText( "" ); | 815 | mMessage2->setText( "" ); |
816 | if ( mParameters2 ) | ||
798 | mParameters2->setText( "" ); | 817 | mParameters2->setText( "" ); |
799 | } | 818 | } |
800 | 819 | ||
801 | if (enabled == true) { | 820 | if (enabled == true) { |
821 | if ( mMessage2 ) | ||
802 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 822 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
823 | if ( mParameters2 ) | ||
803 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 824 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
804 | } | 825 | } |
805 | 826 | ||