diff options
author | Ariel Calzada <ariel@acivitycentral.com> | 2013-01-03 18:21:35 (GMT) |
---|---|---|
committer | Ariel Calzada <ariel@acivitycentral.com> | 2013-01-03 18:21:35 (GMT) |
commit | 65c9010dece5720b64093e4ba7cff3e90bdf0f59 (patch) | |
tree | b00fb9933bf7bd28433da8693b2f7246ecf86ef1 /webactivity.py | |
parent | 6f324e9f859319778c201951051685d376c8e4db (diff) |
sdxo#2572: Add 'Load_URI' signal-handler in 'Browse' activity. When this signal is received (with the 'uri' as the argument),this 'uri' is reloaded in the 'Browse' instance.
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webactivity.py b/webactivity.py index c5f13c1..fc60069 100644 --- a/webactivity.py +++ b/webactivity.py @@ -20,6 +20,7 @@ import logging from gettext import gettext as _ from gettext import ngettext import os +import dbus from gi.repository import GObject GObject.threads_init() @@ -252,6 +253,12 @@ class WebActivity(activity.Activity): # http://bugs.sugarlabs.org/ticket/3973 self._cleanup_temp_files() + dbus.SessionBus().add_signal_receiver(self._load_uri, 'Load_URI', + IFACE) + + def _load_uri(self, uri): + self._link_clicked_cb(None, uri) + def _cleanup_temp_files(self): """Removes temporary files generated by Download Manager that were cancelled by the user or failed for any reason. |