1. EuGTK - launch_default_browser ?
- Posted by Jerry_Story Oct 03, 2010
- 1226 views
In wxEuphoria, it's almost ridiculously easy.
constant DMAK_SITE = "jtstory.fortunecity.com/programs-dmak.html" -- -- launch_default_browser(DMAK_SITE)
Or alternatively:
http://wxeuphoria.sourceforge.net/sfdocs/WXHTMLWINDOW.html#WXHTMLWINDOW
How would you do the same thing either with Euphoria networking routines or with EuGTK?
2. Re: EuGTK - launch_default_browser ?
- Posted by CoJaBo Oct 03, 2010
- 1178 views
why not look at the source for launch_default_browser() and see what APIs it calls?
3. Re: EuGTK - launch_default_browser ?
- Posted by irv Oct 03, 2010
- 1211 views
If you want the user to control this, create a link button:
constant btn2 = create(GtkLinkButton,"http://rapideuphoria.com","Euphoria")
This really does not look like a "button", just a text link. It is not necessary to "connect" this button to anything, it will call your default browser automatically when clicked.
If you want links in an about dialog:
set(aboutdlg,"Website","http://www.rapideuphoria.com") set(aboutdlg,"Website Label","Euphoria")
If you want your code to open a browser (instead of having user click), try
system_exec("xdg-open http://rapideuphoria.com",0)
The above will, at least on my computers, either open the default browser or if a browser is already open, open your url in a new window/tab.
4. Re: EuGTK - launch_default_browser ?
- Posted by Jerry_Story Oct 03, 2010
- 1223 views
If you want the user to control this, create a link button:
constant btn2 = create(GtkLinkButton,"http://rapideuphoria.com","Euphoria")
This really does not look like a "button", just a text link. It is not necessary to "connect" this button to anything, it will call your default browser automatically when clicked.
If you want links in an about dialog:
set(aboutdlg,"Website","http://www.rapideuphoria.com") set(aboutdlg,"Website Label","Euphoria")
Thanks.
If you want your code to open a browser (instead of having user click), try
system_exec("xdg-open http://rapideuphoria.com",0)
The above will, at least on my computers, either open the default browser or if a browser is already open, open your url in a new window/tab.
5. Re: EuGTK - launch_default_browser ?
- Posted by irv Oct 04, 2010
- 1142 views
By the way, the above methods can be used to open files, etc with the appropriate default app chosen automatically:
instead of a web address, use file:///home/..../myfile.txt or myfile.jpg, etc.