From 059d89ad25724d47f89c98bee2fb7952f97150c1 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 23 Apr 2008 15:47:16 -0400 Subject: [PATCH] Making a reference to the debugger in the Window menu * English.lproj/MainMenu.xib: Add a Window->Debugger item * Source/AppDelegate.m/h: Add a debugger ivar to hold the DebuggerWindowController ([showDebuggerWindow:]): New method to bring the debugger window to the front * Source/DebuggerWindowContrller.m: ([awakeFromNib]): Exclude the window from the dynamic Window menu --- English.lproj/MainMenu.xib | 469 ++++-------------------------- Source/AppDelegate.h | 5 +- Source/AppDelegate.m | 11 +- Source/DebuggerWindowController.m | 1 + 4 files changed, 72 insertions(+), 414 deletions(-) diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 22ff723..98c044c 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -556,6 +556,25 @@ + + + YES + YES + + + 2147483647 + + + + + + Debugger + D + 1048576 + 2147483647 + + + YES @@ -611,239 +630,6 @@ AppDelegate - - 15 - 2 - {{196, 21}, {601, 489}} - 603979776 - Breakpoints - NSWindow - - - - 256 - - YES - - - 274 - - YES - - - 256 - - YES - - - 274 - - YES - - - 2304 - - YES - - - 256 - {584, 194} - - YES - - - 256 - {584, 17} - - - - - - 256 - {{585, 0}, {16, 17}} - - - - YES - - 1.010000e+02 - 1.600000e+01 - 1.000000e+03 - - 75628032 - 0 - - - LucidaGrande - 1.100000e+01 - 3100 - - - 3 - MC4zMzMzMzI5OQA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 337772096 - 2048 - Text Cell - - LucidaGrande - 1.300000e+01 - 1044 - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2OQA - - - - 6 - System - controlTextColor - - - - 3 - YES - YES - - - - 4.770000e+02 - 4.000000e+01 - 1.000000e+03 - - 75628032 - 0 - - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 3.000000e+00 - 2.000000e+00 - - 3 - MQA - - - 6 - System - gridColor - - 3 - MC41AA - - - 1.700000e+01 - -767557632 - 4 - 15 - 0 - YES - - - {{1, 17}, {584, 194}} - - - - 4 - - - - 256 - {{585, 17}, {15, 194}} - - - _doScroller: - 9.948454e-01 - - - - 256 - {{1, 211}, {584, 15}} - - 1 - - _doScroller: - 9.982906e-01 - - - - 2304 - - YES - - - {{1, 0}, {584, 17}} - - - - 4 - - - - {601, 227} - - 50 - - - - - - QSAAAEEgAABBmAAAQZgAAA - - - {601, 227} - - NSView - - - - 274 - {{0, 236}, {601, 253}} - - BSSourceView - - - {601, 489} - - - - {601, 489} - - {{0, 0}, {1440, 878}} - @@ -1056,6 +842,22 @@ 226 + + + showDebuggerWindow: + + + + 266 + + + + performClose: + + + + 267 + @@ -1112,6 +914,8 @@ + + @@ -1423,114 +1227,6 @@ Application - - 229 - - - YES - - - - Breakpoints - - - 230 - - - YES - - - - - - 231 - - - YES - - - - - - - 232 - - - - - 233 - - - YES - - - - - - 234 - - - YES - - - - - - - - - 236 - - - YES - - - - - - - 237 - - - - - 238 - - - - - 239 - - - YES - - - - - - 240 - - - YES - - - - - - 241 - - - - - 242 - - - - - 248 - - - 249 @@ -1632,6 +1328,16 @@ + + 264 + + + + + 265 + + + @@ -1723,29 +1429,11 @@ 204.ImportedFromIB2 225.IBPluginDependency 225.ImportedFromIB2 - 229.IBEditorWindowLastContentRect - 229.IBPluginDependency - 229.IBWindowTemplateEditedContentRect - 229.NSWindowTemplate.visibleAtLaunch - 229.lastResizeAction 23.IBPluginDependency 23.ImportedFromIB2 - 230.IBPluginDependency - 231.CustomClassName - 231.IBPluginDependency - 232.IBPluginDependency - 233.IBPluginDependency - 234.IBPluginDependency - 236.IBPluginDependency - 237.IBPluginDependency - 238.IBPluginDependency - 239.IBPluginDependency 24.IBEditorWindowLastContentRect 24.IBPluginDependency 24.ImportedFromIB2 - 240.IBPluginDependency - 241.IBPluginDependency - 242.IBPluginDependency 249.IBPluginDependency 250.IBEditorWindowLastContentRect 250.IBPluginDependency @@ -1762,6 +1450,8 @@ 261.IBPluginDependency 262.IBPluginDependency 263.IBPluginDependency + 264.IBPluginDependency + 265.IBPluginDependency 29.IBEditorWindowLastContentRect 29.IBPluginDependency 29.ImportedFromIB2 @@ -1864,44 +1554,16 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{234, 145}, {601, 489}} - com.apple.InterfaceBuilder.CocoaPlugin - {{234, 145}, {601, 489}} - - - YES - - YES - IBResizeActionFinalFrame - IBResizeActionInitialFrame - - - YES - {{356, 71}, {601, 489}} - {{356, 290}, {480, 270}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - BSSplitView - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{302, 672}, {197, 73}} + {{248, 642}, {211, 103}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{162, 542}, {183, 203}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{162, 542}, {183, 203}} - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1951,7 +1613,7 @@ - 263 + 267 @@ -1960,7 +1622,7 @@ AppDelegate NSObject - showConnectionWindow: + showDebuggerWindow: id @@ -1976,26 +1638,6 @@ - - BSSourceView - NSView - - delegate - id - - - IBProjectSource - Source/BSSourceView.h - - - - BSSplitView - NSSplitView - - IBProjectSource - Source/BSSplitView.h - - FirstResponder @@ -2005,7 +1647,10 @@ NSObject - + + IBProjectSource + Source/BSSourceView.h + NSObject diff --git a/Source/AppDelegate.h b/Source/AppDelegate.h index 4d7002b..7ed417c 100644 --- a/Source/AppDelegate.h +++ b/Source/AppDelegate.h @@ -15,10 +15,13 @@ */ #import -#import "DebuggerConnection.h" +#import "DebuggerWindowController.h" @interface AppDelegate : NSObject { + DebuggerWindowController *debugger; } +- (IBAction)showDebuggerWindow:(id)sender; + @end diff --git a/Source/AppDelegate.m b/Source/AppDelegate.m index bc987a2..114182e 100644 --- a/Source/AppDelegate.m +++ b/Source/AppDelegate.m @@ -25,6 +25,7 @@ { if (self = [super init]) { + } return self; } @@ -35,7 +36,15 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notif { // TODO: use preference values - [[DebuggerWindowController alloc] initWithPort:9000 session:@"macgdbp"]; + debugger = [[DebuggerWindowController alloc] initWithPort:9000 session:@"macgdbp"]; +} + +/** + * Shows the debugger window + */ +- (IBAction)showDebuggerWindow:(id)sender +{ + [[debugger window] makeKeyAndOrderFront:self]; } @end diff --git a/Source/DebuggerWindowController.m b/Source/DebuggerWindowController.m index 4cdacdc..55a35c7 100644 --- a/Source/DebuggerWindowController.m +++ b/Source/DebuggerWindowController.m @@ -50,6 +50,7 @@ - (void)awakeFromNib { [self setStatus:@"Connecting"]; + [[self window] setExcludedFromWindowsMenu:YES]; [sourceViewer setDelegate:self]; } -- 2.22.5