Set the title of the PDE window based on the current sketch, i.e. something like "sketch_070752a - Processing 0126"
()
| 2103 | * something like "sketch_070752a - Processing 0126" |
| 2104 | */ |
| 2105 | public void updateTitle() { |
| 2106 | setTitle(sketch.getName() + " | Processing " + Base.getVersionName()); |
| 2107 | |
| 2108 | if (!sketch.isUntitled()) { |
| 2109 | // Set current file for macOS so that cmd-click in title bar works. |
| 2110 | // For 4.0 beta 6 changing this to the sketch folder, rather than the |
| 2111 | // .pde for the main tab. (Otherwise, we should have it update when |
| 2112 | // the tab changes, which seems like overkill for how this is used.) |
| 2113 | getRootPane().putClientProperty("Window.documentFile", sketch.getFolder()); |
| 2114 | } else { |
| 2115 | // per other applications, don't set this until the file has been saved |
| 2116 | getRootPane().putClientProperty("Window.documentFile", null); |
| 2117 | } |
| 2118 | } |
| 2119 | |
| 2120 | |
| 2121 | /** |
no test coverage detected