From 03676b94c1cba82f555f33c8aba7b0390611dfa3 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 6 Jan 2011 12:45:42 -0500 Subject: [PATCH] The attached state is now persisted to preferences. --- CHANGES | 1 + Source/AppDelegate.m | 6 ++++++ Source/DebuggerBackEnd.m | 2 ++ 3 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index d7c565b..5a8b374 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ MacGDBp CHANGE LOG the contents - Fix: #197 Add a menu item and keyboard shortcut for the "Attached" control - Fix: #208 Variable selection and expansion state not saved across steps +- Fix: The attached state is now remebered in preferences 1.4 Beta 1 diff --git a/Source/AppDelegate.m b/Source/AppDelegate.m index bf4462e..6de017d 100644 --- a/Source/AppDelegate.m +++ b/Source/AppDelegate.m @@ -52,6 +52,12 @@ return (AppDelegate*)[NSApp delegate]; } +- (void)applicationWillTerminate:(NSNotification*)notification +{ + [[NSUserDefaults standardUserDefaults] setBool:self.debugger.connection.attached + forKey:@"DebuggerAttached"]; +} + /** * Shows the debugger window */ diff --git a/Source/DebuggerBackEnd.m b/Source/DebuggerBackEnd.m index 06f23df..96ca92b 100644 --- a/Source/DebuggerBackEnd.m +++ b/Source/DebuggerBackEnd.m @@ -61,6 +61,8 @@ connection_ = [[NetworkConnection alloc] initWithPort:aPort]; connection_.delegate = self; [connection_ connect]; + + attached_ = [[NSUserDefaults standardUserDefaults] boolForKey:@"DebuggerAttached"]; } return self; } -- 2.43.5