How make a full screen Flash activity opened using hulahop.webview.WebView close from Flash?
gonzalo at laptop.org
Thu May 16 10:47:42 EDT 2013
Do you need your activity run in old Sugar versions?
Because hulahop is deprecated, and new Browse use webkit.
On Thu, May 16, 2013 at 11:40 AM, Frank Cancio <frank at gsc.uy> wrote:
> Hi all,
> I have Flash activity in which all user interaction is done through
> Flash. Basically what I did was create a hulahop.webview.WebView
> instance and make it load a HTML (see code at the end) that load a
> .swf file in full screen. So far so good, the problem come when I try
> close the entire activity from inside Flash UI (with a close button).
> sentence and then from the Flash app "execute it". I create a simple
> HTML file with just a button and a "window.close();" in the onclick
> event and make it work using the Browse activity. For that, I changed
> the gecko profile used by the Browse activity (setting the variable
> "dom.allow_scripts_to_close_windows" to true). That made possible
> close the entire Browse activity using the "window.close();"
> even I made it using the same profile that worked for the Browse
> my activity.
> I think that the problem is related to the way my activity manager the
> hulahop.webview.WebView instance. I know Python but I'm a completely
> newbie in GTK, Sugar and hulahop, and is hard to me find out the
> problem. I write to this list hoping that someone with the enough
> experience in those tech could take few minutes and help me.
> Thanks in advance
> hulahop.startup(os.path.join(env.get_profile_path(), 'gecko'))
> from hulahop.webview import WebView
> HTML = os.getcwd()+'/index.html'
> class SierratestActivity(activity.Activity):
> def __init__(self, handle):
> activity.Activity.__init__(self, handle, False)
> canvas = gtk.HBox()
> self.browser = WebBrowser()
> self.connect("destroy", self.destroy)
> def destroy(self, widget=None):
> class WebBrowser():
> def __init__(self):
> self.browser = None
> def getBrowser(self):
> self.browser = WebView()
> return self.browser
> Devel mailing list
> Devel at lists.laptop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel