GVApplicationDelegate.m 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at http://www.graphviz.org/
  9. *************************************************************************/
  10. #import "GVApplicationDelegate.h"
  11. #import "GVAttributeInspectorController.h"
  12. @implementation GVApplicationDelegate
  13. - (IBAction)showAttributeInspector:(id)sender
  14. {
  15. if (!_attributeInspectorController)
  16. _attributeInspectorController = [[GVAttributeInspectorController alloc] init];
  17. [_attributeInspectorController showWindow:sender];
  18. }
  19. - (BOOL)applicationOpenUntitledFile:(NSApplication*)theApplication
  20. {
  21. if (!_applicationStarted)
  22. [[NSDocumentController sharedDocumentController] openDocument:self];
  23. return YES;
  24. }
  25. - (void)applicationDidFinishLaunching:(NSNotification*)aNotification
  26. {
  27. _applicationStarted = YES;
  28. }
  29. @end