* src/DataViews/_PersonView.py:
* src/PageView.py: * src/Filters/SideBar/_MediaSidebarFilter.py: * src/Filters/SideBar/_SidebarFilter.py: * src/Filters/SideBar/_SourceSidebarFilter.py: * src/Filters/SideBar/_EventSidebarFilter.py: * src/Filters/SideBar/_FamilySidebarFilter.py: * src/Filters/SideBar/_PlaceSidebarFilter.py: * src/Filters/SideBar/_RepoSidebarFilter.py: * src/Filters/SideBar/_NoteSidebarFilter.py: * src/Filters/SideBar/_PersonSidebarFilter.py: Pass dbstate to SidebarFilters 2007-05-07 Don Allingham <don@gramps-project.org> svn: r8444
This commit is contained in:
parent
87764d64c0
commit
7b7abd95dd
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2007-05-07 Don Allingham <don@gramps-project.org>
|
||||
* src/DataViews/_PersonView.py:
|
||||
* src/PageView.py:
|
||||
* src/Filters/SideBar/_MediaSidebarFilter.py:
|
||||
* src/Filters/SideBar/_SidebarFilter.py:
|
||||
* src/Filters/SideBar/_SourceSidebarFilter.py:
|
||||
* src/Filters/SideBar/_EventSidebarFilter.py:
|
||||
* src/Filters/SideBar/_FamilySidebarFilter.py:
|
||||
* src/Filters/SideBar/_PlaceSidebarFilter.py:
|
||||
* src/Filters/SideBar/_RepoSidebarFilter.py:
|
||||
* src/Filters/SideBar/_NoteSidebarFilter.py:
|
||||
* src/Filters/SideBar/_PersonSidebarFilter.py: Pass dbstate to SidebarFilters
|
||||
|
||||
2007-05-07 Don Allingham <don@gramps-project.org>
|
||||
* src/ReportBase/_SimpleDoc.py: add support for tabs
|
||||
* src/BaseDoc.py: add support for tabs
|
||||
|
@ -310,7 +310,7 @@ class PersonView(PageView.PersonNavView):
|
||||
self.selection.set_mode(gtk.SELECTION_MULTIPLE)
|
||||
self.selection.connect('changed', self.row_changed)
|
||||
|
||||
self.filter_sidebar = PersonSidebarFilter(self.uistate,
|
||||
self.filter_sidebar = PersonSidebarFilter(self.dbstate, self.uistate,
|
||||
self.filter_clicked)
|
||||
self.filter_pane = self.filter_sidebar.get_widget()
|
||||
|
||||
|
@ -54,8 +54,8 @@ GenericEventFilter = GenericFilterFactory('Event')
|
||||
#-------------------------------------------------------------------------
|
||||
class EventSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self,uistate, clicked):
|
||||
SidebarFilter.__init__(self,uistate)
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
SidebarFilter.__init__(self, dbstate, uistate)
|
||||
self.clicked_func = clicked
|
||||
|
||||
def create_widget(self):
|
||||
|
@ -54,8 +54,8 @@ GenericFamilyFilter = GenericFilterFactory('Family')
|
||||
#-------------------------------------------------------------------------
|
||||
class FamilySidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self,uistate, clicked):
|
||||
SidebarFilter.__init__(self,uistate)
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
SidebarFilter.__init__(self, dbstate, uistate)
|
||||
self.clicked_func = clicked
|
||||
|
||||
def create_widget(self):
|
||||
|
@ -54,8 +54,8 @@ GenericMediaFilter = GenericFilterFactory('MediaObject')
|
||||
#-------------------------------------------------------------------------
|
||||
class MediaSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self,uistate, clicked):
|
||||
SidebarFilter.__init__(self,uistate)
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
SidebarFilter.__init__(self, dbstate, uistate)
|
||||
self.clicked_func = clicked
|
||||
|
||||
def create_widget(self):
|
||||
|
@ -54,8 +54,8 @@ GenericNoteFilter = GenericFilterFactory('Note')
|
||||
#-------------------------------------------------------------------------
|
||||
class NoteSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self,uistate, clicked):
|
||||
SidebarFilter.__init__(self,uistate)
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
SidebarFilter.__init__(self, dbstate, uistate)
|
||||
self.clicked_func = clicked
|
||||
|
||||
def create_widget(self):
|
||||
|
@ -54,8 +54,8 @@ from Filters import GenericFilter, build_filter_model, Rules
|
||||
#-------------------------------------------------------------------------
|
||||
class PersonSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self, uistate, clicked):
|
||||
SidebarFilter.__init__(self, uistate)
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
SidebarFilter.__init__(self, dbstate, uistate)
|
||||
self.clicked_func = clicked
|
||||
|
||||
def create_widget(self):
|
||||
|
@ -54,8 +54,8 @@ GenericPlaceFilter = GenericFilterFactory('Place')
|
||||
#-------------------------------------------------------------------------
|
||||
class PlaceSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self,uistate, clicked):
|
||||
SidebarFilter.__init__(self,uistate)
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
SidebarFilter.__init__(self, dbstate, uistate)
|
||||
self.clicked_func = clicked
|
||||
|
||||
def create_widget(self):
|
||||
|
@ -54,8 +54,8 @@ GenericRepoFilter = GenericFilterFactory('Repository')
|
||||
#-------------------------------------------------------------------------
|
||||
class RepoSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self,uistate, clicked):
|
||||
SidebarFilter.__init__(self,uistate)
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
SidebarFilter.__init__(self, dbstate, uistate)
|
||||
self.clicked_func = clicked
|
||||
|
||||
def create_widget(self):
|
||||
|
@ -30,7 +30,7 @@ _KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
|
||||
|
||||
class SidebarFilter:
|
||||
|
||||
def __init__(self, uistate):
|
||||
def __init__(self, dbstate, uistate):
|
||||
self.position = 1
|
||||
self.table = gtk.Table(4,11)
|
||||
self.table.set_border_width(6)
|
||||
@ -41,6 +41,7 @@ class SidebarFilter:
|
||||
self._init_interface()
|
||||
uistate.connect('filters-changed',self.on_filters_changed)
|
||||
self.uistate = uistate
|
||||
self.dbstate = dbstate
|
||||
|
||||
def _init_interface(self):
|
||||
self.table.attach(GrampsWidgets.MarkupLabel(_('<b>Filter</b>')),
|
||||
|
@ -54,8 +54,8 @@ GenericSourceFilter = GenericFilterFactory('Source')
|
||||
#-------------------------------------------------------------------------
|
||||
class SourceSidebarFilter(SidebarFilter):
|
||||
|
||||
def __init__(self,uistate, clicked):
|
||||
SidebarFilter.__init__(self,uistate)
|
||||
def __init__(self, dbstate, uistate, clicked):
|
||||
SidebarFilter.__init__(self, dbstate, uistate)
|
||||
self.clicked_func = clicked
|
||||
|
||||
def create_widget(self):
|
||||
|
@ -61,7 +61,7 @@ EMPTY_SEARCH = (0, '', False)
|
||||
#----------------------------------------------------------------
|
||||
class PageView:
|
||||
|
||||
def __init__(self,title,dbstate,uistate):
|
||||
def __init__(self, title, dbstate, uistate):
|
||||
self.title = title
|
||||
self.dbstate = dbstate
|
||||
self.uistate = uistate
|
||||
@ -469,7 +469,8 @@ class ListView(BookMarkView):
|
||||
dbstate.connect('database-changed',self.change_db)
|
||||
|
||||
def build_filter_container(self, box, filter_class):
|
||||
self.filter_sidebar = filter_class(self.uistate,self.filter_clicked)
|
||||
self.filter_sidebar = filter_class(self.dbstate, self.uistate,
|
||||
self.filter_clicked)
|
||||
self.filter_pane = self.filter_sidebar.get_widget()
|
||||
|
||||
hpaned = gtk.HBox()
|
||||
|
Loading…
Reference in New Issue
Block a user