diff --git a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp index 97853852f..8896ec140 100644 --- a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp +++ b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp @@ -339,15 +339,14 @@ void PluginsAdminDlg::collectNppCurrentStatusInfos() bool PluginsAdminDlg::installPlugins() { - /* - vector indexes = _availableListView.getCheckedIndexes(); + vector indexes = _availableList.getCheckedIndexes(); NppParameters *pNppParameters = NppParameters::getInstance(); generic_string updaterDir = pNppParameters->getNppPath(); updaterDir += TEXT("\\updater\\"); generic_string updaterFullPath = updaterDir + TEXT("gup.exe"); - generic_string updaterParams = TEXT("-unzipTo -clean "); + generic_string updaterParams = TEXT("-unzipTo "); for (auto i : indexes) { @@ -355,56 +354,54 @@ bool PluginsAdminDlg::installPlugins() // add folder to operate generic_string destFolder = pNppParameters->getAppDataNppDir(); - PathAppend(destFolder, _availablePluginList[i]._name); + PathAppend(destFolder, _availableList.getPluginInfoFromIndex(i)->_folderName); updaterParams += destFolder; // add zipFile's url updaterParams += TEXT(" "); - updaterParams += _availablePluginList[i]._repository; + updaterParams += _availableList.getPluginInfoFromIndex(i)->_repository; Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str()); updater.run(); } - */ + return true; } bool PluginsAdminDlg::updatePlugins() { - /* - vector indexes = _updateListView.getCheckedIndexes(); + vector indexes = _updateList.getCheckedIndexes(); NppParameters *pNppParameters = NppParameters::getInstance(); generic_string updaterDir = pNppParameters->getNppPath(); updaterDir += TEXT("\\updater\\"); generic_string updaterFullPath = updaterDir + TEXT("gup.exe"); - generic_string updaterParams = TEXT("-unzipTo -clean "); + generic_string updaterParams = TEXT("-unzipTo "); for (auto i : indexes) { // add folder to operate generic_string destFolder = pNppParameters->getAppDataNppDir(); - PathAppend(destFolder, _availablePluginList[i]._name); + PathAppend(destFolder, _availableList.getPluginInfoFromIndex(i)->_folderName); updaterParams += destFolder; // add zipFile's url updaterParams += TEXT(" "); - updaterParams += _availablePluginList[i]._repository; + updaterParams += _availableList.getPluginInfoFromIndex(i)->_repository; Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str()); updater.run(); } - */ + return true; } bool PluginsAdminDlg::removePlugins() { - /* - vector indexes = _installedListView.getCheckedIndexes(); + vector indexes = _installedList.getCheckedIndexes(); NppParameters *pNppParameters = NppParameters::getInstance(); generic_string updaterDir = pNppParameters->getNppPath(); @@ -419,14 +416,14 @@ bool PluginsAdminDlg::removePlugins() // add folder to operate generic_string destFolder = pNppParameters->getAppDataNppDir(); - PathAppend(destFolder, _availablePluginList[i]._name); + PathAppend(destFolder, _availableList.getPluginInfoFromIndex(i)->_folderName); updaterParams += destFolder; Process updater(updaterFullPath.c_str(), updaterParams.c_str(), updaterDir.c_str()); updater.run(); } - */ + return true; }