[Sugar-devel] [PATCH Sugar] Extend sugar-launch with more options

Martin Abente martin.abente.lahaye at gmail.com
Wed Jan 19 12:05:47 EST 2011


On Wed, Jan 19, 2011 at 1:18 PM, Sascha Silbe <
sascha-ml-reply-to-2011-1 at silbe.org> wrote:

> Excerpts from Martin Abente's message of Wed Jan 19 16:20:35 +0100 2011:
>
> > Add activity_id, object_id and uri options.
> >
> > This patch is necessary in order to use Browse
> > as the default http uri handler in sugar.
>
> Can you give a bit more detail about why it is needed and what it's
> used for, please?
>

It is needed because is a common feature in many activities, so there will
be no need to re-write this on each activity.


> Who would invoke the "default http uri handler" and when / why?
>
>
When you right-click on any link, and use the "open link" option,
gtk.show_uri will be called, internally this calls to
gio.app_info_get_default_for_uri_scheme('http'), and its internal
implementation takes the arguments from the gconf  (harcoded) value path:
/desktop/gnome/uri-handlers/http/command.

Then all we need to do is to replacing the gconf value for "sugar-launch
org.laptop.WebActivity --uri %s" and voila!

Even though this method is problematic in sugar+gnome builds, we can still
use sugar-launch (with this patch) to open custom links with browse  (or any
other sugarized browser) passing the --uri argument.

I am sure other activities can benefit from this patch too.

Sascha
>
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110119/d5134ede/attachment.html>


More information about the Sugar-devel mailing list