No need to explicitly register subclasses of Widget in Kivy 1.5

This commit is contained in:
Dusty Phillips 2012-10-18 15:24:11 -06:00
parent d9bf952eba
commit 810cd555a9
1 changed files with 0 additions and 12 deletions

View File

@ -16,17 +16,6 @@ CONTAINER_CLASSES = [c[:-3] for c in os.listdir('container_kvs')
if c.endswith('.kv')]
def factoryable(cls):
'''Class decorator that automatically records
the resultant class in the Factory.
This allows the class to be accessed
inside the .kv language file in the Builder.
'''
Factory.register(cls.__name__, cls)
return cls
@factoryable
class Container(BoxLayout):
'''A container is essentially a class that loads its root from a known
.kv file.
@ -55,7 +44,6 @@ for class_name in CONTAINER_CLASSES:
globals()[class_name] = type(class_name, (Container,), {})
@factoryable
class KivyRenderTextInput(TextInput):
def _keyboard_on_key_down(self, window, keycode, text, modifiers):
is_osx = sys.platform == 'darwin'