Basic GUI for main tab of preferences
This commit is contained in:
parent
f78014d6d9
commit
cf2c9d91ed
|
@ -35,12 +35,14 @@ id downloadsWindowController;
|
|||
id findPanelController;
|
||||
id historyWindowController;
|
||||
id bookmarksWindowController;
|
||||
id preferencesWindowController;
|
||||
}
|
||||
|
||||
-(void)showFindPanel: (id)sender;
|
||||
-(void)showDownloadsWindow: (id)sender;
|
||||
-(void)showHistoryWindow: (id)sender;
|
||||
-(void)showBookmarksWindow: (id)sender;
|
||||
-(void)showPreferencesWindow: (id)sender;
|
||||
-(NSURL*)requestDownloadDestination;
|
||||
-(void)openWebsite: (Website*)aWebsite;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#import "Website.h"
|
||||
#import "BookmarkFolder.h"
|
||||
#import "BookmarksWindowController.h"
|
||||
#import "PreferencesWindowController.h"
|
||||
|
||||
#define MAX_RECENT_HISTORY 10
|
||||
|
||||
|
@ -169,6 +170,16 @@ static NSMenuItem *menuItemForItem(id item) {
|
|||
}
|
||||
}
|
||||
|
||||
-(void)showPreferencesWindow: (id)sender {
|
||||
NSLog(@"Show preferences window");
|
||||
if (!preferencesWindowController) {
|
||||
preferencesWindowController = [[PreferencesWindowController alloc] init];
|
||||
[preferencesWindowController loadWindow];
|
||||
} else {
|
||||
[preferencesWindowController showWindow: self];
|
||||
}
|
||||
}
|
||||
|
||||
-(NSURL*)requestDownloadDestination {
|
||||
NSSavePanel *savePanel = [NSOpenPanel savePanel];
|
||||
[savePanel setDirectory: NSHomeDirectory()];
|
||||
|
|
|
@ -49,6 +49,7 @@ S_FRONTEND := \
|
|||
HistoryWindowController.m \
|
||||
BookmarksWindowController.m \
|
||||
CreateBookmarkPanelController.m \
|
||||
PreferencesWindowController.m \
|
||||
Website.m \
|
||||
BookmarkFolder.m \
|
||||
tables/misc.m \
|
||||
|
@ -80,6 +81,7 @@ R_RESOURCES := \
|
|||
History.gorm \
|
||||
Bookmarks.gorm \
|
||||
CreateBookmark.gorm \
|
||||
Preferences.gorm \
|
||||
|
||||
R_RESOURCES := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(R_RESOURCES))
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#include <AppKit/AppKit.h>
|
||||
|
||||
@interface PreferencesWindowController: NSWindowController {
|
||||
id downloadConfirmOverwriteButton;
|
||||
id downloadLocationButton;
|
||||
id downloadRemoveOnCompleteButton;
|
||||
id searchFromUrlButton;
|
||||
id searchProviderButton;
|
||||
id startupPageField;
|
||||
}
|
||||
-(void)didEnterStartupPage: (id)sender;
|
||||
-(void)didPickDownloadLocation: (id)sender;
|
||||
-(void)didPickSearchProvider: (id)sender;
|
||||
-(void)didPressDownloadConfirmOverwrite: (id)sender;
|
||||
-(void)didPressDownloadRemoveOnComplete: (id)sender;
|
||||
-(void)didPressStartupUseCurrentPage: (id)sender;
|
||||
-(void)didPressStartupUseDefaultPage: (id)sender;
|
||||
-(void)didPressSearchFromUrlBar: (id)sender;
|
||||
@end
|
|
@ -0,0 +1,52 @@
|
|||
#include <AppKit/AppKit.h>
|
||||
#include "PreferencesWindowController.h"
|
||||
|
||||
@implementation PreferencesWindowController
|
||||
|
||||
-(id)init {
|
||||
if (self = [super initWithWindowNibName: @"Preferences"]) {
|
||||
//...
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)didEnterStartupPage: (id)sender {
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)didPickDownloadLocation: (id)sender {
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)didPickSearchProvider: (id)sender {
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)didPressDownloadConfirmOverwrite: (id)sender {
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)didPressDownloadRemoveOnComplete: (id)sender {
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)didPressStartupUseCurrentPage: (id)sender {
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)didPressStartupUseDefaultPage: (id)sender {
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)didPressSearchFromUrlBar: (id)sender {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -6,7 +6,8 @@
|
|||
"showDownloadsWindow:",
|
||||
"showFindPanel:",
|
||||
"showHistoryWindow:",
|
||||
"showBookmarksWindow:"
|
||||
"showBookmarksWindow:",
|
||||
"showPreferencesWindow:"
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
|
@ -18,6 +19,7 @@
|
|||
"didTapNewWindow:",
|
||||
"findNext:",
|
||||
"findPrevious:",
|
||||
"showPreferencesWindow:",
|
||||
"newFolder:",
|
||||
"remove:",
|
||||
"removeAll:",
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"didEnterStartupPage:",
|
||||
"didPickDownloadLocation:",
|
||||
"didPickSearchProvider:",
|
||||
"didPressDownloadConfirmOverwrite:",
|
||||
"didPressDownloadRemoveOnComplete:",
|
||||
"didPressStartupUseCurrentPage:",
|
||||
"didPressStartupUseDefaultPage:",
|
||||
"didPressSearchFromUrlBar:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PreferencesWindowController = {
|
||||
Actions = (
|
||||
"didEnterStartupPage:",
|
||||
"didPickDownloadLocation:",
|
||||
"didPickSearchProvider:",
|
||||
"didPressDownloadConfirmOverwrite:",
|
||||
"didPressDownloadRemoveOnComplete:",
|
||||
"didPressStartupUseCurrentPage:",
|
||||
"didPressStartupUseDefaultPage:",
|
||||
"didPressSearchFromUrlBar:"
|
||||
);
|
||||
Outlets = (
|
||||
downloadConfirmOverwriteButton,
|
||||
downloadLocationButton,
|
||||
downloadRemoveOnCompleteButton,
|
||||
searchFromUrlButton,
|
||||
searchProviderButton,
|
||||
startupPageField
|
||||
);
|
||||
Super = NSWindowController;
|
||||
};
|
||||
}
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue