comparison cagou/plugins/plugin_wid_file_sharing.py @ 214:6a98d70a3a66

file sharing: display a message when not sharing device has been found
author Goffi <goffi@goffi.org>
date Fri, 25 May 2018 15:54:50 +0200
parents 423d462ea739
children 286f14127f61
comparison
equal deleted inserted replaced
213:423d462ea739 214:6a98d70a3a66
341 entity_jid = jid.JID(entity_str) 341 entity_jid = jid.JID(entity_str)
342 item = DeviceWidget(self, 342 item = DeviceWidget(self,
343 entity_jid, 343 entity_jid,
344 Identities(entity_ids)) 344 Identities(entity_ids))
345 self.layout.add_widget(item) 345 self.layout.add_widget(item)
346 if not entities_services and not entities_own and not entities_roster:
347 self.layout.add_widget(Label(
348 size_hint=(1, 1),
349 halign='center',
350 text_size=self.size,
351 text=_(u"No sharing device found")))
346 352
347 def discover_devices(self): 353 def discover_devices(self):
348 """Looks for devices handling file "File Information Sharing" and display them""" 354 """Looks for devices handling file "File Information Sharing" and display them"""
349 try: 355 try:
350 namespace = self.host.ns_map['fis'] 356 namespace = self.host.ns_map['fis']