| 1175:1943f7411e50 | 1176:87a906a990e3 |
|---|---|
| 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 26 * POSSIBILITY OF SUCH DAMAGE. | 26 * POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #import "WindowManager.h" | 29 #import "WindowManager.h" |
| 30 #import "MainWindow.h" | |
| 30 | 31 |
| 31 @implementation WindowManager | 32 @implementation WindowManager |
| 32 | 33 |
| 33 static WindowManager *instance = nil; | 34 static WindowManager *instance = nil; |
| 34 | 35 |
| 50 | 51 |
| 51 - (void)closeWindow:(NSWindow*)win { | 52 - (void)closeWindow:(NSWindow*)win { |
| 52 [_windows removeObject:win.windowController]; | 53 [_windows removeObject:win.windowController]; |
| 53 } | 54 } |
| 54 | 55 |
| 56 - (void)shutdown { | |
| 57 if(_windows.count > 0) { | |
| 58 NSWindowController *controller = _windows.firstObject; | |
| 59 MainWindow *win = (MainWindow*)controller.window; | |
| 60 [win saveWindowSize]; | |
| 61 } | |
| 62 [_windows removeAllObjects]; | |
| 63 } | |
| 64 | |
| 55 @end | 65 @end |