()
| 1945 | |
| 1946 | |
| 1947 | public boolean handleSaveAs() { |
| 1948 | //stopRunner(); // formerly from 0135 |
| 1949 | handleStop(); |
| 1950 | |
| 1951 | toolbar.activateSave(); |
| 1952 | |
| 1953 | //SwingUtilities.invokeLater(new Runnable() { |
| 1954 | //public void run() { |
| 1955 | statusNotice(tr("Saving...")); |
| 1956 | try { |
| 1957 | if (sketchController.saveAs()) { |
| 1958 | base.storeRecentSketches(sketchController); |
| 1959 | base.rebuildRecentSketchesMenuItems(); |
| 1960 | statusNotice(tr("Done Saving.")); |
| 1961 | // Disabling this for 0125, instead rebuild the menu inside |
| 1962 | // the Save As method of the Sketch object, since that's the |
| 1963 | // only one who knows whether something was renamed. |
| 1964 | //sketchbook.rebuildMenusAsync(); |
| 1965 | } else { |
| 1966 | statusNotice(tr("Save Canceled.")); |
| 1967 | return false; |
| 1968 | } |
| 1969 | } catch (Exception e) { |
| 1970 | // show the error as a message in the window |
| 1971 | statusError(e); |
| 1972 | |
| 1973 | } finally { |
| 1974 | // make sure the toolbar button deactivates |
| 1975 | toolbar.deactivateSave(); |
| 1976 | |
| 1977 | // Update editor window title in case of "Save as..." |
| 1978 | updateTitle(); |
| 1979 | header.rebuild(); |
| 1980 | } |
| 1981 | |
| 1982 | return true; |
| 1983 | } |
| 1984 | |
| 1985 | |
| 1986 | private boolean serialPrompt() { |
no test coverage detected