Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/uam/gtkparser.py
diff options
context:
space:
mode:
authorVincent Vinet <vince.vinet@gmail.com>2009-10-26 20:24:02 (GMT)
committer Vincent Vinet <vince.vinet@gmail.com>2009-10-26 20:24:02 (GMT)
commit4755ddff4c490c22ada880a26225e8bd72805ffb (patch)
tree5fcb84a8a8fc5ef5664c716b08436616fc35afa7 /tutorius/uam/gtkparser.py
parent704e35494433a11ecdcf675fff7cfccaa8bbd2ec (diff)
new UAM, archive it and forget itUAM
Diffstat (limited to 'tutorius/uam/gtkparser.py')
-rw-r--r--tutorius/uam/gtkparser.py18
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)