whiteboard plugin. small optimization

This commit is contained in:
Denis Fomin 2010-11-03 22:15:17 +03:00
parent 08e00fffc2
commit e036cf91d3
1 changed files with 4 additions and 6 deletions

View File

@ -341,12 +341,10 @@ class Base(object):
if not self.whiteboard:
return
hbox = self.chat_control.xml.get_object('chat_control_hbox')
for child in hbox.get_children():
if child == self.whiteboard.hbox:
self.button.set_active(False)
hbox.remove(child)
self.whiteboard = None
break
if self.whiteboard.hbox in hbox.get_children():
self.button.set_active(False)
hbox.remove(self.whiteboard.hbox)
self.whiteboard = None
def disconnect_from_chat_control(self):
actions_hbox = self.chat_control.xml.get_object('actions_hbox')