add new gui extension point so that plugins can update toolbar buttons status.
This commit is contained in:
parent
58feae6cee
commit
cdf3918262
|
@ -159,6 +159,14 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
|||
gajim.plugin_manager.gui_extension_point('chat_control_base_draw_banner',
|
||||
self)
|
||||
|
||||
def update_toolbar(self):
|
||||
"""
|
||||
update state of buttons in toolbar
|
||||
"""
|
||||
self._update_toolbar()
|
||||
gajim.plugin_manager.gui_extension_point(
|
||||
'chat_control_base_update_toolbar', self)
|
||||
|
||||
def draw_banner_text(self):
|
||||
"""
|
||||
Derived types SHOULD implement this
|
||||
|
@ -184,6 +192,12 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
|||
"""
|
||||
pass
|
||||
|
||||
def _update_toolbar(self):
|
||||
"""
|
||||
Derived types MAY implement this
|
||||
"""
|
||||
pass
|
||||
|
||||
def handle_message_textview_mykey_press(self, widget, event_keyval,
|
||||
event_keymod):
|
||||
"""
|
||||
|
@ -1537,7 +1551,7 @@ class ChatControl(ChatControlBase):
|
|||
# instance object
|
||||
gajim.plugin_manager.gui_extension_point('chat_control', self)
|
||||
|
||||
def update_toolbar(self):
|
||||
def _update_toolbar(self):
|
||||
# Formatting
|
||||
if self.contact.supports(NS_XHTML_IM) and not self.gpg_is_active:
|
||||
self._formattings_button.set_sensitive(True)
|
||||
|
|
Loading…
Reference in New Issue