[Sugar-devel] opening a url with WebActivity

C. Scott Ananian cscott at laptop.org
Mon Aug 15 11:42:00 EDT 2011


On Fri, Aug 12, 2011 at 2:34 PM, Erik Blankinship <erikb at mediamods.com> wrote:
>> FWIW you can take a look at the activity
>> http://activities.sugarlabs.org/en-US/sugar/addon/4455
>>
>
> Thank you Rafael.  Good idea.
> As you suggest, this activity opens URLs inside of the current activity.
> hulahop.startup(os.path.join(env.get_profile_path(), 'gecko'))
> from hulahop.webview import WebView
>         self.webview = WebView()
> self.set_canvas(self.webview)
>         self.webview.show()
>         self.webview.load_uri('http://google.com')
> I am not sure if this approach will continue to work after the coming move
> from firefox to webkit.  Can anyone speak to this?
> To avoid problems like this, I was hoping to have my current activity switch
> to the browse activity if possible.  Is this possible?

I'd suggest you use this approach for now, and switch to the intent
mechanism in the future.  Both the switch to webkit and the design of
an intent mechanism are future projects.  If they are scheduled well,
then all the places broken by the switch to webkit (not just in your
code) can be switched to use intents at the same time.
  --scott

-- 
      ( http://cscott.net )


More information about the Sugar-devel mailing list