Skip to content

Commit b841c57

Browse files
committed
Modified enable/disable message to only show if the plugin state changed
1 parent b5c2a15 commit b841c57

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

dialogs/plugins/PluginsDlg.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,11 +765,14 @@ for (int nItem = -1;
765765
if (pit == m_pDoc->m_PluginList.end ())
766766
continue;
767767

768+
bool bWasEnabled = p->m_bEnabled;
769+
768770
m_pDoc->EnablePlugin (p->m_strID, TRUE);
769771
bChanged = true;
770772

771-
m_pDoc->Note (TFormat ("Enabled plugin %s (%s)",
772-
(LPCTSTR) p->m_strName, (LPCTSTR) p->m_strID));
773+
if (!bWasEnabled)
774+
m_pDoc->Note (TFormat ("Enabled plugin %s (%s)",
775+
(LPCTSTR) p->m_strName, (LPCTSTR) p->m_strID));
773776

774777
} // end of loop
775778

@@ -797,11 +800,14 @@ for (int nItem = -1;
797800
if (pit == m_pDoc->m_PluginList.end ())
798801
continue;
799802

803+
bool bWasEnabled = p->m_bEnabled;
804+
800805
m_pDoc->EnablePlugin (p->m_strID, FALSE);
801806
bChanged = true;
802807

803-
m_pDoc->Note (TFormat ("Disabled plugin %s (%s)",
804-
(LPCTSTR) p->m_strName, (LPCTSTR) p->m_strID));
808+
if (bWasEnabled)
809+
m_pDoc->Note (TFormat ("Disabled plugin %s (%s)",
810+
(LPCTSTR) p->m_strName, (LPCTSTR) p->m_strID));
805811

806812
} // end of loop
807813

0 commit comments

Comments
 (0)