Skip to content

Commit ede54d6

Browse files
committed
Added confirmation when you reinstall or delete plugins
1 parent 0f86f1a commit ede54d6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

dialogs/plugins/PluginsDlg.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,13 @@ int nItem,
408408

409409
if (pit != m_pDoc->m_PluginList.end ())
410410
{
411+
CString strPluginID = p->m_strID;
412+
CString strPluginName = p->m_strName;
411413
m_pDoc->m_PluginList.erase (pit); // remove from list
412414
delete p; // delete the plugin
413415
bChanged = true;
416+
m_pDoc->Note (TFormat ("Deleted plugin %s (%s)",
417+
(LPCTSTR) strPluginName, (LPCTSTR) strPluginID));
414418
}
415419
else
416420
::TMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION);
@@ -485,7 +489,10 @@ for (int nItem = -1;
485489

486490
if (pit != m_pDoc->m_PluginList.end ())
487491
{
488-
CString strName = p->m_strSource;
492+
CString strName = p->m_strSource;
493+
CString strPluginID = p->m_strID;
494+
CString strPluginName = p->m_strName;
495+
489496
m_pDoc->m_PluginList.erase (pit); // remove from list
490497
delete p; // delete the plugin
491498

@@ -496,6 +503,9 @@ for (int nItem = -1;
496503
// now reload it
497504
m_pDoc->InternalLoadPlugin (strName);
498505

506+
m_pDoc->Note (TFormat ("Reinstalled plugin %s (%s)",
507+
(LPCTSTR) strPluginName, (LPCTSTR) strPluginID));
508+
499509

500510
} // end of try block
501511

0 commit comments

Comments
 (0)