diff src/profile_manager.py @ 4:440a743b58ee

Profile manager: Connect button is disabled when no profile is selected
author Goffi <goffi@goffi.org>
date Thu, 07 Jul 2016 09:39:21 +0200
parents 8f9ed634a5eb
children 33b619506832
line wrap: on
line diff
--- a/src/profile_manager.py	Thu Jul 07 09:39:21 2016 +0200
+++ b/src/profile_manager.py	Thu Jul 07 09:39:21 2016 +0200
@@ -64,7 +64,10 @@
 
 
 class ConnectButton(Button):
-    pass
+
+    def __init__(self, ps):
+        self.ps = ps
+        super(ConnectButton, self).__init__()
 
 
 class NewProfileScreen(Screen):
@@ -140,7 +143,7 @@
                                               )
         super(ProfilesScreen, self).__init__(name=u'profiles')
         self.layout.add_widget(listview.ListView(adapter=self.list_adapter))
-        connect_btn = ConnectButton()
+        connect_btn = ConnectButton(self)
         self.layout.add_widget(connect_btn)
 
     def reload(self):