From be7b042fda5d2249ea825d4b0989284978ad8137 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sun, 15 Feb 2004 03:24:12 +0000 Subject: [PATCH] * src/plugins/DetDescendantReport.py: Add style descriptions for the paragraphs. Add first entry style. Change defaults to be similar to the FTM style reports. * src/plugins/DetAncestralReport.py: Add style descriptions for the paragraphs. Add first entry style. Change defaults to be similar to the FTM style reports. * src/StyleEditor.py (draw, save_paragraph): Allow users to adjust first line indent. * src/styles.glade: Add first line indent entry. * src/plugins/Check.py (delete_empty_family): Remove families in which person is a parent, not only a child. * src/gramps_main.py (post_load): Use display_frel and display_fattr. * src/MediaView.py (key_press): Add function. * src/PlaceView.py (key_press): Add function. * src/SourceView.py (key_press): Add function. * src/plugins/WebPage.py: Add tab with index page options. * src/po/hu.po: Update * doc/gramps-manual/hu/filtref.xml: Update svn: r2831 --- gramps2/ChangeLog | 23 ++ gramps2/doc/gramps-manual/hu/filtref.xml | 2 +- gramps2/src/MediaView.py | 10 +- gramps2/src/PlaceView.py | 8 + gramps2/src/SourceView.py | 10 +- gramps2/src/StyleEditor.py | 6 +- gramps2/src/gramps_main.py | 10 +- gramps2/src/plugins/Check.py | 1 + gramps2/src/plugins/DetAncestralReport.py | 18 +- gramps2/src/plugins/DetDescendantReport.py | 18 +- gramps2/src/plugins/WebPage.py | 214 +++++++++++--- gramps2/src/po/hu.po | 12 +- gramps2/src/styles.glade | 314 +++++++++++++-------- 13 files changed, 480 insertions(+), 166 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 4cc0542c0..685168d42 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,26 @@ +2004-02-14 Alex Roitman + * src/plugins/DetDescendantReport.py: Add style descriptions + for the paragraphs. Add first entry style. Change defaults to be + similar to the FTM style reports. + * src/plugins/DetAncestralReport.py: Add style descriptions + for the paragraphs. Add first entry style. Change defaults to be + similar to the FTM style reports. + * src/StyleEditor.py (draw, save_paragraph): Allow users + to adjust first line indent. + * src/styles.glade: Add first line indent entry. + * src/plugins/Check.py (delete_empty_family): Remove families + in which person is a parent, not only a child. + * src/gramps_main.py (post_load): Use display_frel and + display_fattr. + * src/MediaView.py (key_press): Add function. + * src/PlaceView.py (key_press): Add function. + * src/SourceView.py (key_press): Add function. + * src/plugins/WebPage.py: Add tab with index page options. + +2004-02-13 Egyeki Gergely + * src/po/hu.po: Update + * doc/gramps-manual/hu/filtref.xml: Update + 2004-02-14 Don Allingham * src/Marriage.py: fix title and places * src/FamilyView.py: fix child relations and spouse's parents diff --git a/gramps2/doc/gramps-manual/hu/filtref.xml b/gramps2/doc/gramps-manual/hu/filtref.xml index 4a203b64b..54b1f0892 100644 --- a/gramps2/doc/gramps-manual/hu/filtref.xml +++ b/gramps2/doc/gramps-manual/hu/filtref.xml @@ -182,7 +182,7 @@ Eredmény akkor és csak akkor lehet, ha a nem üres mezők értékei megegyeznek (akár részlegesen) egy személy - életének (azonos „időben” éltek) adataival. Csak egy érték használatához + kapcsolatainak az adataival. Egy érték használatához egy mező kitöltése és a többi üresen hagyása szűkséges. diff --git a/gramps2/src/MediaView.py b/gramps2/src/MediaView.py index 7d3f2c5c3..2f48ba3cb 100644 --- a/gramps2/src/MediaView.py +++ b/gramps2/src/MediaView.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2001-2003 Donald N. Allingham +# Copyright (C) 2001-2004 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -120,6 +120,7 @@ class MediaView: self.update = update self.list.connect('button-press-event',self.on_button_press_event) + self.list.connect('key-press-event',self.key_press) self.selection.connect('changed',self.on_select_row) if not (RelImage.is_pil() or RelImage.is_cnv() ): WarningDialog(_("Thumbnails not available") @@ -182,6 +183,13 @@ class MediaView: return 1 return 0 + def key_press(self,obj,event): + if event.keyval == gtk.gdk.keyval_from_name("Return") \ + and not event.state: + self.on_edit_clicked(obj) + return 1 + return 0 + def build_context_menu(self,event): menu = gtk.Menu() menu.set_title(_("Media Object")) diff --git a/gramps2/src/PlaceView.py b/gramps2/src/PlaceView.py index 7cdc51a76..f300e865b 100644 --- a/gramps2/src/PlaceView.py +++ b/gramps2/src/PlaceView.py @@ -98,6 +98,7 @@ class PlaceView: self.list.set_model(self.model) self.selection = self.list.get_selection() self.list.connect('button-press-event',self.button_press) + self.list.connect('key-press-event',self.key_press) self.topWindow = self.glade.get_widget("gramps") def on_click(self,column): @@ -170,6 +171,13 @@ class PlaceView: return 1 return 0 + def key_press(self,obj,event): + if event.keyval == gtk.gdk.keyval_from_name("Return") \ + and not event.state: + self.on_edit_clicked(obj) + return 1 + return 0 + def build_context_menu(self,event): """Builds the menu with editing operations on the place's list""" diff --git a/gramps2/src/SourceView.py b/gramps2/src/SourceView.py index d2423767b..648d1d748 100644 --- a/gramps2/src/SourceView.py +++ b/gramps2/src/SourceView.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2001-2003 Donald N. Allingham +# Copyright (C) 2001-2004 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -121,6 +121,7 @@ class SourceView: self.model.set(iter, 0, val[0], 1, val[1], 2, val[2], 3, val[3], 4, val[4]) self.list.connect('button-press-event',self.button_press) + self.list.connect('key-press-event',self.key_press) self.list.set_model(self.model) def button_press(self,obj,event): @@ -135,6 +136,13 @@ class SourceView: return 1 return 0 + def key_press(self,obj,event): + if event.keyval == gtk.gdk.keyval_from_name("Return") \ + and not event.state: + self.on_edit_clicked(obj) + return 1 + return 0 + def build_context_menu(self,event): """Builds the menu with editing operations on the source's list""" diff --git a/gramps2/src/StyleEditor.py b/gramps2/src/StyleEditor.py index d42647da1..83de82fbd 100644 --- a/gramps2/src/StyleEditor.py +++ b/gramps2/src/StyleEditor.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2003 Donald N. Allingham +# Copyright (C) 2000-2004 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + """ Paragraph/Font style editor """ @@ -224,6 +226,7 @@ class StyleEditor: self.top.get_widget("rmargin").set_text(locale.str(p.get_right_margin())) self.top.get_widget("lmargin").set_text(locale.str(p.get_left_margin())) self.top.get_widget("pad").set_text(locale.str(p.get_padding())) + self.top.get_widget("indent").set_text(locale.str(p.get_first_indent())) self.top.get_widget("tborder").set_active(p.get_top_border()) self.top.get_widget("lborder").set_active(p.get_left_border()) self.top.get_widget("rborder").set_active(p.get_right_border()) @@ -270,6 +273,7 @@ class StyleEditor: p.set_right_margin(Utils.gfloat(self.top.get_widget("rmargin").get_text())) p.set_left_margin(Utils.gfloat(self.top.get_widget("lmargin").get_text())) p.set_padding(Utils.gfloat(self.top.get_widget("pad").get_text())) + p.set_first_indent(Utils.gfloat(self.top.get_widget("indent").get_text())) p.set_top_border(self.top.get_widget("tborder").get_active()) p.set_left_border(self.top.get_widget("lborder").get_active()) p.set_right_border(self.top.get_widget("rborder").get_active()) diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 278828eb0..d9e08548e 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -1702,13 +1702,15 @@ class Gramps: mylist = self.db.get_family_attribute_types() for type in mylist: - if type not in const.familyAttributes: - const.familyAttributes.append(type) + ntype = const.display_fattr(type) + if ntype not in const.familyAttributes: + const.familyAttributes.append(ntype) mylist = self.db.get_family_relation_types() for type in mylist: - if type not in const.familyRelations: - const.familyRelations.append(type) + ntype = const.display_frel(type) + if ntype not in const.familyRelations: + const.familyRelations.append(ntype) except: pass diff --git a/gramps2/src/plugins/Check.py b/gramps2/src/plugins/Check.py index acd0f0551..b5995a24d 100644 --- a/gramps2/src/plugins/Check.py +++ b/gramps2/src/plugins/Check.py @@ -216,6 +216,7 @@ class CheckIntegrity: for key in self.db.get_person_keys(): child = self.db.get_person(key) child.remove_parent_family_id(family.get_id()) + child.remove_family_id(family.get_id()) self.db.delete_family(family.get_id()) def check_parent_relationships(self): diff --git a/gramps2/src/plugins/DetAncestralReport.py b/gramps2/src/plugins/DetAncestralReport.py index 5d32d3e9a..19314a52f 100644 --- a/gramps2/src/plugins/DetAncestralReport.py +++ b/gramps2/src/plugins/DetAncestralReport.py @@ -198,7 +198,7 @@ class DetAncestorReport(Report.Report): def write_person(self, key, rptOptions): """Output birth, death, parentage, marriage and notes information """ - self.doc.start_paragraph("DAR-Entry","%s." % str(key)) + self.doc.start_paragraph("DAR-First-Entry","%s." % str(key)) person = self.map[key] if rptOptions.addImages == reportOptions.Yes: @@ -640,6 +640,7 @@ def _make_default_style(default_style): para.set_font(font) para.set_header_level(1) para.set(pad=0.5) + para.set_description(_('The style used for the title of the page.')) default_style.add_style("DAR-Title",para) font = BaseDoc.FontStyle() @@ -648,6 +649,7 @@ def _make_default_style(default_style): para.set_font(font) para.set_header_level(2) para.set(pad=0.5) + para.set_description(_('The style used for the generation header.')) default_style.add_style("DAR-Generation",para) font = BaseDoc.FontStyle() @@ -655,15 +657,17 @@ def _make_default_style(default_style): para = BaseDoc.ParagraphStyle() para.set_font(font) #para.set_header_level(3) - para.set_left_margin(0.0) # in centimeters + para.set_left_margin(1.0) # in centimeters para.set(pad=0.5) + para.set_description(_('The style used for the children list title.')) default_style.add_style("DAR-ChildTitle",para) font = BaseDoc.FontStyle() font.set(face=BaseDoc.FONT_SANS_SERIF,size=9) para = BaseDoc.ParagraphStyle() para.set_font(font) - para.set(first_indent=0.0,lmargin=0.0,pad=0.25) + para.set(first_indent=0.0,lmargin=1.0,pad=0.25) + para.set_description(_('The style used for the children list.')) default_style.add_style("DAR-ChildList",para) para = BaseDoc.ParagraphStyle() @@ -671,9 +675,15 @@ def _make_default_style(default_style): default_style.add_style("DAR-NoteHeader",para) para = BaseDoc.ParagraphStyle() - para.set(first_indent=0.5,lmargin=0.0,pad=0.25) + para.set(first_indent=0.5,lmargin=1.0,pad=0.25) + para.set_description(_('The basic style used for the text display.')) default_style.add_style("DAR-Entry",para) + para = BaseDoc.ParagraphStyle() + para.set(first_indent=-1.0,lmargin=1.0,pad=0.25) + para.set_description(_('The style used for the first personal entry.')) + default_style.add_style("DAR-First-Entry",para) + table = BaseDoc.TableStyle() table.set_width(1000) table.set_columns(3) diff --git a/gramps2/src/plugins/DetDescendantReport.py b/gramps2/src/plugins/DetDescendantReport.py index 6f4382613..850ddd4a7 100644 --- a/gramps2/src/plugins/DetDescendantReport.py +++ b/gramps2/src/plugins/DetDescendantReport.py @@ -205,7 +205,7 @@ class DetDescendantReport(Report.Report): def write_person(self, key, rptOptions): """Output birth, death, parentage, marriage and notes information """ - self.doc.start_paragraph("DDR-Entry","%s." % str(key)) + self.doc.start_paragraph("DDR-First-Entry","%s." % str(key)) person = self.map[key] if rptOptions.addImages == reportOptions.Yes: @@ -648,6 +648,7 @@ def _make_default_style(default_style): para.set_font(font) para.set_header_level(1) para.set(pad=0.5) + para.set_description(_('The style used for the title of the page.')) default_style.add_style("DDR-Title",para) font = BaseDoc.FontStyle() @@ -656,6 +657,7 @@ def _make_default_style(default_style): para.set_font(font) para.set_header_level(2) para.set(pad=0.5) + para.set_description(_('The style used for the generation header.')) default_style.add_style("DDR-Generation",para) font = BaseDoc.FontStyle() @@ -663,25 +665,33 @@ def _make_default_style(default_style): para = BaseDoc.ParagraphStyle() para.set_font(font) #para.set_header_level(3) - para.set_left_margin(0.0) # in centimeters + para.set_left_margin(1.0) # in centimeters para.set(pad=0.5) + para.set_description(_('The style used for the children list title.')) default_style.add_style("DDR-ChildTitle",para) font = BaseDoc.FontStyle() font.set(face=BaseDoc.FONT_SANS_SERIF,size=9) para = BaseDoc.ParagraphStyle() para.set_font(font) - para.set(first_indent=0.0,lmargin=0.0,pad=0.25) + para.set(first_indent=0.0,lmargin=1.0,pad=0.25) + para.set_description(_('The style used for the children list.')) default_style.add_style("DDR-ChildList",para) para = BaseDoc.ParagraphStyle() - para.set(first_indent=0.0,lmargin=0.0,pad=0.25) + para.set(first_indent=0.0,lmargin=1.0,pad=0.25) + para.set_description(_('The style used for the notes section header.')) default_style.add_style("DDR-NoteHeader",para) para = BaseDoc.ParagraphStyle() para.set(first_indent=0.5,lmargin=0.0,pad=0.25) default_style.add_style("DDR-Entry",para) + para = BaseDoc.ParagraphStyle() + para.set(first_indent=-1.0,lmargin=1.0,pad=0.25) + para.set_description(_('The style used for the first personal entry.')) + default_style.add_style("DDR-First-Entry",para) + table = BaseDoc.TableStyle() table.set_width(1000) table.set_columns(3) diff --git a/gramps2/src/plugins/WebPage.py b/gramps2/src/plugins/WebPage.py index 3fadff78b..c87779845 100644 --- a/gramps2/src/plugins/WebPage.py +++ b/gramps2/src/plugins/WebPage.py @@ -39,6 +39,7 @@ import shutil # #------------------------------------------------------------------------ import gtk +import gnome.ui #------------------------------------------------------------------------ # @@ -227,10 +228,10 @@ class IndividualPage: person = self.db.find_person_from_id(person_id) if self.list.has_key(person.get_id()): self.doc.start_link("%s.%s" % (person.get_id(),self.ext)) - self.doc.write_text(person.get_primary_name().get_regular_name()) + self.doc.write_text(person.getPrimaryName().getRegularName()) self.doc.end_link() else: - self.doc.write_text(person.get_primary_name().get_regular_name()) + self.doc.write_text(person.get_primary_name().get_regular_name()) self.doc.end_paragraph() self.doc.end_cell() @@ -653,7 +654,8 @@ class IndividualPage: class WebReport(Report.Report): def __init__(self,db,person,target_path,max_gen,photos,filter,restrict, private, srccomments, include_link, include_mini_tree, - style, image_dir, template_name,use_id,id_link,gendex,ext): + style, image_dir, template_name,use_id,id_link,gendex,ext, + include_alpha_links,separate_alpha,n_cols,ind_template_name): self.db = db self.ext = ext self.use_id = use_id @@ -672,6 +674,10 @@ class WebReport(Report.Report): self.image_dir = image_dir self.use_gendex = gendex self.template_name = template_name + self.include_alpha_links = include_alpha_links + self.separate_alpha = separate_alpha + self.n_cols = n_cols + self.ind_template_name = ind_template_name def get_progressbar_data(self): return (_("Generate HTML reports - GRAMPS"), _("Creating Web Pages")) @@ -780,35 +786,99 @@ class WebReport(Report.Report): else: a[''] = 1 - col_len = len(person_list) + len(a.keys()) - col_len = col_len/2 - - doc.write_raw('') - doc.write_raw('
') - last = '' - end_col = 0 - for person in person_list: - name = person.get_primary_name().get_name() - if name and name[0] != last: - last = name[0] - doc.start_paragraph('IndexLabel') - doc.write_text(name[0]) - doc.end_paragraph() - col_len = col_len - 1 - doc.start_link("%s.%s" % (person.get_id(),self.ext)) - doc.write_text(name) - doc.end_link() - if col_len <= 0 and end_col == 0: - doc.write_raw('') - doc.start_paragraph('IndexLabel') - doc.write_text(_("%s (continued)") % name[0]) - doc.end_paragraph() - end_col = 1 + section_number = 1 + link_keys = a.keys() + link_keys.sort() + for n in link_keys: + a[n] = section_number + section_number = section_number + 1 + + if self.include_alpha_links: + doc.start_paragraph('IndexLabelLinks') + if self.separate_alpha: + link_str = "index_%%03d.%s" % self.ext else: - doc.newline() - col_len = col_len - 1 - doc.write_raw('
') - doc.close() + link_str = "#%03d" + for n in link_keys: + doc.start_link(link_str % a[n]) + doc.write_text(n) + doc.end_link() + doc.write_text(' ') + doc.end_paragraph() + + if self.separate_alpha: + doc.close() + for n in link_keys: + p_list = [ p for p in person_list if \ + (p.get_primary_name().get_surname() \ + and (p.get_primary_name().get_surname()[0] == n) ) ] + doc = HtmlLinkDoc(self.selected_style,None,template,None) + doc.set_extension(self.ext) + doc.set_title(_("Section %s") % n) + + doc.open("%s/index_%03d.%s" % (html_dir,a[n],self.ext)) + doc.start_paragraph("Title") + doc.write_text(_("Section %s") % n) + doc.end_paragraph() + + n_rows = len(p_list)/self.n_cols + td_width = 100/self.n_cols + + doc.write_raw('') + doc.write_raw('
' % td_width) + col_len = n_rows + + for person in p_list: + name = person.get_primary_name().get_surname() + + doc.start_link("%s.%s" % (person.get_id(),self.ext)) + doc.write_text(name) + doc.end_link() + + if col_len <= 0: + doc.write_raw('' % td_width) + col_len = n_rows + else: + doc.newline() + col_len = col_len - 1 + doc.write_raw('
') + doc.close() + else: + n_rows = len(person_list) + len(link_keys) + n_rows = n_rows/self.n_cols + td_width = 100/self.n_cols + + doc.write_raw('') + doc.write_raw('
' % td_width) + col_len = n_rows + for n in link_keys: + p_list = [ p for p in person_list if \ + (p.get_primary_name().get_surname() \ + and (p.get_primary_name().get_surname()[0] == n) ) ] + doc.start_paragraph('IndexLabel') + if self.include_alpha_links: + doc.write_linktarget("%03d" % a[n]) + doc.write_text(n) + doc.end_paragraph() + col_len = col_len - 1 + + for person in p_list: + name = person.get_primary_name().get_surname() + + doc.start_link("%s.%s" % (person.get_id(),self.ext)) + doc.write_text(name) + doc.end_link() + if col_len <= 0: + doc.write_raw('' % td_width) + doc.start_paragraph('IndexLabel') + doc.write_text(_("%s (continued)") % n) + doc.end_paragraph() + col_len = n_rows + else: + doc.newline() + col_len = col_len - 1 + doc.write_raw('
') + doc.close() def write_report(self): dir_name = self.target_path @@ -879,7 +949,7 @@ class WebReport(Report.Report): if len(ind_list) > 1: self.dump_index(ind_list,self.selected_style, - self.template_name,dir_name) + self.ind_template_name,dir_name) if self.use_gendex == 1: self.dump_gendex(ind_list,dir_name) self.progress_bar_done() @@ -925,6 +995,8 @@ class WebReportDialog(Report.ReportDialog): gendex_msg = _("Create a GENDEX index") imgdir_msg = _("Image subdirectory") ext_msg = _("File extension") + alpha_links_msg = _("Links to alphabetical sections in index page") + sep_alpha_msg = _("Split alphabetical sections to separate pages") tree_msg = _("Include short ancestor tree") self.mini_tree = gtk.CheckButton(tree_msg) @@ -949,10 +1021,35 @@ class WebReportDialog(Report.ReportDialog): self.ext.set_popdown_strings(['.html','.htm','.php','.php3', '.cgi']) + self.use_alpha_links = gtk.CheckButton(alpha_links_msg) + self.use_sep_alpha = gtk.CheckButton(sep_alpha_msg) + self.use_sep_alpha.set_sensitive(0) + self.use_n_cols = gtk.SpinButton() + self.use_n_cols.set_value(2) + self.use_n_cols.set_digits(0) + self.use_n_cols.set_increments(1,2) + self.use_n_cols.set_range(1,5) + self.use_n_cols.set_numeric(gtk.TRUE) + self.ind_template = gtk.Combo() + template_list = [ Report._default_template ] + tlist = Report._template_map.keys() + tlist.sort() + for template in tlist: + if template != Report._user_template: + template_list.append(template) + template_list.append(Report._user_template) + self.ind_template.set_popdown_strings(template_list) + self.ind_template.entry.set_editable(0) + self.ind_user_template = gnome.ui.FileEntry("HTML_Template",_("Choose File")) + self.ind_user_template.set_sensitive(0) + self.add_option(imgdir_msg,self.imgdir) self.add_option('',self.mini_tree) self.add_option('',self.use_link) + self.use_alpha_links.connect('toggled',self.on_use_alpha_links_toggled) + self.ind_template.entry.connect('changed',self.ind_template_changed) + title = _("Privacy") self.add_frame_option(title,None,self.no_private) self.add_frame_option(title,None,self.restrict_living) @@ -960,6 +1057,13 @@ class WebReportDialog(Report.ReportDialog): self.add_frame_option(title,None,self.no_living_images) self.add_frame_option(title,None,self.no_comments) + title = _('Index page') + self.add_frame_option(title,_('Template'),self.ind_template) + self.add_frame_option(title,_("User Template"),self.ind_user_template) + self.add_frame_option(title,None,self.use_alpha_links) + self.add_frame_option(title,None,self.use_sep_alpha) + self.add_frame_option(title,_('Number of columns'),self.use_n_cols) + title = _('Advanced') self.add_frame_option(title,'',self.include_id) self.add_frame_option(title,_('GRAMPS ID link URL'),self.linkpath) @@ -1076,6 +1180,13 @@ class WebReportDialog(Report.ReportDialog): p.set_description(_("The style used on the index page that labels each section.")) self.default_style.add_style("IndexLabel",p) + font = BaseDoc.FontStyle() + font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=14,italic=1) + p = BaseDoc.ParagraphStyle() + p.set(font=font,align=BaseDoc.PARA_ALIGN_CENTER) + p.set_description(_("The style used on the index page that labels links to each section.")) + self.default_style.add_style("IndexLabelLinks",p) + font = BaseDoc.FontStyle() font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12,italic=1) p = BaseDoc.ParagraphStyle() @@ -1204,6 +1315,21 @@ class WebReportDialog(Report.ReportDialog): else: self.photos = 2 + text = unicode(self.ind_template.entry.get_text()) + if Report._template_map.has_key(text): + if text == Report._user_template: + self.ind_template_name = self.ind_user_template.get_full_path(0) + else: + self.ind_template_name = "%s/%s" % (const.template_dir,Report._template_map[text]) + else: + self.ind_template_name = None + self.include_alpha_links = self.use_alpha_links.get_active() + if self.include_alpha_links: + self.separate_alpha = self.use_sep_alpha.get_active() + else: + self.separate_alpha = 0 + self.n_cols = self.use_n_cols.get_value() + #------------------------------------------------------------------------ # # Callback functions from the dialog @@ -1219,6 +1345,26 @@ class WebReportDialog(Report.ReportDialog): else: self.no_living_images.set_sensitive(1) + def on_use_alpha_links_toggled(self,obj): + """Keep the 'split alpha sections to separate pages' checkbox in + line with the 'use alpha links' checkbox. If there are no alpha + links included, it makes no sense to worry about splitting or not + the alpha link target to separate pages.""" + if obj.get_active(): + self.use_sep_alpha.set_sensitive(1) + else: + self.use_sep_alpha.set_sensitive(0) + + def ind_template_changed(self,obj): + text = unicode(obj.get_text()) + if Report._template_map.has_key(text): + if Report._template_map[text]: + self.ind_user_template.set_sensitive(0) + else: + self.ind_user_template.set_sensitive(1) + else: + self.ind_user_template.set_sensitive(0) + #------------------------------------------------------------------------ # # Functions related to creating the actual report document. @@ -1235,7 +1381,9 @@ class WebReportDialog(Report.ReportDialog): self.selected_style, self.img_dir_text,self.template_name, self.use_id,self.id_link,self.use_gendex, - self.html_ext) + self.html_ext,self.include_alpha_links, + self.separate_alpha,self.n_cols, + self.ind_template_name) MyReport.write_report() except Errors.FilterError, msg: (m1,m2) = msg.messages() diff --git a/gramps2/src/po/hu.po b/gramps2/src/po/hu.po index 1fc002791..009f32624 100644 --- a/gramps2/src/po/hu.po +++ b/gramps2/src/po/hu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: hu\n" "POT-Creation-Date: Tue Feb 3 21:41:23 2004\n" -"PO-Revision-Date: 2004-02-04 23:59+0100\n" +"PO-Revision-Date: 2004-02-12 22:08+0100\n" "Last-Translator: Egyeki Gergely \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -2578,7 +2578,7 @@ msgstr "Házassági név" #: const.py:466 msgid "Other Name" -msgstr "Más név" +msgstr "Egyéb név" #: const.py:861 msgid "Child" @@ -7128,7 +7128,7 @@ msgstr "Nem lehet létrehozni a könyvtárat : %s" #: plugins/WebPage.py:902 msgid "Include a link to the index page" -msgstr "Index oldalra hivatkozás hozzáadása" +msgstr "Főoldalra mutató link hozzáadása" #: plugins/WebPage.py:903 plugins/pafexport.glade:276 msgid "Do not include records marked private" @@ -7168,7 +7168,7 @@ msgstr "Fájl kiterjesztés" #: plugins/WebPage.py:913 msgid "Include short ancestor tree" -msgstr "Rövidített ősökfa hozzáadása" +msgstr "Kicsinyített családfa hozzáadása" #: plugins/WebPage.py:940 msgid "Privacy" @@ -7196,11 +7196,11 @@ msgstr "Célkönyvtár" #: plugins/WebPage.py:989 msgid "Direct Descendants of %s" -msgstr "%s egyenes leszármazottjai" +msgstr "%s egyenes leszármazottai" #: plugins/WebPage.py:993 msgid "Descendant Families of %s" -msgstr "%s utódainak a családjai" +msgstr "%s utódainak a családja" #: plugins/WebPage.py:1031 msgid "The style used for the header that identifies facts and events." diff --git a/gramps2/src/styles.glade b/gramps2/src/styles.glade index 7037b1352..1aaae6f2b 100644 --- a/gramps2/src/styles.glade +++ b/gramps2/src/styles.glade @@ -381,8 +381,6 @@ False GTK_POS_TOP False - 2 - 2 False @@ -789,7 +787,7 @@ 12 True - 13 + 15 6 False 6 @@ -1053,27 +1051,6 @@ - - - True - True - Le_ft - True - GTK_RELIEF_NORMAL - False - False - True - - - 1 - 2 - 12 - 13 - fill - - - - True @@ -1140,69 +1117,6 @@ - - - True - True - Ri_ght - True - GTK_RELIEF_NORMAL - False - False - True - - - 2 - 3 - 12 - 13 - fill - - - - - - - True - True - _Bottom - True - GTK_RELIEF_NORMAL - False - False - True - - - 4 - 5 - 12 - 13 - fill - - - - - - - True - True - _Top - True - GTK_RELIEF_NORMAL - False - False - True - - - 3 - 4 - 12 - 13 - fill - - - - True @@ -1251,30 +1165,6 @@ - - - True - <b>Borders</b> - False - True - GTK_JUSTIFY_CENTER - False - False - 0 - 0 - 0 - 0 - - - 0 - 6 - 11 - 12 - fill - - - - True @@ -1323,6 +1213,208 @@ fill + + + + True + <b>Borders</b> + False + True + GTK_JUSTIFY_CENTER + False + False + 0 + 0 + 0 + 0 + + + 0 + 6 + 13 + 14 + fill + + + + + + + True + True + Le_ft + True + GTK_RELIEF_NORMAL + False + False + True + + + 1 + 2 + 14 + 15 + fill + + + + + + + True + True + Ri_ght + True + GTK_RELIEF_NORMAL + False + False + True + + + 2 + 3 + 14 + 15 + fill + + + + + + + True + True + _Top + True + GTK_RELIEF_NORMAL + False + False + True + + + 3 + 4 + 14 + 15 + fill + + + + + + + True + True + _Bottom + True + GTK_RELIEF_NORMAL + False + False + True + + + 4 + 5 + 14 + 15 + fill + + + + + + + True + <b>First line</b> + False + True + GTK_JUSTIFY_CENTER + False + False + 0 + 0 + 0 + 0 + + + 0 + 6 + 11 + 12 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 2 + 4 + 12 + 13 + + + + + + + True + cm + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 4 + 5 + 12 + 13 + fill + + + + + + + True + I_ndent: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + pad + + + 1 + 2 + 12 + 13 + fill + + + False