mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 13:35:02 +00:00
eclipse plugin: Remove existing paths from an install...
...when we remove it
This commit is contained in:
parent
cf286d7c2f
commit
385536a891
@ -18,6 +18,7 @@ import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.jface.preference.DirectoryFieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditor;
|
||||
import org.eclipse.jface.preference.FileFieldEditor;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.preference.StringFieldEditor;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
import org.eclipse.jface.viewers.ArrayContentProvider;
|
||||
@ -306,6 +307,14 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
||||
installs_.remove( install.Name );
|
||||
installsTableViewer_.refresh();
|
||||
|
||||
// unset all settings.
|
||||
IPreferenceStore prefs = Preferences.getPreferences( );
|
||||
String installPrefix = Preferences.getInstallPrefix( install.Name );
|
||||
prefs.setToDefault( installPrefix + Constants.P_WESNOTH_EXEC_PATH );
|
||||
prefs.setToDefault( installPrefix + Constants.P_WESNOTH_USER_DIR );
|
||||
prefs.setToDefault( installPrefix + Constants.P_WESNOTH_WMLTOOLS_DIR );
|
||||
prefs.setToDefault( installPrefix + Constants.P_WESNOTH_WORKING_DIR );
|
||||
|
||||
if ( install.Name.equals( Preferences.getDefaultInstallName( ) ) ) {
|
||||
Preferences.setDefaultInstallName( "" ); //$NON-NLS-1$
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user