diff options
Diffstat (limited to 'tutorius/uam/gtkparser.py')
-rw-r--r-- | tutorius/uam/gtkparser.py | 18 |
1 files changed, 12 insertions, 6 deletions
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: -<scheme> is the uam.SCHEME + "." + SCHEME - <activity> is the activity's dns identifier, such as battleship.tutorius.org <path> 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: <ptype> 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) |