delete new_message_handler_id beofre we build the menu

This commit is contained in:
Yann Leboulanger 2005-07-21 06:25:49 +00:00
parent c24fdeefc8
commit b08b8402c1
1 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,7 @@ class Systray:
def __init__(self, plugin):
self.plugin = plugin
self.jids = []
self.new_message_handler_id = None
self.t = None
self.tip = gtk.Tooltips()
self.img_tray = gtk.Image()
@ -124,6 +125,11 @@ class Systray:
chat_with_menuitem = self.xml.get_widget('chat_with_menuitem')
new_message_menuitem = self.xml.get_widget('new_message_menuitem')
status_menuitem = self.xml.get_widget('status_menu')
if self.new_message_handler_id:
new_message_menuitem.handler_disconnect(
self.new_message_handler_id)
self.new_message_handler_id = None
sub_menu = gtk.Menu()
status_menuitem.set_submenu(sub_menu)