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
|
@private
|
||||||
id downloadsWindowController;
|
id downloadsWindowController;
|
||||||
id findPanelController;
|
id findPanelController;
|
||||||
|
id historyWindowController;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)showFindPanel: (id)sender;
|
-(void)showFindPanel: (id)sender;
|
||||||
-(void)showDownloadsWindow: (id)sender;
|
-(void)showDownloadsWindow: (id)sender;
|
||||||
|
-(void)showHistoryWindowController: (id)sender;
|
||||||
-(NSURL*)requestDownloadDestination;
|
-(NSURL*)requestDownloadDestination;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#import "netsurf/browser_window.h"
|
#import "netsurf/browser_window.h"
|
||||||
#import "DownloadsWindowController.h"
|
#import "DownloadsWindowController.h"
|
||||||
#import "FindPanelController.h"
|
#import "FindPanelController.h"
|
||||||
|
#import "HistoryWindowController.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set option defaults for (taken from the cocoa frontend)
|
* 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 {
|
-(NSURL*)requestDownloadDestination {
|
||||||
NSSavePanel *savePanel = [NSOpenPanel savePanel];
|
NSSavePanel *savePanel = [NSOpenPanel savePanel];
|
||||||
[savePanel setDirectory: NSHomeDirectory()];
|
[savePanel setDirectory: NSHomeDirectory()];
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
-(void)awakeFromNib {
|
-(void)awakeFromNib {
|
||||||
NSLog(@"Awoke from nib...");
|
NSLog(@"Awoke from nib...");
|
||||||
|
[[self window] makeKeyAndOrderFront: self];
|
||||||
[[DownloadManager defaultDownloadManager] setDelegate: 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 \
|
NetsurfCallback.m \
|
||||||
ProgressBarCell.m \
|
ProgressBarCell.m \
|
||||||
FindPanelController.m \
|
FindPanelController.m \
|
||||||
|
HistoryWindowController.m \
|
||||||
tables/misc.m \
|
tables/misc.m \
|
||||||
tables/bitmap.m \
|
tables/bitmap.m \
|
||||||
tables/clipboard.m \
|
tables/clipboard.m \
|
||||||
|
@ -72,6 +73,7 @@ R_RESOURCES := \
|
||||||
Browser.gorm \
|
Browser.gorm \
|
||||||
Downloads.gorm \
|
Downloads.gorm \
|
||||||
Find.gorm \
|
Find.gorm \
|
||||||
|
History.gorm \
|
||||||
|
|
||||||
R_RESOURCES := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(R_RESOURCES))
|
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 = (
|
Actions = (
|
||||||
"didTapNewWindow:",
|
"didTapNewWindow:",
|
||||||
"showDownloadsWindow:",
|
"showDownloadsWindow:",
|
||||||
"showFindPanel:"
|
"showFindPanel:",
|
||||||
|
"showHistoryWindowController:"
|
||||||
);
|
);
|
||||||
Outlets = (
|
Outlets = (
|
||||||
);
|
);
|
||||||
|
@ -15,8 +16,9 @@
|
||||||
"didTapNewWindow:",
|
"didTapNewWindow:",
|
||||||
"findNext:",
|
"findNext:",
|
||||||
"findPrevious:",
|
"findPrevious:",
|
||||||
"removeAll:",
|
"showHistoryWindowController:",
|
||||||
"remove:",
|
"remove:",
|
||||||
|
"removeAll:",
|
||||||
"showAll:",
|
"showAll:",
|
||||||
"showDownloadsWindow:",
|
"showDownloadsWindow:",
|
||||||
"showFindPanel:"
|
"showFindPanel:"
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue