2007-12-26 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/ViewManager.py: added __delete_pages called on quit * src/PageView.py: added on_delete method called on quit svn: r9588
This commit is contained in:
parent
9692af5e11
commit
8fca6769f9
@ -1,3 +1,7 @@
|
|||||||
|
2007-12-26 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
||||||
|
* src/ViewManager.py: added __delete_pages called on quit
|
||||||
|
* src/PageView.py: added on_delete method called on quit
|
||||||
|
|
||||||
2007-12-24 Brian Matherly <brian@gramps-project.org>
|
2007-12-24 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/const.py.in: Move the entire Gramps dir under "Application Data" in
|
* src/const.py.in: Move the entire Gramps dir under "Application Data" in
|
||||||
Windows.
|
Windows.
|
||||||
|
@ -293,6 +293,13 @@ class PageView:
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def on_delete(self):
|
||||||
|
"""
|
||||||
|
Method called on shutdown. Data views should put code here
|
||||||
|
that should be called when quiting the main application.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
class BookMarkView(PageView):
|
class BookMarkView(PageView):
|
||||||
|
|
||||||
def __init__(self, title, state, uistate, bookmarks, bm_type):
|
def __init__(self, title, state, uistate, bookmarks, bm_type):
|
||||||
|
@ -626,6 +626,9 @@ class ViewManager:
|
|||||||
self.__backup()
|
self.__backup()
|
||||||
self.state.db.close()
|
self.state.db.close()
|
||||||
|
|
||||||
|
# have each page save anything, if they need to:
|
||||||
|
self.__delete_pages()
|
||||||
|
|
||||||
# save the current window size
|
# save the current window size
|
||||||
(width, height) = self.window.get_size()
|
(width, height) = self.window.get_size()
|
||||||
Config.set(Config.WIDTH, width)
|
Config.set(Config.WIDTH, width)
|
||||||
@ -794,6 +797,13 @@ class ViewManager:
|
|||||||
else:
|
else:
|
||||||
self.tips.enable()
|
self.tips.enable()
|
||||||
|
|
||||||
|
def __delete_pages(self):
|
||||||
|
"""
|
||||||
|
Calls on_delete() for each view
|
||||||
|
"""
|
||||||
|
for page in self.pages:
|
||||||
|
page.on_delete()
|
||||||
|
|
||||||
def __create_pages(self):
|
def __create_pages(self):
|
||||||
"""
|
"""
|
||||||
Creates the Views
|
Creates the Views
|
||||||
|
Loading…
Reference in New Issue
Block a user