QuickRepliesPlugin,GuiForMePlugin.change buttons state when the status has changed.
Fixes #60
This commit is contained in:
@@ -14,8 +14,10 @@ class GuiForMe(GajimPlugin):
|
||||
self.description = _('Gui for the \'/me\' command.')
|
||||
self.config_dialog = None # GuiForMePluginConfigDialog(self)
|
||||
self.gui_extension_points = {
|
||||
'chat_control_base': (self.connect_with_chat_control,
|
||||
self.disconnect_from_chat_control)}
|
||||
'chat_control_base': (self.connect_with_chat_control,
|
||||
self.disconnect_from_chat_control),
|
||||
'chat_control_base_update_toolbar': (self.update_button_state,
|
||||
None)}
|
||||
self.controls = []
|
||||
|
||||
@log_calls('GuiForMePlugin')
|
||||
@@ -34,6 +36,13 @@ class GuiForMe(GajimPlugin):
|
||||
control.disconnect_from_chat_control()
|
||||
self.controls = []
|
||||
|
||||
@log_calls('GuiForMePlugin')
|
||||
def update_button_state(self, chat_control):
|
||||
for base in self.controls:
|
||||
if base.chat_control != chat_control:
|
||||
continue
|
||||
base.button.set_sensitive(chat_control.msg_textview.get_sensitive())
|
||||
|
||||
|
||||
class Base(object):
|
||||
def __init__(self, plugin, chat_control):
|
||||
|
||||
Reference in New Issue
Block a user