editor is more editorish

This commit is contained in:
Corey Johnson
2011-11-02 15:22:52 -07:00
parent c67917efa3
commit 9a596734ff
7 changed files with 106 additions and 78 deletions

View File

@@ -1,9 +1,11 @@
#import "AtomController.h"
#import "AtomApp.h"
#import <WebKit/WebKit.h>
#import "JSCocoa.h"
#import <WebKit/WebKit.h>
#import <stdio.h>
@implementation AtomController
@synthesize webView, path, jscocoa;
@@ -48,6 +50,16 @@
[super close];
}
- (NSString *)tempfile {
char *directory = "/tmp";
char *prefix = "temp-file";
char *tmpPath = tempnam(directory, prefix);
NSString *tmpPathString = [NSString stringWithUTF8String:tmpPath];
free(tmpPath);
return tmpPathString;
}
// WebUIDelegate Protocol
- (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems {
return defaultMenuItems;