parent.destroy() destroys childs too
This commit is contained in:
parent
7c85a32cbb
commit
db1cffb299
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue