New gui_extension_point added. Do not use all args in remove_gui_extension_point() to identify elements to be removed. Use only first one
This commit is contained in:
parent
3a3c40f07c
commit
2e648d06be
|
@ -522,8 +522,12 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
||||||
super(ChatControlBase, self).shutdown()
|
super(ChatControlBase, self).shutdown()
|
||||||
# PluginSystem: removing GUI extension points connected with ChatControlBase
|
# PluginSystem: removing GUI extension points connected with ChatControlBase
|
||||||
# instance object
|
# instance object
|
||||||
gajim.plugin_manager.remove_gui_extension_point('chat_control_base', self)
|
gajim.plugin_manager.remove_gui_extension_point('chat_control_base',
|
||||||
gajim.plugin_manager.remove_gui_extension_point('chat_control_base_draw_banner', self)
|
self)
|
||||||
|
gajim.plugin_manager.remove_gui_extension_point(
|
||||||
|
'chat_control_base_draw_banner', self)
|
||||||
|
gajim.plugin_manager.remove_gui_extension_point('print_special_text',
|
||||||
|
self)
|
||||||
gajim.ged.remove_event_handler('our-show', ged.GUI1,
|
gajim.ged.remove_event_handler('our-show', ged.GUI1,
|
||||||
self._nec_our_status)
|
self._nec_our_status)
|
||||||
|
|
||||||
|
|
|
@ -1039,6 +1039,15 @@ class ConversationTextview(gobject.GObject):
|
||||||
Is called by detect_and_print_special_text and prints special text
|
Is called by detect_and_print_special_text and prints special text
|
||||||
(emots, links, formatting)
|
(emots, links, formatting)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
# PluginSystem: adding GUI extension point for ConversationTextview
|
||||||
|
self.plugin_modified = False
|
||||||
|
gajim.plugin_manager.gui_extension_point('print_special_text', self,
|
||||||
|
special_text, other_tags, graphics)
|
||||||
|
if self.plugin_modified:
|
||||||
|
return
|
||||||
|
|
||||||
tags = []
|
tags = []
|
||||||
use_other_tags = True
|
use_other_tags = True
|
||||||
text_is_valid_uri = False
|
text_is_valid_uri = False
|
||||||
|
|
|
@ -215,9 +215,13 @@ class PluginManager(object):
|
||||||
extension point name) to identify element to be removed.
|
extension point name) to identify element to be removed.
|
||||||
:type args: tuple
|
:type args: tuple
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if gui_extpoint_name in self.gui_extension_points:
|
if gui_extpoint_name in self.gui_extension_points:
|
||||||
self.gui_extension_points[gui_extpoint_name].remove(args)
|
extension_points = list(self.gui_extension_points[gui_extpoint_name])
|
||||||
|
for ext_point in extension_points:
|
||||||
|
if args[0] in ext_point:
|
||||||
|
self.gui_extension_points[gui_extpoint_name].remove(
|
||||||
|
ext_point)
|
||||||
|
|
||||||
|
|
||||||
@log_calls('PluginManager')
|
@log_calls('PluginManager')
|
||||||
def _add_gui_extension_point_call_to_list(self, gui_extpoint_name, *args):
|
def _add_gui_extension_point_call_to_list(self, gui_extpoint_name, *args):
|
||||||
|
|
Loading…
Reference in New Issue