disconnect from chat control
This commit is contained in:
@@ -4,5 +4,5 @@ short_name: quick_replies
|
|||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
description: Plugin for quick insert template message and add your own template messages
|
description: Plugin for quick insert template message and add your own template messages
|
||||||
authors = Evgeniy Popov <evgeniypopov@gmail.com>
|
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
|
max_gajim_version: 0.15.9
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class QuickRepliesPlugin(GajimPlugin):
|
|||||||
def disconnect_from_chat_control(self, chat_control):
|
def disconnect_from_chat_control(self, chat_control):
|
||||||
|
|
||||||
for control in self.controls:
|
for control in self.controls:
|
||||||
control.disconnect_from_chat_contro()
|
control.disconnect_from_chat_control()
|
||||||
self.controls = []
|
self.controls = []
|
||||||
|
|
||||||
class Base(object):
|
class Base(object):
|
||||||
@@ -54,7 +54,6 @@ class Base(object):
|
|||||||
self.create_menu()
|
self.create_menu()
|
||||||
self.create_button()
|
self.create_button()
|
||||||
|
|
||||||
|
|
||||||
def create_button(self):
|
def create_button(self):
|
||||||
|
|
||||||
actions_hbox = self.chat_control.xml.get_object('actions_hbox')
|
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.chat_control.handlers[id_] = self.button
|
||||||
self.button.show()
|
self.button.show()
|
||||||
|
|
||||||
|
|
||||||
def on_button_cliecked(self, widget):
|
def on_button_cliecked(self, widget):
|
||||||
|
|
||||||
gtkgui_helpers.popup_emoticons_under_button(self.menu, widget,
|
gtkgui_helpers.popup_emoticons_under_button(self.menu, widget,
|
||||||
self.chat_control.parent_win)
|
self.chat_control.parent_win)
|
||||||
|
|
||||||
|
|
||||||
def on_insert(self, widget, text):
|
def on_insert(self, widget, text):
|
||||||
|
|
||||||
text = text.rstrip() + ' '
|
text = text.rstrip() + ' '
|
||||||
@@ -107,6 +104,10 @@ class Base(object):
|
|||||||
self.menu.append(item)
|
self.menu.append(item)
|
||||||
self.menu.show_all()
|
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):
|
class QuickRepliesPluginConfigDialog(GajimPluginConfigDialog):
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user