Add basic outline for history window
This commit is contained in:
parent
06b6804da0
commit
aad55fedb9
|
@ -22,10 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
@private
|
||||
id downloadsWindowController;
|
||||
id findPanelController;
|
||||
id historyWindowController;
|
||||
}
|
||||
|
||||
-(void)showFindPanel: (id)sender;
|
||||
-(void)showDownloadsWindow: (id)sender;
|
||||
-(void)showHistoryWindowController: (id)sender;
|
||||
-(NSURL*)requestDownloadDestination;
|
||||
|
||||
@end
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#import "netsurf/browser_window.h"
|
||||
#import "DownloadsWindowController.h"
|
||||
#import "FindPanelController.h"
|
||||
#import "HistoryWindowController.h"
|
||||
|
||||
/**
|
||||
* Set option defaults for (taken from the cocoa frontend)
|
||||
|
@ -77,6 +78,16 @@ static nserror set_defaults(struct nsoption_s *defaults)
|
|||
}
|
||||
}
|
||||
|
||||
-(void)showHistoryWindowController: (id)sender {
|
||||
NSLog(@"Showing history ...");
|
||||
if (!historyWindowController) {
|
||||
historyWindowController = [[HistoryWindowController alloc] init];
|
||||
[historyWindowController loadWindow];
|
||||
} else {
|
||||
[historyWindowController showWindow: self];
|
||||
}
|
||||
}
|
||||
|
||||
-(NSURL*)requestDownloadDestination {
|
||||
NSSavePanel *savePanel = [NSOpenPanel savePanel];
|
||||
[savePanel setDirectory: NSHomeDirectory()];
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
-(void)awakeFromNib {
|
||||
NSLog(@"Awoke from nib...");
|
||||
[[self window] makeKeyAndOrderFront: self];
|
||||
[[DownloadManager defaultDownloadManager] setDelegate: self];
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface HistoryWindowController: NSWindowController {
|
||||
id outlineView;
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,18 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
#import "HistoryWindowController.h"
|
||||
|
||||
@implementation HistoryWindowController
|
||||
|
||||
-(id)init {
|
||||
if (self = [super initWithWindowNibName: @"History"]) {
|
||||
// .....
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)awakeFromNib {
|
||||
NSLog(@"Awoke from nib...");
|
||||
[[self window] makeKeyAndOrderFront: self];
|
||||
}
|
||||
|
||||
@end
|
|
@ -46,6 +46,7 @@ S_FRONTEND := \
|
|||
NetsurfCallback.m \
|
||||
ProgressBarCell.m \
|
||||
FindPanelController.m \
|
||||
HistoryWindowController.m \
|
||||
tables/misc.m \
|
||||
tables/bitmap.m \
|
||||
tables/clipboard.m \
|
||||
|
@ -72,6 +73,7 @@ R_RESOURCES := \
|
|||
Browser.gorm \
|
||||
Downloads.gorm \
|
||||
Find.gorm \
|
||||
History.gorm \
|
||||
|
||||
R_RESOURCES := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(R_RESOURCES))
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"search:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
HistoryWindowController = {
|
||||
Actions = (
|
||||
"search:"
|
||||
);
|
||||
Outlets = (
|
||||
outlineView
|
||||
);
|
||||
Super = NSWindowController;
|
||||
};
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -4,7 +4,8 @@
|
|||
Actions = (
|
||||
"didTapNewWindow:",
|
||||
"showDownloadsWindow:",
|
||||
"showFindPanel:"
|
||||
"showFindPanel:",
|
||||
"showHistoryWindowController:"
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
|
@ -15,8 +16,9 @@
|
|||
"didTapNewWindow:",
|
||||
"findNext:",
|
||||
"findPrevious:",
|
||||
"removeAll:",
|
||||
"showHistoryWindowController:",
|
||||
"remove:",
|
||||
"removeAll:",
|
||||
"showAll:",
|
||||
"showDownloadsWindow:",
|
||||
"showFindPanel:"
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue