Mercurial > libervia-desktop-kivy
comparison 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 |
comparison
equal
deleted
inserted
replaced
3:accbc3c18762 | 4:440a743b58ee |
---|---|
62 | 62 |
63 self.host.launchAction(C.AUTHENTICATE_PROFILE_ID, callback=authenticate_cb, profile=view.text) | 63 self.host.launchAction(C.AUTHENTICATE_PROFILE_ID, callback=authenticate_cb, profile=view.text) |
64 | 64 |
65 | 65 |
66 class ConnectButton(Button): | 66 class ConnectButton(Button): |
67 pass | 67 |
68 def __init__(self, ps): | |
69 self.ps = ps | |
70 super(ConnectButton, self).__init__() | |
68 | 71 |
69 | 72 |
70 class NewProfileScreen(Screen): | 73 class NewProfileScreen(Screen): |
71 profile_name = properties.ObjectProperty(None) | 74 profile_name = properties.ObjectProperty(None) |
72 jid = properties.ObjectProperty(None) | 75 jid = properties.ObjectProperty(None) |
138 selection_mode='multiple', | 141 selection_mode='multiple', |
139 allow_empty_selection=True, | 142 allow_empty_selection=True, |
140 ) | 143 ) |
141 super(ProfilesScreen, self).__init__(name=u'profiles') | 144 super(ProfilesScreen, self).__init__(name=u'profiles') |
142 self.layout.add_widget(listview.ListView(adapter=self.list_adapter)) | 145 self.layout.add_widget(listview.ListView(adapter=self.list_adapter)) |
143 connect_btn = ConnectButton() | 146 connect_btn = ConnectButton(self) |
144 self.layout.add_widget(connect_btn) | 147 self.layout.add_widget(connect_btn) |
145 | 148 |
146 def reload(self): | 149 def reload(self): |
147 """Reload profiles list""" | 150 """Reload profiles list""" |
148 profiles = self.pm.host.bridge.getProfilesList() | 151 profiles = self.pm.host.bridge.getProfilesList() |