Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Commit

Permalink
add selectedTabIdentifier
Browse files Browse the repository at this point in the history
  • Loading branch information
hetima committed Jul 6, 2015
1 parent 0539e12 commit 3a2598c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions SafariStand/modules/STConsolePanelModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- (void)addPanelWithIdentifier:(NSString*)identifier title:(NSString*)title icon:(NSImage*)icon weight:(NSInteger)weight loadHandler:(id(^)())loadHandler;

- (void)showConsolePanelAndSelectTab:(NSString*)identifier;
- (NSString*)selectedTabIdentifier;

@end

Expand Down
8 changes: 8 additions & 0 deletions SafariStand/modules/STConsolePanelModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ - (void)showConsolePanelAndSelectTab:(NSString*)identifier
}


- (NSString*)selectedTabIdentifier
{
if(!_winCtl)return nil;

return [[_winCtl.oTabView selectedTabViewItem]identifier];
}


- (void)addPanelWithIdentifier:(NSString*)identifier title:(NSString*)title icon:(NSImage*)icon weight:(NSInteger)weight loadHandler:(id(^)())loadHandler
{
NSDictionary* panel=@{@"identifier":identifier, @"title":title, @"icon":icon, @"weight":@(weight), @"loadHandler":loadHandler};
Expand Down

0 comments on commit 3a2598c

Please sign in to comment.