Commit 3aad748c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 309891 - Filter buttons and context menu option are not shown

FIXED-IN: 4.9.4
BUG: 309891
parent a1aceabc
......@@ -4235,11 +4235,10 @@ void KMMainWidget::slotShowStartupFolder()
{
connect( MailCommon::FilterManager::instance(), SIGNAL(filtersChanged()),
this, SLOT(initializeFilterActions()) );
// Plug various action lists. This can't be done in the constructor, as that is called before
// the main window or Kontact calls createGUI().
// This function however is called with a single shot timer.
initializeFilterActions();
checkAkonadiServerManagerState();
mFolderShortcutActionManager->createActions();
mTagActionManager->createActions();
messageActions()->setupForwardingActionsList( mGUIClient );
......@@ -4253,6 +4252,26 @@ void KMMainWidget::slotShowStartupFolder()
}
}
void KMMainWidget::checkAkonadiServerManagerState()
{
Akonadi::ServerManager::State state = Akonadi::ServerManager::self()->state();
if(state == Akonadi::ServerManager::Running) {
initializeFilterActions();
} else {
connect( Akonadi::ServerManager::self(), SIGNAL(stateChanged(Akonadi::ServerManager::State)),
SLOT(slotServerStateChanged(Akonadi::ServerManager::State)) );
}
}
void KMMainWidget::slotServerStateChanged(Akonadi::ServerManager::State state)
{
if(state == Akonadi::ServerManager::Running) {
initializeFilterActions();
disconnect( Akonadi::ServerManager::self(), SIGNAL(stateChanged(Akonadi::ServerManager::State)));
}
}
void KMMainWidget::slotShowTip()
{
KTipDialog::showTip( this, QString(), true );
......
......@@ -459,6 +459,7 @@ class KMAIL_EXPORT KMMainWidget : public QWidget
void slotShowNotification();
void slotConfigureAutomaticArchiving();
private:
void checkAkonadiServerManagerState();
void updateHtmlMenuEntry();
void updateMoveAction( const Akonadi::CollectionStatistics& statistic );
......@@ -556,6 +557,7 @@ class KMAIL_EXPORT KMMainWidget : public QWidget
void slotDeletionCollectionResult(KJob* job);
void slotServerSideSubscription();
void slotFetchItemsForFolderDone(KJob*job);
void slotServerStateChanged(Akonadi::ServerManager::State state);
private:
// Message actions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment