If you use the helper script, you can modify the ARexx to open a new tab in the current window (I should be able to make this an option for the executable too, IIRC it's just "OPEN url NEWTAB" rather than "OPEN url NEWWINDOW") (edit done, set tab_new_session:1 in Choices)
Erm.. yes, ARexx knows what the current window is
The hotlist window would need some core modification, I think also for new tab (which is why I've left your feature request alone rather than assigning it to myself), and there would need to be some frontend API to find out what the "current" window is (and you'd need to add that for all the frontends).
The hotlist window would need some core modification, I think also for new tab
Why? Since arexx knows about the current window and newtab etc. what I would do is take the output varibles from the hotlist code and either send an internal arexx message, create an arexx script in t: execute it and delete it, write a script to accept variables and leave it in t: while NetDurf is running or even (shudder) use Execute(). Even a simple thing like this (in blitz, don't know C) should do the job:-
@Severin I think some people are missing what Chris means by "core". Netsurf is designed to work on multiple operating systems. There is "core" code that is common to all operating systems and front-end code for each individual operating system. He said that the Hotlist window is completely seperate from the browser windows and that he would need to change some "core" code; which I believe means that changes could affect all other operating systems. If the admins of the Netsurf repository don't want core code changed or Chris would need to change the front-end code for all the other operating systems then it's not really practical. The "core" code and the other front-ends probably don't even know that ARexx exists in the Amiga front-end.
I think Chris has some limitations on what he can change without making it difficult to incorporate changes and improvements from the "core" Netsurf code. Maybe I've botched the explanation but Chris can correct me if I'm wrong.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
If you use the helper script, you can modify the ARexx to open a new tab in the current window
I don't see the need for the ARexx script at all. AmigaOS4.1's URLopen system is designed with the intention that programs will send THEMSELVES messages, if they notice there is already a copy of themselves open.
That being the case, why can't NetSurf open a new tab in the current window, rather than (as it currently does) opening a new window, when I do the following: AppDir:NetSurf URL="http://www.amigans.net"
And yes, I realise this would require another Settings option, something along the lines of "Open a new tab instead of a window (where possible)".
@Chris I suspect that Srtest either has a corrupt guigfx.library or has the OS3 version of guigfx.library installed instead of the OS4 version.
I examined the code in libs.c and your library/interface opening MACRO will fail and return if the library opening fails but if the interface opening fails it just logs the failure and continues. A crash then ensures.
It looks like the problem only occurs if the user has an OS3 version of a library instead of the OS4 version. I expanded the MACRO for the guigfx.library opening with GCC and got this:
if((GuiGFXBase = (struct GuiGFXBase *)OpenLibrary("guigfx.library", 9)))
{
IGuiGFX = (struct GuiGFXIFace *)GetInterface((struct Library *)GuiGFXBase, "main", 1, ((void *)0));
if(IGuiGFX == ((void *)0))
{
do
{
if (verbose_log)
{
nslog_log("libs.c", __PRETTY_FUNCTION__, 230, "Failed to get %s interface v%d of %s" , "main", 1, "guigfx.library");
}
}
while(0);
}
}
else
{
do
{
if (verbose_log)
{
nslog_log("libs.c", __PRETTY_FUNCTION__, 230, "Failed to open %s v%d" ,"guigfx.library", 9);
}
}
while(0);
if(0 == 1)
{
STRPTR error = ASPrintf("Unable to open %s v%ld (fatal error)", "guigfx.library", 9);
ami_misc_fatal_error(error);
FreeVec(error);
return 0;
}
}
The expansion seems to make it clear that Netsurf just continues if there is a library but no interface.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
@Srtest Even though I guessed wrong about your problem I would still suggest to Chris that he add to his library opening MACRO an error return if the interface fails to open.
I noticed that guigfx.library seems to open render.library if it's available. In your crashlog under the libraries section I see this:
0x5e66f760: render.library V31.0 (Legacy)
which appears to be an earlier OS3 version of the render.library. On my system I have render.library V40.8 [AmigaOS4]. I suggest you download renderlib.lha from OS4Depot and install the OS4 version of render.library. Maybe that will help. If not, I'm out of ideas and you'll have to wait for Chris to respond.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
Downloaded from os4depot, made sure (I guess again) it's the os4 one - it works! thank you!
p.s.
I know it looks like I'm some kind of moron who uses libraries without a regard to their architecture but it is actually the opposite as I've done a lot of research on libraries and developments also because of trying to improve my OS3 emulation experience on the X1000, and came around all those pointers about the render library being worse then the older one (the newer one actually was in my LIBS library marked as old...) and that the older OS3 one works better. I don't remember I might actually use some OS3 stuff (like go fetch) that uses those libraries and from everything I've read I never came across a severe warning about using OS3 libraries. This is the first time something like this happened.
Another thing if I'm at it: with NetSurf 3.5 I was able to use a JS-less version of duckduckgo. Now with latest build I can't, and with this site http://www.gameboomers.com/ pictures and text doesn't match (that also might have been the case in 3.5).
This is the first time something like this happened.
There's a first time for everything I have some OS3 libraries that are needed by some old OS3 programs I still use ocasionally.
The guigfxlib.lha archive at OS4depot comes with the sourcecode and I can see that it makes the same mistake as Netsurf; it checks if libraries open successfully but doesn't check if the OS4 interfaces open successfully. It's not that unusual for people to have OS3 libraries installed for old programs and not notice that there are OS4 versions for some of them.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
Thanks, I'll fix that when I have some time. It appears the problem is sorted, but guigfx isn't used unless in an 8-bit mode, so not opening the interface would be unlikely to cause it to crash anyway.
@Chris Thanks, I can now use URLopen (as it was intended) with NetSurf :)
NetSurf starts almost instantly for me, so not a problem. But for slower machines I could probably adapt my OdysseyLauncherPE to NetSurf, if there was interest...
@Chris "tab_new_session:1" does not bring the screen to the front, when the window is already open.
And a separate thing: When I have "Open new tabs in background" enabled, is it possible for "Project/New tab" to still come to the front? (No need for an option IMHO, if I open a new tab then surely I'll want to use it straight away - there is NO use leaving an empty tab running in the background, unlike a tab loading a web page.)