diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index ad6ed202f..14afde107 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,13 @@ +2006-09-09 Don Allingham + * src/GrampsDb/_ReadXML.py: remove commented out code + * src/Editors/_EditEvent.py: handle overwriting of date text + * src/RelLib/_DateBase.py: allow optional dropping of date text on + serialization + * src/RelLib/_Date.py: allow optional dropping of date text on + serialization + * src/RelLib/_Event.py: allow optional dropping of date text on + serialization + 2006-09-05 Alex Roitman * src/plugins/Verify.py: Import Errors. diff --git a/gramps2/help/C/figures/select-person.png b/gramps2/help/C/figures/select-person.png index e4f4b0f54..04f8141e5 100644 Binary files a/gramps2/help/C/figures/select-person.png and b/gramps2/help/C/figures/select-person.png differ diff --git a/gramps2/help/C/gramps-manual.xml b/gramps2/help/C/gramps-manual.xml index 7335bdd00..d13be43ca 100644 --- a/gramps2/help/C/gramps-manual.xml +++ b/gramps2/help/C/gramps-manual.xml @@ -418,54 +418,6 @@ - - Running GRAMPS for the first time - - The first time you run the program, GRAMPS will display the - "Getting Started" dialogs. Follow the directions that guide you through - Researcher information and the LDS - extensions sections. You should find them to be - self-explanatory. - - - Dialog boxes - - We'll make frequent reference in this manual to dialogs. A - dialog is simply a pop-up window into which you can enter - information. - - - We recommend you enter your personal information when GRAMPS - prompts you for it. GRAMPS uses this information strictly so it can - create valid GEDCOM output files (which require information about the - files' creator). If you wish, you can choose not to supply this - information, but be aware that unless and until you do, any GEDCOM files - you export will not be valid. - -
- GRAMPS Getting Started Window: Researcher Information - - - - - - - - - Shows Researcher Information Window. - - - -
- - - Entering personal information - - This information can be entered at any time in the Preferences - dialog, under the Database/Researcher Information category. - -
- @@ -525,6 +477,22 @@ + + Tip of the day + + Displays the "Tip of the day" dialog. + + + + + Plugin status + + + Use this item to display the status of any plugins you may + have added. + + + GRAMPS home page @@ -554,22 +522,11 @@ - Show plugin status + About - Use this item to display the status of any plugins you may - have added. - - - - - Open example database - - - Select this item to load the example database that is - included in your GRAMPS package. This database is composed of - fictitious people and serves as a useful example for learning how - to work with GRAMPS. + This item displays a dialog with general information about + the GRAMPS version you are running. diff --git a/gramps2/src/Editors/_EditEvent.py b/gramps2/src/Editors/_EditEvent.py index e864bc32b..054514e86 100644 --- a/gramps2/src/Editors/_EditEvent.py +++ b/gramps2/src/Editors/_EditEvent.py @@ -224,6 +224,30 @@ class EditEvent(EditPrimary): self.callback(self.obj) self.close() + def data_has_changed(self): + """ + A date comparison can fail incorrectly because we have made the + decision to store entered text in the date. However, there is no + entered date when importing from a XML file, so we can get an + incorrect fail. + """ + + if self.db.readonly: + return False + elif self.obj.handle: + orig = self.get_from_handle(self.obj.handle) + if orig: + cmp_obj = orig + else: + cmp_obj = self.empty_object() + return cmp(cmp_obj.serialize(True)[1:], + self.obj.serialize(True)[1:]) != 0 + else: + cmp_obj = self.empty_object() + return cmp(cmp_obj.serialize(True)[1:], + self.obj.serialize()[1:]) != 0 + + class EditPersonEvent(EditEvent): def __init__(self, event, dbstate, uistate, track=[], callback=None): diff --git a/gramps2/src/GrampsDb/_ReadXML.py b/gramps2/src/GrampsDb/_ReadXML.py index aae43a328..8d3fa8beb 100644 --- a/gramps2/src/GrampsDb/_ReadXML.py +++ b/gramps2/src/GrampsDb/_ReadXML.py @@ -162,11 +162,6 @@ def importData(database, filename, callback=None,cl=0,use_trans=False): ErrorDialog(_("Error reading %s") % filename, _("The file is probably either corrupt or not a valid GRAMPS database.")) return -# except: -# if cl: -# import traceback -# traceback.print_exc() -# os._exit(1) xml_file.close() diff --git a/gramps2/src/RelLib/_Date.py b/gramps2/src/RelLib/_Date.py index 66585e077..10ba70a0c 100644 --- a/gramps2/src/RelLib/_Date.py +++ b/gramps2/src/RelLib/_Date.py @@ -135,12 +135,17 @@ class Date: self.text = u"" self.sortval = 0 - def serialize(self): + def serialize(self, no_text_date=False): """ Convert to a series of tuples for data storage """ + if no_text_date: + text = u'' + else: + text = self.text + return (self.calendar, self.modifier, self.quality, - self.dateval, self.text, self.sortval) + self.dateval, text, self.sortval) def unserialize(self, data): """ diff --git a/gramps2/src/RelLib/_DateBase.py b/gramps2/src/RelLib/_DateBase.py index dd113bec6..43fcafa35 100644 --- a/gramps2/src/RelLib/_DateBase.py +++ b/gramps2/src/RelLib/_DateBase.py @@ -53,11 +53,11 @@ class DateBase: else: self.date = Date() - def serialize(self): + def serialize(self, no_text_date=False): if self.date == None or (self.date.is_empty() and not self.date.text): date = None else: - date = self.date.serialize() + date = self.date.serialize(no_text_date) return date def unserialize(self,data): diff --git a/gramps2/src/RelLib/_Event.py b/gramps2/src/RelLib/_Event.py index 314e177ea..892ff373e 100644 --- a/gramps2/src/RelLib/_Event.py +++ b/gramps2/src/RelLib/_Event.py @@ -76,7 +76,7 @@ class Event(PrimaryObject,SourceBase,NoteBase,MediaBase,AttributeBase, self.description = "" self.type = EventType() - def serialize(self): + def serialize(self, no_text_date = False): """ Converts the data held in the event to a Python tuple that represents all the data elements. This method is used to convert @@ -93,7 +93,7 @@ class Event(PrimaryObject,SourceBase,NoteBase,MediaBase,AttributeBase, @rtype: tuple """ return (self.handle, self.gramps_id, self.type.serialize(), - DateBase.serialize(self), + DateBase.serialize(self, no_text_date), self.description, self.place, SourceBase.serialize(self), NoteBase.serialize(self),