From 4755ddff4c490c22ada880a26225e8bd72805ffb Mon Sep 17 00:00:00 2001 From: Vincent Vinet Date: Mon, 26 Oct 2009 20:24:02 +0000 Subject: new UAM, archive it and forget it --- (limited to 'tutorius/uam/gtkparser.py') diff --git a/tutorius/uam/gtkparser.py b/tutorius/uam/gtkparser.py index ede2f03..3da852a 100644 --- a/tutorius/uam/gtkparser.py +++ b/tutorius/uam/gtkparser.py @@ -25,8 +25,6 @@ The gtk subscheme for tutorius is where: - is the uam.SCHEME + "." + SCHEME - is the activity's dns identifier, such as battleship.tutorius.org is the Hierarchical path to the widget, where 0 is the activity, such as /0/0/1/0/1/0 @@ -36,9 +34,17 @@ where: must be used with params to specify which action or eventfilter to use, such as "DialogMessage" """ +from . import UAMParser, addon + -SCHEME="gtk" +class GtkParser(UAMParser): + __scheme__ = "gtk" -def parse_gtk(parsed_uri): - """Do nothing for now""" - return parsed_uri + @classmethod + def getAddon(cls, uri): + """Parse an uri + @param uri URI object + """ + params = UAMParser.stripQueryLists(uri.query) + path = uri.path.replace("/",".") + return addon.create(uri.addon, object_id=uri.path, **params) -- cgit v0.9.1