mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
Re-jig URL launch as would never have fallen back to using openurl.library.
Add it as an option instead. svn path=/trunk/netsurf/; revision=13882
This commit is contained in:
parent
b4977fbdcc
commit
f6b15c1061
@ -584,7 +584,7 @@ int32 ami_font_width_glyph(struct OutlineFont *ofont,
|
||||
TAG_END) == 0)
|
||||
{
|
||||
gwnode = GetHead((struct MinList *)gwlist);
|
||||
char1w = gwnode->gwe_Width;
|
||||
if(gwnode) char1w = gwnode->gwe_Width;
|
||||
|
||||
kern = 0;
|
||||
|
||||
|
@ -29,10 +29,12 @@
|
||||
#include <proto/dos.h>
|
||||
#include <proto/utility.h>
|
||||
#include <proto/openurl.h>
|
||||
#include <utils/url.h>
|
||||
|
||||
struct Library *OpenURLBase;
|
||||
struct OpenURLIFace *IOpenURL;
|
||||
#include "desktop/options.h"
|
||||
#include "utils/url.h"
|
||||
|
||||
struct Library *OpenURLBase = NULL;
|
||||
struct OpenURLIFace *IOpenURL = NULL;
|
||||
|
||||
struct MinList ami_unsupportedprotocols;
|
||||
|
||||
@ -106,9 +108,9 @@ void ami_openurl_open(void)
|
||||
{
|
||||
struct ami_protocol *ami_p;
|
||||
|
||||
if(OpenURLBase = OpenLibrary("openurl.library",0))
|
||||
{
|
||||
IOpenURL = (struct OpenURLIFace *)GetInterface(OpenURLBase,"main",1,NULL);
|
||||
if(nsoption_bool(use_openurl_lib)) {
|
||||
if(OpenURLBase = OpenLibrary("openurl.library",0))
|
||||
IOpenURL = (struct OpenURLIFace *)GetInterface(OpenURLBase,"main",1,NULL);
|
||||
}
|
||||
|
||||
NewMinList(&ami_unsupportedprotocols);
|
||||
@ -131,18 +133,17 @@ void gui_launch_url(const char *url)
|
||||
|
||||
if(ami_openurl_check_list(&ami_unsupportedprotocols, url) == FALSE)
|
||||
{
|
||||
launchurl = ASPrintf("URL:%s",url);
|
||||
|
||||
if(launchurl)
|
||||
if(IOpenURL)
|
||||
{
|
||||
fptr = Open(launchurl,MODE_OLDFILE);
|
||||
if(fptr) Close(fptr);
|
||||
else ami_openurl_add_protocol(url);
|
||||
}
|
||||
else if(IOpenURL)
|
||||
URL_OpenA((STRPTR)url,NULL);
|
||||
|
||||
FreeVec(launchurl);
|
||||
} else {
|
||||
if(launchurl = ASPrintf("URL:%s",url)) {
|
||||
fptr = Open(launchurl,MODE_OLDFILE);
|
||||
if(fptr) Close(fptr);
|
||||
else ami_openurl_add_protocol(url);
|
||||
FreeVec(launchurl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetProcWindow(procwin);
|
||||
|
@ -29,12 +29,14 @@
|
||||
char *use_pubscreen; \
|
||||
char *modeid; \
|
||||
int screen_compositing; \
|
||||
int amiga_ydpi; \
|
||||
int cache_bitmaps; \
|
||||
char *theme; \
|
||||
bool utf8_clipboard; \
|
||||
bool context_menu; \
|
||||
bool truecolour_mouse_pointers; \
|
||||
bool use_os_pointers; \
|
||||
bool use_openurl_lib; \
|
||||
bool new_tab_active; \
|
||||
bool new_tab_last; \
|
||||
bool kiosk_mode; \
|
||||
@ -68,7 +70,6 @@
|
||||
int cookies_window_ysize; \
|
||||
int cairo_renderer; \
|
||||
bool direct_render; \
|
||||
int amiga_ydpi; \
|
||||
int redraw_tile_size_x; \
|
||||
int redraw_tile_size_y; \
|
||||
int monitor_aspect_x; \
|
||||
@ -83,12 +84,14 @@
|
||||
.use_pubscreen = NULL, \
|
||||
.modeid = NULL, \
|
||||
.screen_compositing = -1, \
|
||||
.amiga_ydpi = 72, \
|
||||
.cache_bitmaps = 0, \
|
||||
.theme = NULL, \
|
||||
.utf8_clipboard = false, \
|
||||
.context_menu = true, \
|
||||
.truecolour_mouse_pointers = false, \
|
||||
.use_os_pointers = true, \
|
||||
.use_openurl_lib = false, \
|
||||
.new_tab_active = false, \
|
||||
.new_tab_last = false, \
|
||||
.kiosk_mode = false, \
|
||||
@ -122,7 +125,6 @@
|
||||
.cookies_window_ysize = 0, \
|
||||
.cairo_renderer = 1, \
|
||||
.direct_render = false, \
|
||||
.amiga_ydpi = 72, \
|
||||
.redraw_tile_size_x = 400, \
|
||||
.redraw_tile_size_y = 150, \
|
||||
.monitor_aspect_x = 0, \
|
||||
@ -136,12 +138,14 @@
|
||||
{ "use_pubscreen", OPTION_STRING, &nsoptions.use_pubscreen}, \
|
||||
{ "screen_modeid", OPTION_STRING, &nsoptions.modeid}, \
|
||||
{ "screen_compositing", OPTION_INTEGER, &nsoptions.screen_compositing}, \
|
||||
{ "screen_ydpi", OPTION_INTEGER, &nsoptions.amiga_ydpi}, \
|
||||
{ "cache_bitmaps", OPTION_INTEGER, &nsoptions.cache_bitmaps}, \
|
||||
{ "theme", OPTION_STRING, &nsoptions.theme}, \
|
||||
{ "clipboard_write_utf8", OPTION_BOOL, &nsoptions.utf8_clipboard}, \
|
||||
{ "context_menu", OPTION_BOOL, &nsoptions.context_menu}, \
|
||||
{ "truecolour_mouse_pointers", OPTION_BOOL, &nsoptions.truecolour_mouse_pointers}, \
|
||||
{ "os_mouse_pointers", OPTION_BOOL, &nsoptions.use_os_pointers}, \
|
||||
{ "use_openurl_lib", OPTION_BOOL, &nsoptions.use_openurl_lib}, \
|
||||
{ "new_tab_is_active", OPTION_BOOL, &nsoptions.new_tab_active}, \
|
||||
{ "new_tab_last", OPTION_BOOL, &nsoptions.new_tab_last}, \
|
||||
{ "kiosk_mode", OPTION_BOOL, &nsoptions.kiosk_mode}, \
|
||||
@ -175,7 +179,6 @@
|
||||
{ "cookies_window_ysize", OPTION_INTEGER, &nsoptions.cookies_window_ysize}, \
|
||||
{ "cairo_renderer", OPTION_INTEGER, &nsoptions.cairo_renderer}, \
|
||||
{ "direct_render", OPTION_BOOL, &nsoptions.direct_render}, \
|
||||
{ "amiga_ydpi", OPTION_INTEGER, &nsoptions.amiga_ydpi}, \
|
||||
{ "redraw_tile_size_x", OPTION_INTEGER, &nsoptions.redraw_tile_size_x}, \
|
||||
{ "redraw_tile_size_y", OPTION_INTEGER, &nsoptions.redraw_tile_size_y}, \
|
||||
{ "monitor_aspect_x", OPTION_INTEGER, &nsoptions.monitor_aspect_x}, \
|
||||
|
Loading…
Reference in New Issue
Block a user