// // SCMSubmitDialog.m // SCMMenuExtra // // Created by Michael Bishop on 5/12/11. // Copyright 2011 Numerical Garden LLC. All rights reserved. // #import "SCMSubmitDialog.h" @implementation SCMSubmitDialog @synthesize filepath,submitter; - (id)initWithWindow:(NSWindow *)window { if ((self = [super initWithWindow:window]) == nil) return nil; return self; } - (void)dealloc { self.filepath = nil; self.submitter = nil; [super dealloc]; } - (void)windowDidLoad { [super windowDidLoad]; // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. [[self window] setLevel:NSFloatingWindowLevel]; [descriptionTextView setFont:[NSFont userFixedPitchFontOfSize:12.0]]; } -(void)textDidChange:(NSNotification*)notification { [descriptionTextView setFont:[NSFont userFixedPitchFontOfSize:12.0]]; } -(IBAction)submit:(id)sender { [self.submitter submitFile:self.filepath withDescription:descriptionTextView.string completionBlock:^(NSError * error) { if ( error ) { [self presentError:error]; } else { [self close]; descriptionTextView.string = @""; } }]; } -(NSString*)windowNibName { return @"SCMSubmitDialog"; } +(NSSet*)keysForValuesAffectingFilename { return [NSSet setWithObject:@"filepath"]; } -(NSString*)filename { return [self.filepath lastPathComponent]; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20722 | jdputsch | initial branch, prep for -Zapp= support | ||
//guest/michael_bishop/MacMenu/src/P4Menu/Source/SCMSubmitDialog.m | |||||
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |