1. EuGTK - launch_default_browser ?

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?

new topic     » topic index » view message » categorize

2. Re: EuGTK - launch_default_browser ?

why not look at the source for launch_default_browser() and see what APIs it calls?

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuGTK - launch_default_browser ?

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.

new topic     » goto parent     » topic index » view message » categorize

4. Re: EuGTK - launch_default_browser ?

irv said...

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.

new topic     » goto parent     » topic index » view message » categorize

5. Re: EuGTK - launch_default_browser ?

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.

or ftp://ftp.foonet.net/myfile

or mailto:you@your.isp

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu