rewrote settings and daemon - Bug #11109
[wifi-assistant] / package / src / wifi_assistant / launcher.py
1 #!/usr/bin/python2.5
2 from gnome import gconf
3 import osso
4
5 class Launcher():
6     
7     """Opens a URL in a browser."""
8     
9     def __init__(self):
10         pass
11     
12     # ---- public API __________________________________________________________
13     
14     def launchBrowser(self, browser_name, browser_options):
15         """Uses the specified browser and makes the calls specified in the browser_options"""
16         # TODO: 
17         
18         url = browser_options['url']
19         self.openUrl(url)
20
21     
22     def openUrl(self, url):
23         """Uses the default browser to open the specified url."""
24         
25         osso_context = osso.Context("org.maemo.touchsearch", "1.1", False)
26         osso_rpc = osso.Rpc(osso_context)
27         osso_rpc.rpc_run_with_defaults("osso_browser", "open_new_window", (url,))
28