Maybe check on how Tomeu did his EatBloom activity: http://shell.sugarlabs.org/~tomeu/EatBoom-1.xo
-walter On Thu, May 16, 2013 at 11:40 AM, Frank Cancio <fr...@gsc.uy> wrote: > Thanks again for your reply Gonzalo. Anyway I will keep trying to > figure out what the problem is, because is important for the > application run in full screen. > > Best regards > Frank > > On Thu, May 16, 2013 at 12:33 PM, Gonzalo Odiard <gonz...@laptop.org> wrote: >> My best advice is use a standard toolbar and your webview. >> The standard toolbar not only contain the stop button, >> also the title and description widgets, >> important to journal interaction, >> and provide consistency with other activities. >> >> Gonzalo >> >> >> On Thu, May 16, 2013 at 11:58 AM, Frank Cancio <fr...@gsc.uy> wrote: >>> >>> Thanks for your quick reply! >>> >>> Yes, my app will run on a XO-1, Sugar 0.94.1. >>> >>> Best regards >>> Frank >>> >>> On Thu, May 16, 2013 at 11:47 AM, Gonzalo Odiard <gonz...@laptop.org> >>> wrote: >>> > Do you need your activity run in old Sugar versions? >>> > Because hulahop is deprecated, and new Browse use webkit. >>> > >>> > Gonzalo >>> > >>> > >>> > On Thu, May 16, 2013 at 11:40 AM, Frank Cancio <fr...@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). >>> >> >>> >> One solution I saw was try to enable the "window.close();" JavaScript >>> >> 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();" >>> >> JavaScript sentence. I did the same with my activity but nothing, >>> >> even I made it using the same profile that worked for the Browse >>> >> activity, but the "window.close();" JavaScript sentence don't work in >>> >> 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 >>> >> Frank >>> >> >>> >> 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.set_canvas(canvas) >>> >> >>> >> self.browser = WebBrowser() >>> >> >>> >> >>> >> canvas.pack_start(self.browser.getBrowser(),True,True,0) >>> >> self.connect("destroy", self.destroy) >>> >> self.show_all() >>> >> >>> >> def destroy(self, widget=None): >>> >> sys.exit(0) >>> >> >>> >> >>> >> class WebBrowser(): >>> >> def __init__(self): >>> >> self.browser = None >>> >> >>> >> def getBrowser(self): >>> >> self.browser = WebView() >>> >> self.browser.load_uri(HTML) >>> >> >>> >> >>> >> >>> >> return self.browser >>> >> _______________________________________________ >>> >> Devel mailing list >>> >> Devel@lists.laptop.org >>> >> http://lists.laptop.org/listinfo/devel >>> > >>> > >> >> > _______________________________________________ > Devel mailing list > Devel@lists.laptop.org > http://lists.laptop.org/listinfo/devel -- Walter Bender Sugar Labs http://www.sugarlabs.org _______________________________________________ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel