File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
build/shared/lib/languages Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -659,11 +659,17 @@ public void handleDeleteCode() {
659
659
return ;
660
660
}
661
661
662
+ if (currentIndex == 0 ){
663
+ JOptionPane .showMessageDialog (editor ,
664
+ Language .interpolate ("warn.delete.sketch_last" , getName ()),
665
+ Language .text ("warn.delete" ),
666
+ JOptionPane .ERROR_MESSAGE );
667
+ return ;
668
+ }
669
+
662
670
// confirm deletion with user, yes/no
663
671
Object [] options = { Language .text ("prompt.ok" ), Language .text ("prompt.cancel" ) };
664
- String prompt = (currentIndex == 0 ) ?
665
- Language .interpolate ("warn.delete.sketch_folder" , getName ()) :
666
- Language .interpolate ("warn.delete.sketch_file" , current .getPrettyName ());
672
+ String prompt = Language .interpolate ("warn.delete.sketch_file" , current .getPrettyName ());
667
673
int result = JOptionPane .showOptionDialog (editor ,
668
674
prompt ,
669
675
Language .text ("warn.delete" ),
@@ -672,6 +678,7 @@ public void handleDeleteCode() {
672
678
null ,
673
679
options ,
674
680
options [0 ]);
681
+ // TODO: Remove the code to remove the entire sketch folder
675
682
if (result == JOptionPane .YES_OPTION ) {
676
683
if (currentIndex == 0 ) { // delete the entire sketch
677
684
// need to unset all the modified flags, otherwise tries
Original file line number Diff line number Diff line change @@ -600,6 +600,7 @@ contrib.import.errors.link = Error: The library %s has a strange looking downloa
600
600
601
601
warn.delete = Delete
602
602
warn.delete.sketch_folder = Are you sure you want to delete this sketch?\n This will remove the entire “%s” folder.
603
+ warn.delete.sketch_last = Sorry deleting the sketch folder through Processing is not supported.
603
604
warn.delete.sketch_file = Are you sure you want to delete “%s”?
604
605
warn.cannot_change_mode.title = Cannot change mode
605
606
warn.cannot_change_mode.body = Cannot change mode,\n because “%s” mode is not compatible with current mode.
You can’t perform that action at this time.
0 commit comments