Update
svn: r3225
This commit is contained in:
parent
6da362e2fa
commit
fcabe82c3d
@ -299,15 +299,15 @@ class ArgHandler:
|
|||||||
print "Temporary directory %s is not writable" % tmpdir_path
|
print "Temporary directory %s is not writable" % tmpdir_path
|
||||||
os._exit(1)
|
os._exit(1)
|
||||||
else: # tempdir exists and writable -- clean it up if not empty
|
else: # tempdir exists and writable -- clean it up if not empty
|
||||||
files = os.listdir(tmpdir_path) ;
|
files = os.listdir(tmpdir_path) ;
|
||||||
for fn in files:
|
for fn in files:
|
||||||
os.remove( os.path.join(tmpdir_path,fn) )
|
os.remove( os.path.join(tmpdir_path,fn) )
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import TarFile
|
import TarFile
|
||||||
t = TarFile.ReadTarFile(filename,tmpdir_path)
|
t = TarFile.ReadTarFile(filename,tmpdir_path)
|
||||||
t.extract()
|
t.extract()
|
||||||
t.close()
|
t.close()
|
||||||
except:
|
except:
|
||||||
print "Error extracting into %s" % tmpdir_path
|
print "Error extracting into %s" % tmpdir_path
|
||||||
os._exit(1)
|
os._exit(1)
|
||||||
|
@ -150,9 +150,9 @@ class Gramps:
|
|||||||
ArgHandler.ArgHandler(self,args)
|
ArgHandler.ArgHandler(self,args)
|
||||||
|
|
||||||
# Don't show main window until ArgHandler is done.
|
# Don't show main window until ArgHandler is done.
|
||||||
# This prevents a window from annoyingly popping up when
|
# This prevents a window from annoyingly popping up when
|
||||||
# the command line args are sufficient to operate without it.
|
# the command line args are sufficient to operate without it.
|
||||||
self.topWindow.show()
|
self.topWindow.show()
|
||||||
|
|
||||||
if GrampsCfg.usetips:
|
if GrampsCfg.usetips:
|
||||||
TipOfDay.TipOfDay()
|
TipOfDay.TipOfDay()
|
||||||
@ -335,7 +335,7 @@ class Gramps:
|
|||||||
"on_gramps_report_bug_activate" : self.report_bug_activate,
|
"on_gramps_report_bug_activate" : self.report_bug_activate,
|
||||||
"on_gramps_mailing_lists_activate" : self.mailing_lists_activate,
|
"on_gramps_mailing_lists_activate" : self.mailing_lists_activate,
|
||||||
"on_open_example" : self.open_example,
|
"on_open_example" : self.open_example,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
self.enable_filter(self.use_filter)
|
self.enable_filter(self.use_filter)
|
||||||
@ -451,9 +451,9 @@ class Gramps:
|
|||||||
#FIXME: revert to stock item when German gtk translation is fixed
|
#FIXME: revert to stock item when German gtk translation is fixed
|
||||||
#item = gtk.ImageMenuItem(gtk.STOCK_HOME)
|
#item = gtk.ImageMenuItem(gtk.STOCK_HOME)
|
||||||
item = gtk.ImageMenuItem(_("Home"))
|
item = gtk.ImageMenuItem(_("Home"))
|
||||||
im = gtk.image_new_from_stock(gtk.STOCK_HOME,gtk.ICON_SIZE_MENU)
|
im = gtk.image_new_from_stock(gtk.STOCK_HOME,gtk.ICON_SIZE_MENU)
|
||||||
im.show()
|
im.show()
|
||||||
item.set_image(im)
|
item.set_image(im)
|
||||||
item.connect("activate",self.on_home_clicked)
|
item.connect("activate",self.on_home_clicked)
|
||||||
item.add_accelerator("activate", self.accel_group,
|
item.add_accelerator("activate", self.accel_group,
|
||||||
gtk.gdk.keyval_from_name("Home"),
|
gtk.gdk.keyval_from_name("Home"),
|
||||||
@ -955,7 +955,7 @@ class Gramps:
|
|||||||
self.people_view.build_tree()
|
self.people_view.build_tree()
|
||||||
if Utils.wasHistory_broken():
|
if Utils.wasHistory_broken():
|
||||||
self.clear_history()
|
self.clear_history()
|
||||||
Utils.clearHistory_broken()
|
Utils.clearHistory_broken()
|
||||||
self.people_view.apply_filter()
|
self.people_view.apply_filter()
|
||||||
if not self.active_person:
|
if not self.active_person:
|
||||||
self.change_active_person(self.find_initial_person())
|
self.change_active_person(self.find_initial_person())
|
||||||
@ -1222,7 +1222,7 @@ class Gramps:
|
|||||||
# File is lost => ask what to do
|
# File is lost => ask what to do
|
||||||
if missmedia_action == 0:
|
if missmedia_action == 0:
|
||||||
mmd = MissingMediaDialog(_("Media object could not be found"),
|
mmd = MissingMediaDialog(_("Media object could not be found"),
|
||||||
_("%(file_name)s is referenced in the database, but no longer exists. "
|
_("%(file_name)s is referenced in the database, but no longer exists. "
|
||||||
"The file may have been deleted or moved to a different location. "
|
"The file may have been deleted or moved to a different location. "
|
||||||
"You may choose to either remove the reference from the database, "
|
"You may choose to either remove the reference from the database, "
|
||||||
"keep the reference to the missing file, or select a new file."
|
"keep the reference to the missing file, or select a new file."
|
||||||
@ -1456,7 +1456,7 @@ class Gramps:
|
|||||||
except:
|
except:
|
||||||
DisplayTrace.DisplayTrace()
|
DisplayTrace.DisplayTrace()
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def fs_close_window(self,obj):
|
def fs_close_window(self,obj):
|
||||||
self.filesel.destroy()
|
self.filesel.destroy()
|
||||||
|
|
||||||
@ -1624,7 +1624,7 @@ class Gramps:
|
|||||||
return _("Unknown")
|
return _("Unknown")
|
||||||
else:
|
else:
|
||||||
return GrampsCfg.nameof(person)
|
return GrampsCfg.nameof(person)
|
||||||
|
|
||||||
def load_progress(self,value):
|
def load_progress(self,value):
|
||||||
self.statusbar.set_progress_percentage(value)
|
self.statusbar.set_progress_percentage(value)
|
||||||
while gtk.events_pending():
|
while gtk.events_pending():
|
||||||
|
@ -79,9 +79,9 @@ def build_report(database,person):
|
|||||||
|
|
||||||
for person_id in personList:
|
for person_id in personList:
|
||||||
person = database.try_to_find_person_from_id(person_id)
|
person = database.try_to_find_person_from_id(person_id)
|
||||||
if not person:
|
if not person:
|
||||||
continue
|
continue
|
||||||
length = len(person.get_media_list())
|
length = len(person.get_media_list())
|
||||||
if length > 0:
|
if length > 0:
|
||||||
with_photos = with_photos + 1
|
with_photos = with_photos + 1
|
||||||
total_photos = total_photos + length
|
total_photos = total_photos + length
|
||||||
|
Loading…
Reference in New Issue
Block a user