There were problems with changes made in the filter dialog being applied

even when cancel was pressed (or the dialog was closed).

I fixed these but changes still take effect immediately rather than
only when the user selects ok (which saves the changes to the config
file so that they are made permanent)

svn path=/trunk/kdenetwork/kmail/; revision=56104
wilder-work
Don Sanders 26 years ago
parent 753ca6edc5
commit f295ea2dcb
  1. 2
      kmfilteraction.h
  2. 11
      kmfilterdlg.cpp
  3. 3
      kmfilterdlg.h

@ -88,7 +88,7 @@ class KMGFilterDlg: public QDialog
public:
KMGFilterDlg(QWidget* parent=NULL, const char* name=NULL,
bool modal=FALSE, WFlags f=0);
bool modal=FALSE, WFlags f=WDestructiveClose);
virtual ~KMGFilterDlg();
/** Creates a details button "..." for the current filter action. */

@ -626,14 +626,21 @@ void KMFilterDlg::slotBtnOk()
kernel->filterMgr()->writeConfig();
}
accept();
KMFilterDlgInherited::close();
}
//-----------------------------------------------------------------------------
void KMFilterDlg::slotBtnCancel()
{
kernel->filterMgr()->readConfig();
reject();
KMFilterDlgInherited::close();
}
//-----------------------------------------------------------------------------
void KMFilterDlg::closeEvent( QCloseEvent *e )
{
kernel->filterMgr()->readConfig();
KMFilterDlgInherited::closeEvent(e);
}
//-----------------------------------------------------------------------------

@ -84,6 +84,9 @@ protected:
// Update the position of the filter action field widgets
void resizeEvent(QResizeEvent *qre);
// Undo any changes that have been applied
virtual void closeEvent( QCloseEvent * );
KMFilter* mFilter;
QGridLayout *mGrid;
int mGridRow, mCbxHeight, mCbxWidth;

Loading…
Cancel
Save