diff 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
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.py	Sun Feb 23 15:39:06 2020 +0100
+++ b/cagou/plugins/plugin_wid_chat.py	Sun Feb 23 15:39:06 2020 +0100
@@ -530,6 +530,10 @@
             screen_manager.current = 'chat_selector'
             return True
 
+    ## drop ##
+
+    def on_drop_file(self, path):
+        self.addAttachment(path)
 
     ## header ##