diff --git a/gramps2/src/Report.py b/gramps2/src/Report.py index 0ac919c3b..dcfd9e3ca 100644 --- a/gramps2/src/Report.py +++ b/gramps2/src/Report.py @@ -252,6 +252,18 @@ class Report: put at the top of the contents of the dialog box.""" return ("%s - GRAMPS" % _("Progress Report"), _("Working")) + def progress_bar_title(self,name,length): + markup = '%s' + self.lbl.set_text(markup % name) + self.lbl.set_use_markup(True) + self.pbar.set_fraction(0.0) + + progress_steps = length + if length > 1: + progress_steps = progress_steps+1 + progress_steps = progress_steps+1 + self.pbar_max = length + def progress_bar_setup(self,total): """Create a progress dialog. This routine calls a customization function to find out how to fill out the dialog. @@ -265,10 +277,12 @@ class Report: self.ptop = gtk.Dialog() self.ptop.set_has_separator(False) self.ptop.set_title(title) - lbl = gtk.Label(header) - lbl.set_use_markup(True) - self.ptop.vbox.add(lbl) + self.ptop.set_border_width(12) + self.lbl = gtk.Label(header) + self.lbl.set_use_markup(True) + self.ptop.vbox.add(self.lbl) self.ptop.vbox.set_spacing(10) + self.ptop.vbox.set_border_width(24) self.pbar = gtk.ProgressBar() self.pbar_max = total self.pbar_index = 0.0 @@ -288,6 +302,8 @@ class Report: self.pbar.set_text("%d of %d (%.1f%%)" % (self.pbar_index,self.pbar_max,(val*100))) self.pbar.set_fraction(val) + while gtk.events_pending(): + gtk.main_iteration() def progress_bar_done(self): """Done with the progress bar. It can be destroyed now.""" diff --git a/gramps2/src/ReportUtils.py b/gramps2/src/ReportUtils.py index 10ab82089..e1fe71196 100644 --- a/gramps2/src/ReportUtils.py +++ b/gramps2/src/ReportUtils.py @@ -376,6 +376,9 @@ def sanitize_person(db,person): return new_person +def dont_restrict(db,person): + return person + def restrict_with_names(db,person): return restrict_person(db,person,False) diff --git a/gramps2/src/plugins/NavWebPage.py b/gramps2/src/plugins/NavWebPage.py index cd828589e..5ab9b8ec3 100644 --- a/gramps2/src/plugins/NavWebPage.py +++ b/gramps2/src/plugins/NavWebPage.py @@ -24,12 +24,6 @@ Narrative Web Page generator. """ -# -# TODO: -# -# 1) Privacy options -# - #------------------------------------------------------------------------ # # python modules @@ -138,9 +132,14 @@ class BasePage: self.levels = levels def copy_media(self,photo): - if (photo.get_handle() != self.photo_list - and photo.get_handle() not in self.photo_list): - self.photo_list.append(photo.get_handle()) + + handle = photo.get_handle() + if self.photo_list.has_key(handle): + if self.person.handle not in self.photo_list[handle]: + self.photo_list[handle].append(self.person.handle) + else: + self.photo_list[handle] = [self.person.handle] + newpath = photo.gramps_id + os.path.splitext(photo.get_path())[1] real_path = os.path.join('images',newpath) thumb_path = os.path.join('thumb',newpath) @@ -673,8 +672,6 @@ class PlacePage(BasePage): of.write('\n') of.write('\n') - # TODO: Add more information - self.display_additional_images_as_gallery(of, db, place.get_media_list()) self.display_note_object(of, place.get_note_object()) self.display_url_list(of, place.get_url_list()) @@ -762,7 +759,7 @@ class MediaPage(BasePage): self.display_note_object(of, photo.get_note_object()) self.display_attr_list(of, photo.get_attribute_list()) - + self.display_references(of,db,media_list) self.display_footer(of,db) self.close_file(of) @@ -1035,8 +1032,9 @@ class GalleryPage(BasePage): self.db = db index = 1 - media_list.sort(self.by_media_title) - for handle in media_list: + mlist = media_list.keys() + mlist.sort(self.by_media_title) + for handle in mlist: media = db.get_object_from_handle(handle) of.write('