mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Introduce ‘reusable’ property to OakHTMLOutputView
This defaults to YES but can be set to NO if an output view should not be re-used (even though no command is currently running).
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
@property (nonatomic) NSUUID* commandIdentifier; // UUID from initial load request
|
||||
@property (nonatomic, getter = isRunningCommand, readonly) BOOL runningCommand;
|
||||
@property (nonatomic, getter = isVisible, readonly) BOOL visible;
|
||||
@property (nonatomic, getter = isReusable) BOOL reusable;
|
||||
|
||||
// Read-only access to the webview is given to allow reading page title, etc.
|
||||
@property (nonatomic, readonly) WebView* webView;
|
||||
|
||||
@@ -9,4 +9,5 @@ PUBLIC @interface OakHTMLOutputView : HOBrowserView
|
||||
@property (nonatomic, readonly) NSString* mainFrameTitle;
|
||||
@property (nonatomic) NSUUID* commandIdentifier; // UUID from initial load request
|
||||
@property (nonatomic, getter = isRunningCommand, readonly) BOOL runningCommand;
|
||||
@property (nonatomic, getter = isReusable) BOOL reusable;
|
||||
@end
|
||||
|
||||
@@ -24,6 +24,15 @@
|
||||
return [NSSet setWithObjects:@"webView.mainFrameTitle", nil];
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(NSRect)aRect
|
||||
{
|
||||
if(self = [super initWithFrame:aRect])
|
||||
{
|
||||
_reusable = YES;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)loadRequest:(NSURLRequest*)aRequest environment:(std::map<std::string, std::string> const&)anEnvironment autoScrolls:(BOOL)flag
|
||||
{
|
||||
if(flag)
|
||||
|
||||
Reference in New Issue
Block a user