From kde-commits Fri Sep 03 21:15:50 2004 From: Till Adam Date: Fri, 03 Sep 2004 21:15:50 +0000 To: kde-commits Subject: KDE_3_3_BRANCH: kdepim/kmail Message-Id: <20040903211550.137CD1D91 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=109424615608950 CVS commit by tilladam: Give the user an informational message explaining the interesting effects of changing a folder to contain groupware data if hiding of groupware folders is configured. M +23 -2 kmfolderdia.cpp 1.161.2.1 M +1 -0 kmfolderdia.h 1.46.2.1 --- kdepim/kmail/kmfolderdia.cpp #1.161:1.161.2.1 @@ -47,4 +47,5 @@ #include "kmailicalifaceimpl.h" #include "kmmainwidget.h" +#include "globalsettings.h" #include @@ -436,4 +437,6 @@ KMail::FolderDiaGeneralTab::FolderDiaGen if ( mDlg->folder() ) mContentsComboBox->setCurrentItem( mDlg->folder()->storage()->contentsType() ); + connect ( mContentsComboBox, SIGNAL ( activated( int ) ), + this, SLOT( slotFolderContentsSelectionChanged( int ) ) ); } else mContentsComboBox = 0; @@ -635,4 +638,19 @@ void FolderDiaGeneralTab::slotUpdateItem //----------------------------------------------------------------------------- +void FolderDiaGeneralTab::slotFolderContentsSelectionChanged( int ) +{ + KMail::FolderContentsType type = + static_cast( mContentsComboBox->currentItem() ); + if( type != KMail::ContentsTypeMail && GlobalSettings::hideGroupwareFolders() ) { + QString message = i18n("You have configured this folder to contain groupware information " + "and the general configuration option to hide groupware folders is " + "set. That means that this folder will dissapear once the configuration " + "dialog is closed. If you want to remove the folder again, you will need " + "to temporarily disable hiding of groupware folders to be able to see it."); + KMessageBox::information( this, message ); + } +} + +//----------------------------------------------------------------------------- bool FolderDiaGeneralTab::save() { @@ -769,6 +787,9 @@ bool FolderDiaGeneralTab::save() // Set type field - if ( mContentsComboBox ) - folder->storage()->setContentsType( static_cast( mContentsComboBox->currentItem() ) ); + if ( mContentsComboBox ) { + KMail::FolderContentsType type = + static_cast( mContentsComboBox->currentItem() ); + folder->storage()->setContentsType( type ); + } folder->setIgnoreNewMail( mIgnoreNewMailCheckBox->isChecked() ); --- kdepim/kmail/kmfolderdia.h #1.46:1.46.2.1 @@ -131,4 +131,5 @@ private slots: void slotUpdateItems( int ); void slotFolderNameChanged( const QString& ); + void slotFolderContentsSelectionChanged( int ); private: