Merge branch 'master' of github.com:sugarlabs/sugar-toolkit-gtk3
This commit is contained in:
commit
5ba632a34a
@ -44,6 +44,7 @@ class WebActivity(Gtk.Window):
|
||||
|
||||
self.connect("key-press-event", self._key_press_event_cb)
|
||||
self.connect('realize', self._realize_cb)
|
||||
self.connect('destroy', self._destroy_cb)
|
||||
|
||||
context = WebKit2.WebContext.get_default()
|
||||
context.register_uri_scheme("activity", self._app_scheme_cb, None)
|
||||
@ -59,6 +60,8 @@ class WebActivity(Gtk.Window):
|
||||
|
||||
self._web_view.load_uri("activity://%s/index.html" % self._bundle_id)
|
||||
|
||||
self.set_title(activity.get_bundle_name())
|
||||
|
||||
def run_main_loop(self):
|
||||
Gtk.main()
|
||||
|
||||
@ -67,6 +70,10 @@ class WebActivity(Gtk.Window):
|
||||
SugarExt.wm_set_bundle_id(xid, self._bundle_id)
|
||||
SugarExt.wm_set_activity_id(xid, str(self._activity_id))
|
||||
|
||||
def _destroy_cb(self, window):
|
||||
self.destroy()
|
||||
Gtk.main_quit()
|
||||
|
||||
def _loading_changed_cb(self, web_view, load_event):
|
||||
if load_event == WebKit2.LoadEvent.FINISHED:
|
||||
key = os.environ["SUGAR_APISOCKET_KEY"]
|
||||
|
Loading…
Reference in New Issue
Block a user