confirm_dialogs.patch
org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/DeleteScriptAction.java (copia locale) | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.File; |
4 | 4 |
|
5 |
import javax.swing.JOptionPane; |
|
6 |
|
|
5 | 7 |
import es.unex.sextante.core.GeoAlgorithm; |
6 | 8 |
import es.unex.sextante.core.Sextante; |
7 | 9 |
import es.unex.sextante.gui.core.IToolboxRightButtonAction; |
... | ... | |
19 | 21 |
|
20 | 22 |
public void execute(final GeoAlgorithm alg) { |
21 | 23 |
|
22 |
final ScriptAlgorithm script = (ScriptAlgorithm) alg; |
|
23 |
final File file = new File(script.getFilename()); |
|
24 |
file.delete(); |
|
25 |
SextanteGUI.updateAlgorithmProvider(ScriptAlgorithmProvider.class); |
|
26 |
SextanteGUI.getGUIFactory().updateToolbox(); |
|
24 |
int deleteScriptResult = JOptionPane.showConfirmDialog(null, Sextante.getText("are_you_sure_to_delete_the_selected_script"), Sextante.getText("Warning"), JOptionPane.YES_NO_OPTION); |
|
25 |
if (deleteScriptResult == JOptionPane.YES_OPTION) { |
|
26 |
final ScriptAlgorithm script = (ScriptAlgorithm) alg; |
|
27 |
final File file = new File(script.getFilename()); |
|
28 |
file.delete(); |
|
29 |
SextanteGUI.updateAlgorithmProvider(ScriptAlgorithmProvider.class); |
|
30 |
SextanteGUI.getGUIFactory().updateToolbox(); |
|
31 |
} |
|
27 | 32 |
|
28 | 33 |
} |
29 | 34 |
|
30 | 35 |
org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/modeler/DeleteModelAction.java (copia locale) | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.io.File; |
4 | 4 |
|
5 |
import javax.swing.JOptionPane; |
|
6 |
|
|
5 | 7 |
import es.unex.sextante.core.GeoAlgorithm; |
6 | 8 |
import es.unex.sextante.core.Sextante; |
7 | 9 |
import es.unex.sextante.gui.core.IToolboxRightButtonAction; |
... | ... | |
20 | 22 |
|
21 | 23 |
public void execute(final GeoAlgorithm alg) { |
22 | 24 |
|
23 |
final ModelAlgorithm model = (ModelAlgorithm) alg; |
|
24 |
final File file = new File(model.getFilename()); |
|
25 |
file.delete(); |
|
26 |
SextanteGUI.updateAlgorithmProvider(ModelerAlgorithmProvider.class); |
|
27 |
SextanteGUI.getGUIFactory().updateToolbox(); |
|
28 |
//fillTree(m_sLastSearchString, m_bLastSearchIncludedHelpFiles); |
|
29 |
//collapseAll(); |
|
25 |
int deleteModelResult = JOptionPane.showConfirmDialog(null, Sextante.getText("are_you_sure_to_delete_the_selected_model"), Sextante.getText("Warning"), JOptionPane.YES_NO_OPTION); |
|
26 |
if (deleteModelResult == JOptionPane.YES_OPTION) { |
|
27 |
final ModelAlgorithm model = (ModelAlgorithm) alg; |
|
28 |
final File file = new File(model.getFilename()); |
|
29 |
file.delete(); |
|
30 |
SextanteGUI.updateAlgorithmProvider(ModelerAlgorithmProvider.class); |
|
31 |
SextanteGUI.getGUIFactory().updateToolbox(); |
|
32 |
} |
|
30 | 33 |
|
31 |
|
|
32 | 34 |
} |
33 | 35 |
|
34 | 36 |
org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text.properties (copia locale) | ||
---|---|---|
624 | 624 |
|
625 | 625 |
file_extension=Extensi\u00F3n (ej. \"asc\")\: |
626 | 626 |
|
627 |
Description=Descripci\u00F3n\: |
|
627 |
Description=Descripci\u00F3n\: |
|
628 |
|
|
629 |
are_you_sure_to_delete_the_selected_model=\u00BFEst\u00E1 seguro de borrar el modelo seleccionado? |
|
630 |
|
|
631 |
are_you_sure_to_delete_the_selected_script=\u00BFEst\u00E1 seguro de borrar el script seleccionado? |
org.gvsig.toolbox.gui/src/main/resources/org/gvsig/toolbox/gui/i18n/text_en.properties (copia locale) | ||
---|---|---|
708 | 708 |
Do_you_want_to_overwrite=Do you want to overwrite it? |
709 | 709 |
|
710 | 710 |
Description=Description\: |
711 |
|
|
712 |
are_you_sure_to_delete_the_selected_model=Are you sure to delete the selected model? |
|
713 |
|
|
714 |
are_you_sure_to_delete_the_selected_script=Are you sure to delete the selected script? |