blob: 57df17314ac3a4f2f696ef9066805d214f90ed82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
From 40215fa274b74a54da9cfdaa5f4733952395fddb Mon Sep 17 00:00:00 2001
From: Ajay Garg <ajay@activitycentral.com>
Date: Wed, 26 Dec 2012 23:35:50 +0530
Subject: [PATCH 1/3] 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.
---
webactivity.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/webactivity.py b/webactivity.py
index 3c0d337..7024b40 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()
@@ -247,6 +248,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.
--
1.7.10.4
|