From f347b74993c79ce885304fc15b995ed25ff0f072 Mon Sep 17 00:00:00 2001 From: Andreas Gungl Date: Fri, 3 Sep 2004 20:33:32 +0000 Subject: [PATCH] After fixing the crash in the anti-spam wizard, there was a problem in deciding which filters should be plugged into the toolbar. As changing the filter dialog is impossible because of the string freeze, the first approach was to plug all shortcut filters into menu and toolbar. Ingo suggested to plug only those shortcut filters into the toolbar which have a non-default icon. So the user can control the pluging even with the current dialog. svn path=/branches/KDE_3_3_BRANCH/kdepim/; revision=343817 --- kmfilter.cpp | 2 ++ kmmainwidget.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kmfilter.cpp b/kmfilter.cpp index a9715a1ce..f6a2aeeaa 100644 --- a/kmfilter.cpp +++ b/kmfilter.cpp @@ -36,6 +36,7 @@ KMFilter::KMFilter( KConfig* aConfig, bool popFilter ) bApplyOnExplicit = true; bStopProcessingHere = true; bConfigureShortcut = false; + bConfigureToolbar = false; } } @@ -57,6 +58,7 @@ KMFilter::KMFilter( const KMFilter & aFilter ) bApplyOnExplicit = aFilter.applyOnExplicit(); bStopProcessingHere = aFilter.stopProcessingHere(); bConfigureShortcut = aFilter.configureShortcut(); + bConfigureToolbar = aFilter.configureToolbar(); mIcon = aFilter.icon(); QPtrListIterator it( aFilter.mActions ); diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index dc651de6b..7b7230a1f 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -3297,8 +3297,10 @@ void KMMainWidget::initializeFilterActions() // FIXME // uncomment the next if statement after the filter dialog supports // separate activation of filters for the toolbar - currently - // we better use the coupled way + // we better depend on whether an icon is defined, so the current + // IF statement is intermediate // if ( (*it)->configureToolbar() ) + if ( !(*it)->icon().isEmpty() ) mFilterTBarActions.append(filterAction); } }