The attached state is now persisted to preferences.
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 6 Jan 2011 17:45:42 +0000 (12:45 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 6 Jan 2011 17:49:12 +0000 (12:49 -0500)
CHANGES
Source/AppDelegate.m
Source/DebuggerBackEnd.m

diff --git a/CHANGES b/CHANGES
index d7c565b1d772a36258472e012aae01afa5229deb..5a8b3748b87ce6ea0258e3bf04717860143a7263 100644 (file)
--- 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
index bf4462e1dd68caa9d9064d9423d5d7e21b73237a..6de017d1ce2b7b04b40a3f0bffeadbe2f41abd5b 100644 (file)
   return (AppDelegate*)[NSApp delegate];
 }
 
+- (void)applicationWillTerminate:(NSNotification*)notification
+{
+  [[NSUserDefaults standardUserDefaults] setBool:self.debugger.connection.attached
+                                          forKey:@"DebuggerAttached"];
+}
+
 /**
  * Shows the debugger window
  */
index 06f23df0caeb10aea62642d52d1a1e35a3b6cbe6..96ca92b76056e1967f2992979635508f752b7f06 100644 (file)
@@ -61,6 +61,8 @@
     connection_ = [[NetworkConnection alloc] initWithPort:aPort];
     connection_.delegate = self;
     [connection_ connect];
+
+    attached_ = [[NSUserDefaults standardUserDefaults] boolForKey:@"DebuggerAttached"];
   }
   return self;
 }