comparison cagou/plugins/plugin_wid_chat.py @ 414:72a6b06728ab

core: file dropping: on compatible OSes, one or more file(s) can now be dropped on the main window, it will then be transmitted to the selected widget if it has a "on_drop_file" method. This is used in chat widget to add an attachment
author Goffi <goffi@goffi.org>
date Sun, 23 Feb 2020 15:39:06 +0100
parents c466678c57b2
children 5b50b7ef2617
comparison
equal deleted inserted replaced
413:c466678c57b2 414:72a6b06728ab
528 screen_manager = self.screen_manager 528 screen_manager = self.screen_manager
529 screen_manager.transition.direction = 'down' 529 screen_manager.transition.direction = 'down'
530 screen_manager.current = 'chat_selector' 530 screen_manager.current = 'chat_selector'
531 return True 531 return True
532 532
533 ## drop ##
534
535 def on_drop_file(self, path):
536 self.addAttachment(path)
533 537
534 ## header ## 538 ## header ##
535 539
536 def changeWidget(self, jid_): 540 def changeWidget(self, jid_):
537 """change current widget for a new one with given jid 541 """change current widget for a new one with given jid