Skip to content

Commit

Permalink
Added confirmation when you enable or disable plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Dec 19, 2010
1 parent ede54d6 commit b5c2a15
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dialogs/plugins/PluginsDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,13 @@ for (int nItem = -1;

CPlugin * p = (CPlugin *) m_ctlPluginList.GetItemData (nItem);

PluginListIterator pit = find (m_pDoc->m_PluginList.begin (),
m_pDoc->m_PluginList.end (),
p);

if (pit == m_pDoc->m_PluginList.end ())
continue;

if (p->m_strDescription.IsEmpty ())
continue; // ignore ones without a description

Expand Down Expand Up @@ -761,6 +768,9 @@ for (int nItem = -1;
m_pDoc->EnablePlugin (p->m_strID, TRUE);
bChanged = true;

m_pDoc->Note (TFormat ("Enabled plugin %s (%s)",
(LPCTSTR) p->m_strName, (LPCTSTR) p->m_strID));

} // end of loop

LoadList ();
Expand Down Expand Up @@ -790,6 +800,8 @@ for (int nItem = -1;
m_pDoc->EnablePlugin (p->m_strID, FALSE);
bChanged = true;

m_pDoc->Note (TFormat ("Disabled plugin %s (%s)",
(LPCTSTR) p->m_strName, (LPCTSTR) p->m_strID));

} // end of loop

Expand Down

0 comments on commit b5c2a15

Please sign in to comment.