Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Fomin <fominde@gmail.com>2013-07-21 23:34:42 +0400
committerDenis Fomin <fominde@gmail.com>2013-07-21 23:34:42 +0400
commit0a4f35820ffb0a84dfc1d51780724189cccaab2c (patch)
treef6203b97e102c6c4979de502e80141666c5bc974
parent93068be48c193d332771efdcaa6130742878aea5 (diff)
QuickRepliesPlugin,GuiForMePlugin.change buttons state when the status has changed.
Fixes #60
-rw-r--r--gui_for_me/gui_for_me.py13
-rw-r--r--gui_for_me/manifest.ini2
-rw-r--r--quick_replies/manifest.ini2
-rw-r--r--quick_replies/plugin.py11
4 files changed, 23 insertions, 5 deletions
diff --git a/gui_for_me/gui_for_me.py b/gui_for_me/gui_for_me.py
index 97744e0..3ba9b1e 100644
--- a/gui_for_me/gui_for_me.py
+++ b/gui_for_me/gui_for_me.py
@@ -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):
diff --git a/gui_for_me/manifest.ini b/gui_for_me/manifest.ini
index 8591a25..0b29a4c 100644
--- a/gui_for_me/manifest.ini
+++ b/gui_for_me/manifest.ini
@@ -1,7 +1,7 @@
[info]
name: GUI For Me
short_name: gui_for_me
-version: 0.1
+version: 0.2
description: Gui for the '/me' command.
authors: BomberMan
copper
diff --git a/quick_replies/manifest.ini b/quick_replies/manifest.ini
index d717213..859cf32 100644
--- a/quick_replies/manifest.ini
+++ b/quick_replies/manifest.ini
@@ -1,7 +1,7 @@
[info]
name: Quick replies
short_name: quick_replies
-version: 0.0.1
+version: 0.0.2
description: Plugin for quick insert template message and add your own template messages
authors = Evgeniy Popov <evgeniypopov@gmail.com>
homepage = http://trac-plugins.gajim.org/wiki/QuickRepliesPlugin
diff --git a/quick_replies/plugin.py b/quick_replies/plugin.py
index 185781c..f0650bb 100644
--- a/quick_replies/plugin.py
+++ b/quick_replies/plugin.py
@@ -16,7 +16,9 @@ class QuickRepliesPlugin(GajimPlugin):
self.chat_control = None
self.gui_extension_points = {
'chat_control_base': (self.connect_with_chat_control,
- self.disconnect_from_chat_control), }
+ self.disconnect_from_chat_control),
+ 'chat_control_base_update_toolbar': (self.update_button_state,
+ None)}
self.config_default_values = {
'entry1': ('Hello!', ''),
'entry2': ('How are you?', ''),
@@ -45,6 +47,13 @@ class QuickRepliesPlugin(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):