Mercurial > libervia-desktop-kivy
diff cagou/plugins/plugin_wid_chat.py @ 278:444ba439530f
chat: moved transfer button to header_box
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 20 Mar 2019 09:29:44 +0100 |
parents | f5302d57fb09 |
children | ef77423ce500 |
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.py Wed Mar 20 09:29:44 2019 +0100 +++ b/cagou/plugins/plugin_wid_chat.py Wed Mar 20 09:29:44 2019 +0100 @@ -40,6 +40,7 @@ from kivy.uix.dropdown import DropDown from kivy.core.window import Window from cagou import G +from cagou.core import menu log = logging.getLogger(__name__) @@ -166,6 +167,13 @@ pass +class TransferButton(SymbolButton): + chat = properties.ObjectProperty() + + def on_release(self, *args): + menu.TransferMenu(callback=self.chat.onTransferOK).show(self) + + class EncryptionMainButton(SymbolButton): def __init__(self, chat, **kwargs): @@ -380,6 +388,8 @@ self._hi_comp_dropdown = DropDown() self._hi_comp_allowed = True cagou_widget.CagouWidget.__init__(self) + transfer_btn = TransferButton(chat=self) + self.headerInputAddExtra(transfer_btn) if type_ == C.CHAT_ONE2ONE: self.encryption_btn = EncryptionMainButton(self) self.headerInputAddExtra(self.encryption_btn)