Skip to content

Instantly share code, notes, and snippets.

@Eugeny
Created March 25, 2010 11:03
Show Gist options
  • Save Eugeny/343429 to your computer and use it in GitHub Desktop.
Save Eugeny/343429 to your computer and use it in GitHub Desktop.
diff --git a/ajenti/ui/classes.py b/ajenti/ui/classes.py
index c8f46a9..4b31f00 100755
--- a/ajenti/ui/classes.py
+++ b/ajenti/ui/classes.py
@@ -50,6 +50,11 @@ class Html(object):
return Element(name, *args, **kwargs)
+class UI(object):
+ def __getattr__(self, name):
+ return lambda *args, **kwargs: Element(name.lower(), *args, **kwargs)
+
+
class Text(Element):
""" FIXME: xml.dom.minidom does not provide plain text element """
def __init__(self, text):
@@ -97,12 +102,6 @@ class Image(Element):
self._init(src=image)
-class Spacer(Element):
- def __init__(self, width=1, height=1):
- Element.__init__(self, 'spacer')
- self._init(width=str(width), height=str(height))
-
-
class Label(Element):
def __init__(self, text='', size=1):
Element.__init__(self, 'label')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment