* src/GrampsDb/_GrampsBSDDB.py (close): close reference_map tables.

* src/ViewManager.py (quit): Add function to properly quit.


svn: r5612
This commit is contained in:
Alex Roitman 2005-12-22 04:36:26 +00:00
parent 9c5a61cef9
commit 08b31d3e09
3 changed files with 12 additions and 2 deletions

View File

@ -18,6 +18,9 @@
* src/GrampsDb/Makefile.am, src/GrampsDb/.cvsignore: Add to CVS.
* configure.in: Create Makefile in new directory.
* src/GrampsDb/_GrampsBSDDB.py (close): close reference_map tables.
* src/ViewManager.py (quit): Add function to properly quit.
2005-12-21 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
* src/EditSource.py: fixed small mistake in display_references

View File

@ -639,6 +639,7 @@ class GrampsBSDDB(GrampsDbBase):
self.source_map.close()
self.media_map.close()
self.event_map.close()
self.reference_map.close()
if not self.readonly:
self.metadata['bookmarks'] = self.bookmarks
self.metadata['gender_stats'] = self.genderStats.save_stats()
@ -657,6 +658,8 @@ class GrampsBSDDB(GrampsDbBase):
self.oid_trans.close()
self.sid_trans.close()
self.pid_trans.close()
self.reference_map_primary_map.close()
self.reference_map_referenced_map.close()
self.env.close()
if not self.readonly:

View File

@ -157,7 +157,7 @@ class ViewManager:
self.views = []
self.pages = []
self.window = gtk.Window()
self.window.connect('destroy', lambda w: gtk.main_quit())
self.window.connect('destroy', self.quit)
self.window.set_size_request(775,500)
self.statusbar = gtk.Statusbar()
@ -209,6 +209,10 @@ class ViewManager:
self.change_page(None,None)
self.actiongroup.set_visible(False)
def quit(self,obj=None):
self.state.db.close()
gtk.main_quit()
def set_color(self,obj):
style = obj.get_style().copy()
new_color = style.bg[gtk.STATE_ACTIVE]
@ -233,7 +237,7 @@ class ViewManager:
('New', gtk.STOCK_NEW, '_New', "<control>n", None, self.new_activate),
('Open', gtk.STOCK_OPEN, '_Open', "<control>o", None, self.open_activate),
('OpenRecent', gtk.STOCK_OPEN, 'Open _Recent'),
('Quit', gtk.STOCK_QUIT, '_Quit', "<control>q", None, gtk.main_quit),
('Quit', gtk.STOCK_QUIT, '_Quit', "<control>q", None, self.quit),
('ViewMenu', None, '_View'),
('Preferences', gtk.STOCK_PREFERENCES, '_Preferences'),
('ColumnEdit', gtk.STOCK_PROPERTIES, '_Column Editor'),