comparison src/cagou/core/profile_manager.py @ 124:7f7f3b8eb154

profile manager: fixed profilesListGet bridge call following name change in bridge
author Goffi <goffi@goffi.org>
date Thu, 23 Feb 2017 07:30:37 +0100
parents af4f986d86f0
children
comparison
equal deleted inserted replaced
123:e89350dd3eca 124:7f7f3b8eb154
143 self.layout.add_widget(listview.ListView(adapter=self.list_adapter)) 143 self.layout.add_widget(listview.ListView(adapter=self.list_adapter))
144 connect_btn = ConnectButton(self) 144 connect_btn = ConnectButton(self)
145 self.layout.add_widget(connect_btn) 145 self.layout.add_widget(connect_btn)
146 self.reload() 146 self.reload()
147 147
148 def _getProfilesListCb(self, profiles): 148 def _profilesListGetCb(self, profiles):
149 profiles.sort() 149 profiles.sort()
150 self.list_adapter.data = profiles 150 self.list_adapter.data = profiles
151 151
152 def converter(self, row_idx, obj): 152 def converter(self, row_idx, obj):
153 return {'text': obj, 153 return {'text': obj,
154 'size_hint_y': None, 154 'size_hint_y': None,
155 'height': sp(40)} 155 'height': sp(40)}
156 156
157 def reload(self): 157 def reload(self):
158 """Reload profiles list""" 158 """Reload profiles list"""
159 G.host.bridge.getProfilesList(callback=self._getProfilesListCb) 159 G.host.bridge.profilesListGet(callback=self._profilesListGetCb)
160 160
161 161
162 class ProfileManager(QuickProfileManager, BoxLayout): 162 class ProfileManager(QuickProfileManager, BoxLayout):
163 163
164 def __init__(self, autoconnect=None): 164 def __init__(self, autoconnect=None):