disconnect from chat control

This commit is contained in:
Evgeniy Popov
2013-05-31 22:37:21 +06:00
parent ecec803d6f
commit b2341159cf
2 changed files with 6 additions and 5 deletions

View File

@@ -4,5 +4,5 @@ short_name: quick_replies
version: 0.0.1
description: Plugin for quick insert template message and add your own template messages
authors = Evgeniy Popov <evgeniypopov@gmail.com>
homepage = https://bitbucket.org/axce1/quickreplies
homepage = http://trac-plugins.gajim.org/wiki/QuickRepliesPlugin
max_gajim_version: 0.15.9

View File

@@ -42,7 +42,7 @@ class QuickRepliesPlugin(GajimPlugin):
def disconnect_from_chat_control(self, chat_control):
for control in self.controls:
control.disconnect_from_chat_contro()
control.disconnect_from_chat_control()
self.controls = []
class Base(object):
@@ -54,7 +54,6 @@ class Base(object):
self.create_menu()
self.create_button()
def create_button(self):
actions_hbox = self.chat_control.xml.get_object('actions_hbox')
@@ -80,13 +79,11 @@ class Base(object):
self.chat_control.handlers[id_] = self.button
self.button.show()
def on_button_cliecked(self, widget):
gtkgui_helpers.popup_emoticons_under_button(self.menu, widget,
self.chat_control.parent_win)
def on_insert(self, widget, text):
text = text.rstrip() + ' '
@@ -107,6 +104,10 @@ class Base(object):
self.menu.append(item)
self.menu.show_all()
def disconnect_from_chat_control(self):
actions_hbox = self.chat_control.xml.get_object('actions_hbox')
actions_hbox.remove(self.button)
class QuickRepliesPluginConfigDialog(GajimPluginConfigDialog):
def init(self):