diff src/cagou/core/cagou_widget.py @ 20:29b507826eed

header's input field is now accessible with self.header_input and call onHeaderInput() on text entered
author Goffi <goffi@goffi.org>
date Mon, 08 Aug 2016 01:02:23 +0200
parents ba14b596b90e
children d09bd16dbbe2
line wrap: on
line diff
--- a/src/cagou/core/cagou_widget.py	Mon Aug 08 00:58:59 2016 +0200
+++ b/src/cagou/core/cagou_widget.py	Mon Aug 08 01:02:23 2016 +0200
@@ -23,6 +23,7 @@
 from kivy.uix.button import Button
 from kivy.uix.boxlayout import BoxLayout
 from kivy.uix.dropdown import DropDown
+from kivy import properties
 from cagou import G
 
 
@@ -41,6 +42,7 @@
 
 
 class CagouWidget(BoxLayout):
+    header_input = properties.ObjectProperty(None)
 
     def __init__(self):
         BoxLayout.__init__(self, orientation="vertical")
@@ -49,5 +51,8 @@
     def switchWidget(self, plugin_info):
         self.selector.dismiss()
         factory = plugin_info["factory"]
-        new_widget = factory(plugin_info, None, None)
+        new_widget = factory(plugin_info, None, iter(G.host.profiles))
         G.host.switchWidget(self, new_widget)
+
+    def onHeaderInput(self):
+        log.info(u"header input text entered")