No save if no gadgets; added news gadget

svn: r9627
This commit is contained in:
Doug Blank
2007-12-29 16:53:14 +00:00
parent 9e77d90748
commit 74c4e3e30b
2 changed files with 85 additions and 2 deletions

View File

@@ -258,7 +258,7 @@ class Gadget(object):
self._generator = self.main()
if debug: print "%s adding to gobject" % self.gui.title
self._idle_id = gobject.idle_add(self._updater,
priority=gobject.PRIORITY_LOW)
priority=gobject.PRIORITY_LOW - 10)
def interrupt(self):
"""
@@ -631,6 +631,10 @@ class MyGrampsView(PageView.PageView):
def save(self, *args):
if debug: print "saving"
if len(self.frame_map.keys() +
self.detached_gadgets +
self.closed_gadgets) == 0:
return # something is the matter
filename = GADGET_FILENAME
try:
fp = open(filename, "w")