Skip to content
Browse files

show window/pasteboard first time

  • Loading branch information...
1 parent 7c38d92 commit 9389e4030e53c07886e4f21fd102a4a6673449d7 Brian Collins committed Jan 17, 2010
Showing with 3 additions and 12 deletions.
  1. +1 −0 Src/FindController.h
  2. +2 −12 Src/FindController.m
View
1 Src/FindController.h
@@ -56,6 +56,7 @@
- (void)showAndMove;
- (void)updateResultsCount;
- (void)wakeUp;
+- (BOOL)loadProject;
@end
View
14 Src/FindController.m
@@ -68,6 +68,7 @@ - (void)showAndMove {
if ([self loadProject]) {
[self wakeUp];
[self showForWindow:self.project.window];
+ [self loadFindStringFromPasteboard];
} else {
[[[NSApplication sharedApplication] delegate] orderFrontFindPanel:self];
[self close];
@@ -87,15 +88,6 @@ - (BOOL)loadProject {
return self.project != nil;
}
-- (void)show {
- if ([self loadProject]) {
- [self wakeUp];
- [self showWindow:self];
- } else {
- [[[NSApplication sharedApplication] delegate] orderFrontFindPanel:self];
- [self close];
- }
-}
- (void)loadFindStringFromPasteboard {
NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:NSFindPboard];
@@ -108,8 +100,7 @@ - (void)loadFindStringFromPasteboard {
}
}
-- (void)loadFindStringToPasteboard
-{
+- (void)loadFindStringToPasteboard {
NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName: NSFindPboard];
[pasteboard declareTypes:[NSArray arrayWithObject:NSStringPboardType]
@@ -119,7 +110,6 @@ - (void)loadFindStringToPasteboard
- (void)wakeUp {
- [self loadFindStringFromPasteboard];
self.selectedFolder = [[self.project environmentVariables] objectForKey:@"TM_SELECTED_FILE"];
BOOL isDirectory = NO;
[[NSFileManager defaultManager] fileExistsAtPath:self.selectedFolder isDirectory:&isDirectory];

0 comments on commit 9389e40

Please sign in to comment.
Something went wrong with that request. Please try again.