diff --git a/gramps/src/AddSpouse.py b/gramps/src/AddSpouse.py index f5345bf24..609be67f8 100644 --- a/gramps/src/AddSpouse.py +++ b/gramps/src/AddSpouse.py @@ -21,14 +21,6 @@ The AddSpouse module provides the AddSpouse class that allows the user to add a new spouse to the active person. """ - -#------------------------------------------------------------------------- -# -# Standard python modules -# -#------------------------------------------------------------------------- -import string - #------------------------------------------------------------------------- # # internationalization diff --git a/gramps/src/AutoComp.py b/gramps/src/AutoComp.py index 768d4a850..fa15bd7a0 100644 --- a/gramps/src/AutoComp.py +++ b/gramps/src/AutoComp.py @@ -73,6 +73,8 @@ class AutoCompBase: """ entry.select_region(0, 0) + def timer_callback(self,entry): + pass class AutoCombo(AutoCompBase): """ diff --git a/gramps/src/ChooseParents.py b/gramps/src/ChooseParents.py index 6eb6cf13a..038ebdaaf 100644 --- a/gramps/src/ChooseParents.py +++ b/gramps/src/ChooseParents.py @@ -218,9 +218,6 @@ class ChooseParents: mother_rel = const.childRelations[self.mother_rel.get_text()] father_rel = const.childRelations[self.father_rel.get_text()] - msel = self.mother_list.selection - fsel = self.father_list.selection - if self.father or self.mother: if self.mother and not self.father: if self.mother.getGender() == RelLib.Person.male: @@ -297,23 +294,3 @@ class ChooseParents: self.person.addAltFamily(family,mother_rel,father_rel) Utils.modified() - def add_parent_close(self,obj): - - surname = self.xml.get_widget("surname").get_text() - given = self.xml.get_widget("given").get_text() - person = RelLib.Person() - self.db.addPerson(person) - name = person.getPrimaryName() - name.setSurname(surname) - name.setFirstName(given) - if self.xml.get_widget("male").get_active(): - person.setGender(RelLib.Person.male) - self.father = person - else: - person.setGender(RelLib.Person.female) - self.mother = person - Utils.modified() - self.parent_relation_changed(self.prel) - Utils.destroy_passed_object(obj) - self.full_update() - diff --git a/gramps/src/DbPrompter.py b/gramps/src/DbPrompter.py index 0d0edb2df..705051818 100644 --- a/gramps/src/DbPrompter.py +++ b/gramps/src/DbPrompter.py @@ -30,6 +30,7 @@ import gtk import const import GrampsCfg import intl +import VersionControl _ = intl.gettext #------------------------------------------------------------------------- @@ -116,12 +117,3 @@ class DbPrompter: def open_cancel_clicked(self,obj): gtk.mainquit() - -#------------------------------------------------------------------------- -# -# Start it all -# -#------------------------------------------------------------------------- -if __name__ == '__main__': - Gramps(None) - gtk.mainloop() diff --git a/gramps/src/Find.py b/gramps/src/Find.py index 62a60d48c..76f7b1f29 100644 --- a/gramps/src/Find.py +++ b/gramps/src/Find.py @@ -163,7 +163,6 @@ class FindPlace(FindBase): return orow = self.row func() - place = None while self.row != orow: value = self.clist.get_row_data(self.row) if value == None: @@ -204,7 +203,6 @@ class FindSource(FindBase): return orow = self.row func() - place = None while self.row != orow: value = self.clist.get_row_data(self.row) if value == None: @@ -245,7 +243,6 @@ class FindMedia(FindBase): return orow = self.row func() - place = None while self.row != orow: value = self.clist.get_row_data(self.row) if value == None: diff --git a/gramps/src/Report.py b/gramps/src/Report.py index 62e8c1c01..db7b6bf0a 100644 --- a/gramps/src/Report.py +++ b/gramps/src/Report.py @@ -1014,7 +1014,7 @@ class TemplateParser(handler.ContentHandler): def startElement(self,tag,attrs): if tag == "template": - self.data[attrs['title']] = "%s/%s" % (path,attrs['file']) + self.data[attrs['title']] = "%s/%s" % (self.path,attrs['file']) def characters(self, data): pass diff --git a/gramps/src/Utils.py b/gramps/src/Utils.py index ab580c0ff..2a692eb84 100644 --- a/gramps/src/Utils.py +++ b/gramps/src/Utils.py @@ -57,10 +57,11 @@ _ = gettext # modified flag # #------------------------------------------------------------------------- -_modifiedFlag = 0 -_autotime_val = 1 -_autosave_fun = None -_autosave_tim = None +_modifiedFlag = 0 +_autotime_val = 1 +_autosave_fun = None +_autosave_tim = None +_autosave_val = None LISTOBJ = "s" OBJECT = "o" diff --git a/gramps/src/const.py b/gramps/src/const.py index 651e526af..a626b12ab 100644 --- a/gramps/src/const.py +++ b/gramps/src/const.py @@ -88,9 +88,9 @@ startup = 1 # #------------------------------------------------------------------------- progName = "gramps" -version = "0.7.3pre" +version = "0.7.3-snap20020328" copyright = "© 2001 Donald N. Allingham" -authors = ["Donald N. Allingham", "David Hampton"] +authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"] comments = _("GRAMPS (Genealogical Research and Analysis Management Programming System) is a personal genealogy program.") #------------------------------------------------------------------------- diff --git a/gramps/src/docgen/AbiWordDoc.py b/gramps/src/docgen/AbiWordDoc.py index ebc78ed96..89e7fb04b 100644 --- a/gramps/src/docgen/AbiWordDoc.py +++ b/gramps/src/docgen/AbiWordDoc.py @@ -31,7 +31,6 @@ import base64 from TextDoc import * from latin_utf8 import latin_to_utf8 -import const import string import Plugins import ImgManip @@ -94,8 +93,6 @@ class AbiWordDoc(TextDoc): self.f.write('\n') for file_tuple in self.photo_list: file = file_tuple[0] - width = file_tuple[1] - height = file_tuple[2] base = "%s/%s_png" % (os.path.dirname(file),os.path.basename(file)) tag = string.replace(base,'.','_') @@ -306,7 +303,6 @@ class AbiWordDoc(TextDoc): self.f.write("%6.4fin/%s" % (edge/2.54,t)) self.f.write('"') self.f.write('>') - last = len(self.cdatalist) for data in self.cdatalist: self.f.write(data) self.f.write('

\n') diff --git a/gramps/src/docgen/OpenOfficeDoc.py b/gramps/src/docgen/OpenOfficeDoc.py index 38bf0fc20..b5892fd70 100644 --- a/gramps/src/docgen/OpenOfficeDoc.py +++ b/gramps/src/docgen/OpenOfficeDoc.py @@ -498,15 +498,14 @@ class OpenOfficeDoc(TextDoc): for file_tuple in self.photo_list: file = file_tuple[0] - width = file_tuple[1] - height = file_tuple[2] base = os.path.basename(file) image_name = self.tempdir + os.sep + "Pictures" + os.sep + base try: shutil.copy(file,image_name) except IOError,msg: - GnomeErrorDialog(_("Error copying %s") + "\n" + msg) + import gnome.ui + gnome.ui.GnomeErrorDialog(_("Error copying %s") + "\n" + msg) def _write_manifest(self): file = self.tempdir + os.sep + "META-INF" + os.sep + "manifest.xml" diff --git a/gramps/src/docgen/PdfDrawDoc.py b/gramps/src/docgen/PdfDrawDoc.py index 0f0237d5c..e25ac2485 100644 --- a/gramps/src/docgen/PdfDrawDoc.py +++ b/gramps/src/docgen/PdfDrawDoc.py @@ -157,32 +157,4 @@ class PdfDrawDoc(DrawDoc): self.f.drawString(start_x,start_y,text) self.f.restoreState() -if __name__ == "__main__": - - - - s = PaperStyle("Junk",27.94,21.59) - x = PdfDrawDoc(s,PAPER_PORTRAIT) - f = FontStyle() - f.set_type_face(FONT_SANS_SERIF) - f.set_size(14) - p = ParagraphStyle() - p.set_font(f) - x.add_paragraph_style("mytest",p) - - g = GraphicsStyle() - g.set_width(4) - g.set_height(2) - - g.set_color((0xff,0xcc,0xff)) - g.set_paragraph_style("mytest") - g.set_shadow(1) - x.add_draw_style("mybox",g) - - x.open("test") - x.start_page() - x.draw_box("mybox","Hello\nThis is Fun",4,4) - x.end_page() - x.close() - Plugins.register_draw_doc(_("PDF"),PdfDrawDoc); diff --git a/gramps/src/docgen/RTFDoc.py b/gramps/src/docgen/RTFDoc.py index 77ce40119..f109cca66 100644 --- a/gramps/src/docgen/RTFDoc.py +++ b/gramps/src/docgen/RTFDoc.py @@ -317,14 +317,11 @@ class RTFDoc(TextDoc): # #-------------------------------------------------------------------- def add_photo(self,name,pos,x_cm,y_cm): - if no_pil: - return - im = ImgManip.ImgManip(name) nx,ny = im.size() buf = im.jpg_data() - ratio = float(x_cm)*float(y)/(float(y_cm)*float(x)) + ratio = float(x_cm)*float(ny)/(float(y_cm)*float(nx)) if ratio < 1: act_width = x_cm diff --git a/gramps/src/docgen/SvgDrawDoc.py b/gramps/src/docgen/SvgDrawDoc.py index 3b7029f6b..1c1b87554 100644 --- a/gramps/src/docgen/SvgDrawDoc.py +++ b/gramps/src/docgen/SvgDrawDoc.py @@ -19,7 +19,6 @@ # import os -import tempfile import string import Plugins import intl diff --git a/gramps/src/plugins/DesGraph.py b/gramps/src/plugins/DesGraph.py index 4a4a41d89..94218dbb6 100644 --- a/gramps/src/plugins/DesGraph.py +++ b/gramps/src/plugins/DesGraph.py @@ -222,13 +222,9 @@ class DescendantReport: # #-------------------------------------------------------------------- def calc(self): - width = 0 - self.height = self.lines*pt2cm(1.25*self.font.get_size()) self.box_width = pt2cm(self.box_width+20) - start = self.doc.get_right_margin() - self.maxx = int(self.doc.get_usable_width()/(self.box_width+_sep)) self.maxy = int(self.doc.get_usable_height()/(self.height+_sep)) diff --git a/gramps/src/plugins/DetAncestralReport.py b/gramps/src/plugins/DetAncestralReport.py index 2e03a1b0c..7a5f8f31c 100644 --- a/gramps/src/plugins/DetAncestralReport.py +++ b/gramps/src/plugins/DetAncestralReport.py @@ -23,7 +23,6 @@ import RelLib import os -import sort import intl _ = intl.gettext diff --git a/gramps/src/plugins/GraphViz.py b/gramps/src/plugins/GraphViz.py index d1a82f5cb..bdefb36a5 100644 --- a/gramps/src/plugins/GraphViz.py +++ b/gramps/src/plugins/GraphViz.py @@ -107,7 +107,7 @@ _scaled = 0 _single = 1 _multiple = 2 -pagecount_map = { +_pagecount_map = { _("Single (scaled)") : _scaled, _("Single") : _single, _("Multiple") : _multiple, @@ -138,7 +138,7 @@ class GraphVizDialog(ReportDialog): def get_print_pagecount_map(self): """Set up the list of possible page counts.""" - return (pagecount_map, _("Single (scaled)")) + return (_pagecount_map, _("Single (scaled)")) def get_report_generations(self): """Default to 10 generations, no page breaks.""" diff --git a/gramps/src/plugins/ReadGedcom.py b/gramps/src/plugins/ReadGedcom.py index 2c82d0fcd..2b2acb5f6 100644 --- a/gramps/src/plugins/ReadGedcom.py +++ b/gramps/src/plugins/ReadGedcom.py @@ -53,16 +53,16 @@ photo_types = [ "jpeg", "bmp", "pict", "pntg", "tpic", "png", "gif", "jpg", "tiff", "pcx" ] ged2gramps = {} -for val in const.personalConstantEvents.keys(): - key = const.personalConstantEvents[val] - if key != "": - ged2gramps[key] = val +for _val in const.personalConstantEvents.keys(): + _key = const.personalConstantEvents[_val] + if _key != "": + ged2gramps[_key] = _val ged2fam = {} -for val in const.familyConstantEvents.keys(): - key = const.familyConstantEvents[val] - if key != "": - ged2fam[key] = val +for _val in const.familyConstantEvents.keys(): + _key = const.familyConstantEvents[_val] + if _key != "": + ged2fam[_key] = _val intRE = re.compile(r"\s*(\d+)\s*$") lineRE = re.compile(r"\s*(\d+)\s+(\S+)\s*(.*)$") diff --git a/gramps/src/plugins/WritePkg.py b/gramps/src/plugins/WritePkg.py index 50bbf61ef..ff86c8615 100644 --- a/gramps/src/plugins/WritePkg.py +++ b/gramps/src/plugins/WritePkg.py @@ -22,7 +22,6 @@ from RelLib import * -import const import WriteXML import time import os diff --git a/gramps/src/plugins/count_anc.py b/gramps/src/plugins/count_anc.py index 4d6a729c6..947a151b8 100644 --- a/gramps/src/plugins/count_anc.py +++ b/gramps/src/plugins/count_anc.py @@ -22,10 +22,6 @@ from RelLib import * import os -import posixpath -import re -import sort -import string import Utils import intl _ = intl.gettext diff --git a/gramps/src/plugins/soundgen.py b/gramps/src/plugins/soundgen.py index 006742ac0..266abead1 100644 --- a/gramps/src/plugins/soundgen.py +++ b/gramps/src/plugins/soundgen.py @@ -76,10 +76,7 @@ class SoundGen: self.glade.get_widget("soundEx").show() def on_apply_clicked(self,obj): - - text = obj.get_text() - value = self.value.set_text(soundex.soundex(text)) - + self.value.set_text(soundex.soundex(obj.get_text())) #------------------------------------------------------------------------- #