maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   How to start web browser from within the code? (https://talk.maemo.org/showthread.php?t=63853)

jqb 2010-10-15 11:26

How to start web browser from within the code?
 
I'm adding button to application written in C.
The button should fire up the web browser with the given url.

Any suggestions how can I do it?

CepiPerez 2010-10-15 11:28

Re: How to start web browser from within the code?
 
use system() with a dbus-send command

dannym 2010-10-21 10:12

Re: How to start web browser from within the code?
 
Or for a non-security-problem-way, use spawnvp(), which won't have problems with spaces and/or weird quotes and/or mistaking commands for environment variables / bash commands / .... like system() does.

Mentalist Traceur 2010-10-21 19:59

Re: How to start web browser from within the code?
 
Wasn't there a simple shell command that would do the same thing?

MohammadAG 2010-10-22 07:45

Re: How to start web browser from within the code?
 
http://mxr.moego.org/fremantle/sourc...interface.h#27

rambo 2010-10-22 10:09

Re: How to start web browser from within the code?
 
Wouldn't it be better to make the DBUS call from the C-program directly rather than going through shell ?

lardman 2010-10-22 10:25

Re: How to start web browser from within the code?
 
Code:

QDBusInterface *interface = new QDBusInterface("com.nokia.osso_browser","/com/nokia/osso_browser/request","com.nokia.osso_browser");
interface->call("open_new_window",uri);



All times are GMT. The time now is 20:21.

vBulletin® Version 3.8.8