Lots more polish!
This commit is contained in:
parent
cbd3105023
commit
6b578a58ce
|
@ -45,6 +45,16 @@ struct form_control;
|
||||||
TabLocation currentTabLocation;
|
TabLocation currentTabLocation;
|
||||||
UrlSuggestionView *urlSuggestionView;
|
UrlSuggestionView *urlSuggestionView;
|
||||||
|
|
||||||
|
/* new additions - eukara */
|
||||||
|
id homeButton;
|
||||||
|
id bookmarksButton;
|
||||||
|
id bookmarkAddButton;
|
||||||
|
id findButton;
|
||||||
|
id shareButton;
|
||||||
|
id settingsButton;
|
||||||
|
id infoButton;
|
||||||
|
id printButton;
|
||||||
|
|
||||||
|
|
||||||
// These three are set based on the currently focused tab.
|
// These three are set based on the currently focused tab.
|
||||||
id scrollView;
|
id scrollView;
|
||||||
|
@ -93,6 +103,15 @@ struct form_control;
|
||||||
-(void)reload: (id)sender;
|
-(void)reload: (id)sender;
|
||||||
-(void)stopLoading: (id)sender;
|
-(void)stopLoading: (id)sender;
|
||||||
|
|
||||||
|
/* new additions - eukara */
|
||||||
|
-(void)visitHome: (id)sender;
|
||||||
|
-(void)openBookmarks: (id)sender;
|
||||||
|
-(void)openFindPanel: (id)sender;
|
||||||
|
-(void)openPrintPanel: (id)sender;
|
||||||
|
-(void)openPreferences: (id)sender;
|
||||||
|
-(void)openInspector: (id)sender;
|
||||||
|
-(void)sharePage: (id)sender;
|
||||||
|
|
||||||
-(void)showDropdownMenuWithOptions: (NSArray*)options atLocation: (NSPoint)location inTab: (id)tab control: (struct form_control*)control;
|
-(void)showDropdownMenuWithOptions: (NSArray*)options atLocation: (NSPoint)location inTab: (id)tab control: (struct form_control*)control;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#define TAB_TITLE_LEN 20
|
#define TAB_TITLE_LEN 20
|
||||||
// Everything above the browser. Used to calculate the tabview's height.
|
// Everything above the browser. Used to calculate the tabview's height.
|
||||||
#define TOP_CONTENT_HEIGHT 45
|
#define TOP_CONTENT_HEIGHT 86
|
||||||
// Any way to get this programatically?
|
// Any way to get this programatically?
|
||||||
#define TAB_ITEM_HEIGHT 13
|
#define TAB_ITEM_HEIGHT 13
|
||||||
#define VERTICAL_TAB_WIDTH 100
|
#define VERTICAL_TAB_WIDTH 100
|
||||||
|
@ -308,10 +308,12 @@ static id newTabTarget;
|
||||||
}
|
}
|
||||||
-(void)startThrobber {
|
-(void)startThrobber {
|
||||||
[refreshButton setTitle: @"Stop"];
|
[refreshButton setTitle: @"Stop"];
|
||||||
|
[refreshButton setImage: [NSImage imageNamed: @"Stop.0"]];
|
||||||
[refreshButton setTag: 1];
|
[refreshButton setTag: 1];
|
||||||
}
|
}
|
||||||
-(void)stopThrobber {
|
-(void)stopThrobber {
|
||||||
[refreshButton setTitle: @"Refresh"];
|
[refreshButton setTitle: @"Refresh"];
|
||||||
|
[refreshButton setImage: [NSImage imageNamed: @"Fetch"]];
|
||||||
[refreshButton setTag: 0];
|
[refreshButton setTag: 0];
|
||||||
}
|
}
|
||||||
-(void)setNavigationUrl: (NSString*)urlString forTab: (id)tab {
|
-(void)setNavigationUrl: (NSString*)urlString forTab: (id)tab {
|
||||||
|
@ -524,7 +526,7 @@ static id newTabTarget;
|
||||||
if (hideTabs) {
|
if (hideTabs) {
|
||||||
[verticalTabsView removeFromSuperview];
|
[verticalTabsView removeFromSuperview];
|
||||||
verticalTabsView = nil;
|
verticalTabsView = nil;
|
||||||
[tabView setTabViewType: NSNoTabsNoBorder];
|
[tabView setTabViewType: NSNoTabsLineBorder];
|
||||||
[tabView setFrame: rect];
|
[tabView setFrame: rect];
|
||||||
[tabView selectTabViewItem: [activeTab tabItem]];
|
[tabView selectTabViewItem: [activeTab tabItem]];
|
||||||
currentTabLocation = TabLocationNone;
|
currentTabLocation = TabLocationNone;
|
||||||
|
@ -582,13 +584,33 @@ static id newTabTarget;
|
||||||
switch (buttonType) {
|
switch (buttonType) {
|
||||||
case UrlBarButtonTypeImage:
|
case UrlBarButtonTypeImage:
|
||||||
[backButton setTitle: nil];
|
[backButton setTitle: nil];
|
||||||
[backButton setImage: [NSImage imageNamed: @"back"]];
|
[backButton setImage: [NSImage imageNamed: @"ArrowLeft"]];
|
||||||
|
[backButton setAlternateImage: [NSImage imageNamed: @"Arrow_Left.Dis"]];
|
||||||
[forwardButton setTitle: nil];
|
[forwardButton setTitle: nil];
|
||||||
[forwardButton setImage: [NSImage imageNamed: @"forward"]];
|
[forwardButton setImage: [NSImage imageNamed: @"ArrowRight"]];
|
||||||
|
[forwardButton setAlternateImage: [NSImage imageNamed: @"Arrow_Right.Dis"]];
|
||||||
[refreshButton setTitle: nil];
|
[refreshButton setTitle: nil];
|
||||||
[refreshButton setImage: [NSImage imageNamed: @"refresh"]];
|
[refreshButton setImage: [NSImage imageNamed: @"Fetch"]];
|
||||||
[searchImage setImage: [NSImage imageNamed: @"search"]];
|
[searchImage setImage: [NSImage imageNamed: @"smallSearch"]];
|
||||||
[searchLabel setStringValue: nil];
|
[searchLabel setStringValue: nil];
|
||||||
|
|
||||||
|
/* new additions - eukara */
|
||||||
|
[homeButton setTitle: nil];
|
||||||
|
[homeButton setImage: [NSImage imageNamed: @"Home"]];
|
||||||
|
[bookmarksButton setTitle: nil];
|
||||||
|
[bookmarksButton setImage: [NSImage imageNamed: @"BookmarksPanel"]];
|
||||||
|
[bookmarkAddButton setTitle: nil];
|
||||||
|
[bookmarkAddButton setImage: [NSImage imageNamed: @"AddBookmark"]];
|
||||||
|
[findButton setTitle: nil];
|
||||||
|
[findButton setImage: [NSImage imageNamed: @"Librarian"]];
|
||||||
|
[shareButton setTitle: nil];
|
||||||
|
[shareButton setImage: [NSImage imageNamed: @"History"]];
|
||||||
|
[settingsButton setTitle: nil];
|
||||||
|
[settingsButton setImage: [NSImage imageNamed: @"Processes"]];
|
||||||
|
[infoButton setTitle: nil];
|
||||||
|
[infoButton setImage: [NSImage imageNamed: @"Inspector"]];
|
||||||
|
[printButton setTitle: nil];
|
||||||
|
[printButton setImage: [NSImage imageNamed: @"Print"]];
|
||||||
break;
|
break;
|
||||||
case UrlBarButtonTypeText:
|
case UrlBarButtonTypeText:
|
||||||
[backButton setTitle: @"Back"];
|
[backButton setTitle: @"Back"];
|
||||||
|
@ -624,4 +646,42 @@ static id newTabTarget;
|
||||||
return newTabTarget;
|
return newTabTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* new additions */
|
||||||
|
|
||||||
|
-(void)visitHome: (id)sender
|
||||||
|
{
|
||||||
|
[self openUrlString: [[Preferences defaultPreferences] startupUrl]];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)openBookmarks: (id)sender
|
||||||
|
{
|
||||||
|
[[[NSApplication sharedApplication] delegate] showBookmarksWindow: sender];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)openFindPanel: (id)sender
|
||||||
|
{
|
||||||
|
[[[NSApplication sharedApplication] delegate] showFindPanel: sender];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)openPrintPanel: (id)sender
|
||||||
|
{
|
||||||
|
NSRunAlertPanel(@"Hey!", @"This feature is coming soon.", @"OK", NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)openPreferences: (id)sender
|
||||||
|
{
|
||||||
|
[[[NSApplication sharedApplication] delegate] showPreferencesWindow: sender];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)openInspector: (id)sender
|
||||||
|
{
|
||||||
|
NSRunAlertPanel(@"Hey!", @"This feature is coming soon.", @"OK", NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)sharePage: (id)sender
|
||||||
|
{
|
||||||
|
NSRunAlertPanel(@"Hey!", @"This feature is coming soon.", @"OK", NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -87,12 +87,14 @@ R_RESOURCES := \
|
||||||
Menu.gorm \
|
Menu.gorm \
|
||||||
Browser.gorm \
|
Browser.gorm \
|
||||||
Downloads.gorm \
|
Downloads.gorm \
|
||||||
|
NetSurf.tiff \
|
||||||
Find.gorm \
|
Find.gorm \
|
||||||
History.gorm \
|
History.gorm \
|
||||||
Bookmarks.gorm \
|
Bookmarks.gorm \
|
||||||
CreateBookmark.gorm \
|
CreateBookmark.gorm \
|
||||||
Preferences.gorm \
|
Preferences.gorm \
|
||||||
Languages.plist \
|
Languages.plist \
|
||||||
|
*.tiff
|
||||||
|
|
||||||
|
|
||||||
R_RESOURCES := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(R_RESOURCES))
|
R_RESOURCES := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(R_RESOURCES))
|
||||||
|
@ -104,10 +106,6 @@ E_RESOURCES := \
|
||||||
internal.css \
|
internal.css \
|
||||||
quirks.css \
|
quirks.css \
|
||||||
SearchEngines \
|
SearchEngines \
|
||||||
forward.png \
|
|
||||||
back.png \
|
|
||||||
refresh.png \
|
|
||||||
search.png \
|
|
||||||
|
|
||||||
E_RESOURCES := $(addprefix resources/,$(E_RESOURCES))
|
E_RESOURCES := $(addprefix resources/,$(E_RESOURCES))
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
if (saved != nil) {
|
if (saved != nil) {
|
||||||
return saved;
|
return saved;
|
||||||
} else {
|
} else {
|
||||||
return @"https://www.startpage.com";
|
return @"https://www.vera-visions.com";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-(void)setStartupUrl: (NSString*)aUrl {
|
-(void)setStartupUrl: (NSString*)aUrl {
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -7,7 +7,15 @@
|
||||||
"navigate:",
|
"navigate:",
|
||||||
"stopOrRefresh:",
|
"stopOrRefresh:",
|
||||||
"enterUrl:",
|
"enterUrl:",
|
||||||
"enterSearch:"
|
"enterSearch:",
|
||||||
|
"bookmarkPage:",
|
||||||
|
"openPrintPanel:",
|
||||||
|
"openBookmarks:",
|
||||||
|
"openFindPanel:",
|
||||||
|
"openInspector:",
|
||||||
|
"openPreferences:",
|
||||||
|
"sharePage:",
|
||||||
|
"visitHome:"
|
||||||
);
|
);
|
||||||
Outlets = (
|
Outlets = (
|
||||||
backButton,
|
backButton,
|
||||||
|
@ -19,18 +27,34 @@
|
||||||
searchImage,
|
searchImage,
|
||||||
searchBar,
|
searchBar,
|
||||||
tabView,
|
tabView,
|
||||||
searchLabel
|
searchLabel,
|
||||||
|
bookmarkAddButton,
|
||||||
|
bookmarksButton,
|
||||||
|
findButton,
|
||||||
|
homeButton,
|
||||||
|
infoButton,
|
||||||
|
printButton,
|
||||||
|
settingsButton,
|
||||||
|
shareButton
|
||||||
);
|
);
|
||||||
Super = NSWindowController;
|
Super = NSWindowController;
|
||||||
};
|
};
|
||||||
FirstResponder = {
|
FirstResponder = {
|
||||||
Actions = (
|
Actions = (
|
||||||
"back:",
|
"back:",
|
||||||
|
"bookmarkPage:",
|
||||||
|
"enterSearch:",
|
||||||
"enterUrl:",
|
"enterUrl:",
|
||||||
"forward:",
|
"forward:",
|
||||||
"navigate:",
|
"navigate:",
|
||||||
"enterSearch:",
|
"openPrintPanel:",
|
||||||
"stopOrRefresh:"
|
"openBookmarks:",
|
||||||
|
"openFindPanel:",
|
||||||
|
"openInspector:",
|
||||||
|
"openPreferences:",
|
||||||
|
"sharePage:",
|
||||||
|
"stopOrRefresh:",
|
||||||
|
"visitHome:"
|
||||||
);
|
);
|
||||||
Super = NSObject;
|
Super = NSObject;
|
||||||
};
|
};
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,111 +1,64 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
{
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
ApplicationDescription = "World Wide Web Viewer";
|
||||||
<plist version="1.0">
|
ApplicationIcon = "NetSurf.tiff";
|
||||||
<dict>
|
ApplicationName = NetSurf;
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
ApplicationRelease = "1.0";
|
||||||
<string>English</string>
|
Authors = (
|
||||||
<key>CFBundleDocumentTypes</key>
|
"Vera Visions, LLC."
|
||||||
<array>
|
);
|
||||||
<dict>
|
CFBundleIdentifier = "com.vera-visions.NetSurf";
|
||||||
<key>CFBundleTypeExtensions</key>
|
CFBundleURLTypes = (
|
||||||
<array/>
|
{
|
||||||
<key>CFBundleTypeMIMETypes</key>
|
CFBundleURLName = "Website URL";
|
||||||
<array/>
|
CFBundleURLSchemes = (
|
||||||
<key>CFBundleTypeName</key>
|
http,
|
||||||
<string>HTML</string>
|
https
|
||||||
<key>CFBundleTypeRole</key>
|
);
|
||||||
<string>Viewer</string>
|
}
|
||||||
<key>LSItemContentTypes</key>
|
);
|
||||||
<array>
|
Copyright = "Copyright \U00A9 2022 Vera Visions, LLC.";
|
||||||
<string>public.html</string>
|
GSMainMarkupFile = "";
|
||||||
</array>
|
NOTE = "Automatically generated, do not edit!";
|
||||||
</dict>
|
NSExecutable = NetSurf;
|
||||||
</array>
|
NSIcon = "NetSurf.tiff";
|
||||||
<key>CFBundleExecutable</key>
|
NSMainNibFile = "MainMenu.gorm";
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
NSMainStoryboardFile = "";
|
||||||
<key>CFBundleIconFile</key>
|
NSPrincipalClass = NSApplication;
|
||||||
<string>NetSurf</string>
|
NSRole = Application;
|
||||||
<key>CFBundleIdentifier</key>
|
NSServices = (
|
||||||
<string>org.netsurf-browser.${PRODUCT_NAME:rfc1034identifier}</string>
|
{
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
NSMenuItem = {
|
||||||
<string>6.0</string>
|
default = "Open URL in NetSurf";
|
||||||
<key>CFBundleName</key>
|
};
|
||||||
<string>${PRODUCT_NAME}</string>
|
NSMessage = openURL;
|
||||||
<key>CFBundlePackageType</key>
|
NSPortName = NetSurf;
|
||||||
<string>APPL</string>
|
NSSendTypes = (
|
||||||
<key>CFBundleShortVersionString</key>
|
NSURLPboardType,
|
||||||
<string>${NETSURF_VERSION}</string>
|
NSStringPboardType
|
||||||
<key>CFBundleSignature</key>
|
);
|
||||||
<string>????</string>
|
}
|
||||||
<key>CFBundleURLTypes</key>
|
);
|
||||||
<array>
|
NSTypes = (
|
||||||
<dict>
|
{
|
||||||
<key>CFBundleURLName</key>
|
NSHumanReadableName = HTML;
|
||||||
<string>org.netsurf-browser.NetSurf.URI</string>
|
NSIcon = "WebDocument.tiff";
|
||||||
<key>CFBundleURLSchemes</key>
|
NSName = "HTML Document";
|
||||||
<array>
|
NSRole = Editor;
|
||||||
<string>http</string>
|
NSUnixExtensions = (
|
||||||
<string>https</string>
|
htm,
|
||||||
</array>
|
html
|
||||||
</dict>
|
);
|
||||||
</array>
|
},
|
||||||
<key>CFBundleVersion</key>
|
{
|
||||||
<string>${NETSURF_SHORT_VERSION}</string>
|
NSHumanReadableName = XHTML;
|
||||||
<key>LSMinimumSystemVersion</key>
|
NSIcon = "WebDocument.tiff";
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
NSName = "XHTML Document";
|
||||||
<key>NSMainNibFile</key>
|
NSRole = Viewer;
|
||||||
<string>MainMenu</string>
|
NSUnixExtensions = (
|
||||||
<key>NSPrincipalClass</key>
|
xhtm,
|
||||||
<string>NetSurfApp</string>
|
xhtml
|
||||||
<key>NSServices</key>
|
);
|
||||||
<array/>
|
}
|
||||||
<key>UTExportedTypeDeclarations</key>
|
);
|
||||||
<array/>
|
URL = "http://www.vera-visions.com/";
|
||||||
<key>UTImportedTypeDeclarations</key>
|
}
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>UTTypeConformsTo</key>
|
|
||||||
<array>
|
|
||||||
<string>public.text</string>
|
|
||||||
</array>
|
|
||||||
<key>UTTypeDescription</key>
|
|
||||||
<string>HTML</string>
|
|
||||||
<key>UTTypeIdentifier</key>
|
|
||||||
<string>public.html</string>
|
|
||||||
<key>UTTypeTagSpecification</key>
|
|
||||||
<dict>
|
|
||||||
<key>public.filename-extension</key>
|
|
||||||
<array>
|
|
||||||
<string>html</string>
|
|
||||||
<string>htm</string>
|
|
||||||
</array>
|
|
||||||
<key>public.mime-type</key>
|
|
||||||
<array>
|
|
||||||
<string>text/html</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>UTTypeConformsTo</key>
|
|
||||||
<array>
|
|
||||||
<string>public.source-code</string>
|
|
||||||
</array>
|
|
||||||
<key>UTTypeDescription</key>
|
|
||||||
<string>CSS</string>
|
|
||||||
<key>UTTypeIdentifier</key>
|
|
||||||
<string>org.w3.css</string>
|
|
||||||
<key>UTTypeTagSpecification</key>
|
|
||||||
<dict>
|
|
||||||
<key>public.filename-extension</key>
|
|
||||||
<array>
|
|
||||||
<string>css</string>
|
|
||||||
</array>
|
|
||||||
<key>public.mime-type</key>
|
|
||||||
<array>
|
|
||||||
<string>text/css</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -221,7 +221,24 @@ NSLayoutManager *cocoa_prepare_layout_manager( const char *bytes, size_t length,
|
||||||
|
|
||||||
static inline NSFont *cocoa_font_get_nsfont( const plot_font_style_t *style )
|
static inline NSFont *cocoa_font_get_nsfont( const plot_font_style_t *style )
|
||||||
{
|
{
|
||||||
NSFont *font = [NSFont systemFontOfSize: 12]; /* eukara: font size hack. idc */
|
NSFont *font;
|
||||||
|
int fontsize = ((style->size * 1.25) / PLOT_STYLE_SCALE);
|
||||||
|
|
||||||
|
/* limit the range between 8 and 12 */
|
||||||
|
/*if (fontsize <= 8)
|
||||||
|
fontsize = 8;
|
||||||
|
else if (fontsize <= 9)
|
||||||
|
fontsize = 9;
|
||||||
|
else */if (fontsize <= 10)
|
||||||
|
fontsize = 10;
|
||||||
|
else
|
||||||
|
fontsize = 12;
|
||||||
|
|
||||||
|
/* handle code brackets */
|
||||||
|
if (style->family == PLOT_FONT_FAMILY_MONOSPACE)
|
||||||
|
font = [NSFont userFixedPitchFontOfSize: fontsize];
|
||||||
|
else
|
||||||
|
font = [NSFont systemFontOfSize: fontsize];
|
||||||
|
|
||||||
NSFontTraitMask traits = 0;
|
NSFontTraitMask traits = 0;
|
||||||
if (style->flags & FONTF_ITALIC || style->flags & FONTF_OBLIQUE) traits |= NSItalicFontMask;
|
if (style->flags & FONTF_ITALIC || style->flags & FONTF_OBLIQUE) traits |= NSItalicFontMask;
|
||||||
|
|
Loading…
Reference in New Issue