changeset 108:953ddf817b8a

cagou widget: added onHeaderInputComplete method which is called when text is changed, and should be used for completion
author Goffi <goffi@goffi.org>
date Sun, 15 Jan 2017 21:21:25 +0100
parents f0cf44df8486
children 7631325e11f4
files src/cagou/core/cagou_widget.py src/cagou/kv/cagou_widget.kv
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cagou/core/cagou_widget.py	Sun Jan 15 21:21:22 2017 +0100
+++ b/src/cagou/core/cagou_widget.py	Sun Jan 15 21:21:25 2017 +0100
@@ -68,8 +68,10 @@
     def onHeaderInput(self):
         log.info(u"header input text entered")
 
+    def onHeaderInputComplete(self, wid, text):
+        return
+
     def on_touch_down(self, touch):
         if self.collide_point(*touch.pos):
             G.host.selected_widget = self
         super(CagouWidget, self).on_touch_down(touch)
-
--- a/src/cagou/kv/cagou_widget.kv	Sun Jan 15 21:21:22 2017 +0100
+++ b/src/cagou/kv/cagou_widget.kv	Sun Jan 15 21:21:25 2017 +0100
@@ -57,3 +57,4 @@
             id: header_input
             multiline: False
             on_text_validate: root.onHeaderInput()
+            on_text: root.onHeaderInputComplete(*args)