From 375b843abb996e6f3c673c732bc31a61c0807277 Mon Sep 17 00:00:00 2001 From: Gary Burton Date: Sun, 30 Jan 2011 16:43:36 +0000 Subject: [PATCH] Make create_buttons method protected rather than private because it is overridden by BackRefList class. Bug #4576 svn: r16506 --- src/gui/editors/displaytabs/backreflist.py | 4 ++-- src/gui/editors/displaytabs/buttontab.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui/editors/displaytabs/backreflist.py b/src/gui/editors/displaytabs/backreflist.py index cdb07ac74..d04c0e053 100644 --- a/src/gui/editors/displaytabs/backreflist.py +++ b/src/gui/editors/displaytabs/backreflist.py @@ -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). diff --git a/src/gui/editors/displaytabs/buttontab.py b/src/gui/editors/displaytabs/buttontab.py index aca44327f..9e417c7c2 100644 --- a/src/gui/editors/displaytabs/buttontab.py +++ b/src/gui/editors/displaytabs/buttontab.py @@ -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)