Make create_buttons method protected rather than private because it is overridden by BackRefList class. Bug #4576

svn: r16506
This commit is contained in:
Gary Burton 2011-01-30 16:43:36 +00:00
parent 79d03159f3
commit 375b843abb
2 changed files with 7 additions and 5 deletions

View File

@ -2,7 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2009-2011 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
@ -89,7 +89,7 @@ class BackRefList(EmbeddedList):
def is_empty(self):
return self.model.count == 0
def create_buttons(self, share=False, move=False, jump=False):
def _create_buttons(self, share=False, move=False, jump=False, top_label=None):
"""
Create a button box consisting of one button: Edit.
This button box is then appended hbox (self).

View File

@ -2,7 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2009-2011 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
@ -103,9 +103,9 @@ class ButtonTab(GrampsTab):
"""
self.dirty_selection = False
GrampsTab.__init__(self,dbstate, uistate, track, name)
self.__create_buttons(share_button, move_buttons, jump_button, top_label)
self._create_buttons(share_button, move_buttons, jump_button, top_label)
def __create_buttons(self, share_button, move_buttons, jump_button,
def _create_buttons(self, share_button, move_buttons, jump_button,
top_label):
"""
Create a button box consisting of three buttons, one for Add,
@ -114,6 +114,8 @@ class ButtonTab(GrampsTab):
Add buttons for Share, Move and Jump depending on parameters. This
button box is then appended hbox (self).
Prepend a label if top_label given
Note: some ButtonTab subclasses override this method.
"""
if top_label:
self.top_label = gtk.Label(top_label)