Bug 2616. Fixes for memory leaks in event editor
svn: r12116
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -99,6 +100,7 @@ class ButtonTab(GrampsTab):
|
||||
self.dirty_selection = False
|
||||
GrampsTab.__init__(self,dbstate, uistate, track, name)
|
||||
self.tooltips = gtk.Tooltips()
|
||||
self.track_ref_for_deletion("tooltips")
|
||||
self.create_buttons(share_button, move_buttons, jump_button)
|
||||
|
||||
def create_buttons(self, share_button, move_buttons, jump_button):
|
||||
@@ -112,6 +114,9 @@ class ButtonTab(GrampsTab):
|
||||
self.add_btn = SimpleButton(gtk.STOCK_ADD, self.add_button_clicked)
|
||||
self.edit_btn = SimpleButton(gtk.STOCK_EDIT, self.edit_button_clicked)
|
||||
self.del_btn = SimpleButton(gtk.STOCK_REMOVE, self.del_button_clicked)
|
||||
self.track_ref_for_deletion("add_btn")
|
||||
self.track_ref_for_deletion("edit_btn")
|
||||
self.track_ref_for_deletion("del_btn")
|
||||
|
||||
self.tooltips.set_tip(self.add_btn, self._MSG['add'])
|
||||
self.tooltips.set_tip(self.edit_btn, self._MSG['edit'])
|
||||
@@ -120,6 +125,7 @@ class ButtonTab(GrampsTab):
|
||||
if share_button:
|
||||
self.share_btn = SimpleButton(gtk.STOCK_INDEX, self.share_button_clicked)
|
||||
self.tooltips.set_tip(self.share_btn, self._MSG['share'])
|
||||
self.track_ref_for_deletion("share_btn")
|
||||
else:
|
||||
self.share_btn = None
|
||||
|
||||
@@ -129,6 +135,8 @@ class ButtonTab(GrampsTab):
|
||||
self.down_btn = SimpleButton(gtk.STOCK_GO_DOWN,
|
||||
self.down_button_clicked)
|
||||
self.tooltips.set_tip(self.down_btn, self._MSG['down'])
|
||||
self.track_ref_for_deletion("up_btn")
|
||||
self.track_ref_for_deletion("down_btn")
|
||||
else:
|
||||
self.up_btn = None
|
||||
self.down_btn = None
|
||||
@@ -146,6 +154,7 @@ class ButtonTab(GrampsTab):
|
||||
|
||||
if jump_button:
|
||||
self.jump_btn = SimpleButton(gtk.STOCK_JUMP_TO, self.jump_button_clicked)
|
||||
self.track_ref_for_deletion("jump_btn")
|
||||
self.tooltips.set_tip(self.jump_btn, self._MSG['jump'])
|
||||
else:
|
||||
self.jump_btn = None
|
||||
|
||||
Reference in New Issue
Block a user