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.

svn path=/branches/KDE_3_3_BRANCH/kdepim/; revision=343821
wilder-work
Till Adam 22 years ago
parent f347b74993
commit 94dc5416a7
  1. 25
      kmfolderdia.cpp
  2. 1
      kmfolderdia.h

@ -46,6 +46,7 @@
#include "folderdiaacltab.h"
#include "kmailicalifaceimpl.h"
#include "kmmainwidget.h"
#include "globalsettings.h"
#include <keditlistbox.h>
#include <klineedit.h>
@ -435,6 +436,8 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
mContentsComboBox->insertItem( i18n( "Journal" ) );
if ( mDlg->folder() )
mContentsComboBox->setCurrentItem( mDlg->folder()->storage()->contentsType() );
connect ( mContentsComboBox, SIGNAL ( activated( int ) ),
this, SLOT( slotFolderContentsSelectionChanged( int ) ) );
} else
mContentsComboBox = 0;
@ -633,6 +636,21 @@ void FolderDiaGeneralTab::slotUpdateItems ( int current )
}
}
//-----------------------------------------------------------------------------
void FolderDiaGeneralTab::slotFolderContentsSelectionChanged( int )
{
KMail::FolderContentsType type =
static_cast<KMail::FolderContentsType>( 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()
{
@ -768,8 +786,11 @@ bool FolderDiaGeneralTab::save()
folder->setUserWhoField(QString::null);
// Set type field
if ( mContentsComboBox )
folder->storage()->setContentsType( static_cast<KMail::FolderContentsType>( mContentsComboBox->currentItem() ) );
if ( mContentsComboBox ) {
KMail::FolderContentsType type =
static_cast<KMail::FolderContentsType>( mContentsComboBox->currentItem() );
folder->storage()->setContentsType( type );
}
folder->setIgnoreNewMail( mIgnoreNewMailCheckBox->isChecked() );
kmkernel->folderMgr()->contentsChanged();

@ -130,6 +130,7 @@ private slots:
*/
void slotUpdateItems( int );
void slotFolderNameChanged( const QString& );
void slotFolderContentsSelectionChanged( int );
private:
void initializeWithValuesFromFolder( KMFolder* folder );

Loading…
Cancel
Save