Commit b2341159 authored by Evgeniy Popov's avatar Evgeniy Popov

disconnect from chat control

parent ecec803d
......@@ -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
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment