parent.destroy() destroys childs too

This commit is contained in:
Nikos Kouremenos 2006-04-07 11:09:11 +00:00
parent 7c85a32cbb
commit db1cffb299
3 changed files with 2 additions and 18 deletions

View File

@ -1543,7 +1543,7 @@ class Interface:
sys.path.remove(path)
del emots
if self.emoticons_menu:
gtkgui_helpers.destroy_widget(self.emoticons_menu)
self.emoticons_menu.destroy()
self.emoticons_menu = self.prepare_emoticons_menu()
def register_handlers(self):

View File

@ -602,19 +602,3 @@ def get_possible_button_event(event):
event_button = event.button
return event_button
def destroy_widget(widget):
if not widget:
return
children = []
try:
children = widget.get_children()
except:
sys.exc_clear()
try:
widget.destroy()
except:
sys.exc_clear()
while children:
child = children.pop(0)
destroy_widget(child)

View File

@ -217,7 +217,7 @@ class VcardWindow:
try:
pixbuf = gtk.gdk.pixbuf_new_from_file(path_to_file)
# get the image at 'notification size'
# and use that hoping size is okay
# and use that user did not specify in ACE crazy size
scaled_pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf,
'notification')
except gobject.GError, msg: # unknown format