Added source and note edit buttons on EditPerson page.

svn: r82
This commit is contained in:
Don Allingham 2001-06-03 20:28:13 +00:00
parent 560713e6c1
commit 9204d8be41
7 changed files with 191 additions and 104 deletions

View File

@ -115,7 +115,7 @@
<widget>
<class>GtkTable</class>
<name>table16</name>
<rows>2</rows>
<rows>3</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>0</row_spacing>
@ -221,6 +221,65 @@
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox19</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
<widget>
<class>GtkButton</class>
<name>button99</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_birth_source_clicked</handler>
<object>editPerson</object>
<last_modification_time>Sun, 03 Jun 2001 20:10:22 GMT</last_modification_time>
</signal>
<label>Source</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>button100</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_birth_note_clicked</handler>
<object>editPerson</object>
<last_modification_time>Sun, 03 Jun 2001 20:10:35 GMT</last_modification_time>
</signal>
<label>Note</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget>
@ -248,7 +307,7 @@
<widget>
<class>GtkTable</class>
<name>table17</name>
<rows>2</rows>
<rows>3</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>0</row_spacing>
@ -355,6 +414,65 @@
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox20</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
<widget>
<class>GtkButton</class>
<name>button101</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_death_source_clicked</handler>
<object>editPerson</object>
<last_modification_time>Sun, 03 Jun 2001 20:10:45 GMT</last_modification_time>
</signal>
<label>Source</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>button102</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_death_note_clicked</handler>
<object>editPerson</object>
<last_modification_time>Sun, 03 Jun 2001 20:10:54 GMT</last_modification_time>
</signal>
<label>Note</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget>

View File

@ -49,6 +49,7 @@ import utils
import Config
from RelLib import *
import RelImage
import Sources
_ = intl.gettext
@ -126,6 +127,10 @@ class EditPerson:
self.selectedIcon = -1
self.top_window.signal_autoconnect({
"on_death_note_clicked" : on_death_note_clicked,
"on_death_source_clicked" : on_death_source_clicked,
"on_birth_note_clicked" : on_birth_note_clicked,
"on_birth_source_clicked" : on_birth_source_clicked,
"on_eventAddBtn_clicked" : on_event_add_clicked,
"on_eventDeleteBtn_clicked" : on_event_delete_clicked,
"on_nameList_select_row" : on_name_list_select_row,
@ -1132,9 +1137,71 @@ def on_event_note_clicked(obj):
#
#
#-------------------------------------------------------------------------
def on_showsource_clicked(obj):
import Sources
def on_birth_note_clicked(obj):
edit_person_obj = obj.get_data(EDITPERSON)
editnote = libglade.GladeXML(const.editnoteFile,"editnote")
data = edit_person_obj.person.getBirth()
textobj = editnote.get_widget("notetext")
en_obj = editnote.get_widget("editnote")
en_obj.set_data("n",data)
en_obj.set_data("w",textobj)
textobj.set_point(0)
textobj.insert_defaults(data.getNote())
textobj.set_word_wrap(1)
editnote.signal_autoconnect({
"on_save_note_clicked" : on_save_note_clicked,
"destroy_passed_object" : utils.destroy_passed_object
})
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_death_note_clicked(obj):
edit_person_obj = obj.get_data(EDITPERSON)
editnote = libglade.GladeXML(const.editnoteFile,"editnote")
textobj = editnote.get_widget("notetext")
data = edit_person_obj.person.getDeath()
en_obj = editnote.get_widget("editnote")
en_obj.set_data("n",data)
en_obj.set_data("w",textobj)
textobj.set_point(0)
textobj.insert_defaults(data.getNote())
textobj.set_word_wrap(1)
editnote.signal_autoconnect({
"on_save_note_clicked" : on_save_note_clicked,
"destroy_passed_object" : utils.destroy_passed_object
})
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_death_source_clicked(obj):
edit_person_obj = obj.get_data(EDITPERSON)
Sources.SourceEditor(edit_person_obj.person.getDeath(),edit_person_obj.db)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_birth_source_clicked(obj):
edit_person_obj = obj.get_data(EDITPERSON)
Sources.SourceEditor(edit_person_obj.person.getBirth(),edit_person_obj.db)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_showsource_clicked(obj):
row = obj.get_data(INDEX)
edit_person_obj = obj.get_data(EDITPERSON)
if row >= 0:

View File

@ -208,5 +208,3 @@ def on_source_changed(obj):
src_entry.get_widget("sdate").set_sensitive(active)
src_entry.get_widget("stext").set_sensitive(active)
src_entry.get_widget("scomment").set_sensitive(active)

View File

@ -3023,7 +3023,7 @@
<widget>
<class>GtkLabel</class>
<name>label186</name>
<label>Relationship Type </label>
<label>Relationship Type</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>

View File

@ -123,7 +123,7 @@
<widget>
<class>GtkLabel</class>
<name>label202</name>
<label>Relationship Type : </label>
<label>Relationship Type</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>

View File

@ -71,7 +71,6 @@ nameRegexp = re.compile(r"([\S\s]*\S)?\s*/([^/]+)?/\s*,?\s*([\S]+)?")
#
#-------------------------------------------------------------------------
def find_file(fullname,altpath):
print "trying",fullname
if os.path.isfile(fullname):
type = gnome.mime.type(fullname)
if type[0:6] != "image/":
@ -483,7 +482,6 @@ class GedcomParser:
while 1:
matches = self.get_next()
print matches[0],matches[1],matches[2]
if int(matches[0]) == 0:
self.backup()
return
@ -540,7 +538,6 @@ class GedcomParser:
pass
elif matches[1] == "FAMS":
family = self.db.findFamily(matches[2],self.fmap)
print self.person.getPrimaryName().getName(),matches[2]
self.person.addFamily(family)
note = self.parse_optional_note(2)
elif matches[1] == "FAMC":

View File

@ -2351,96 +2351,3 @@ msgstr "till"
#: glade.c:1092
msgid "to:"
msgstr "till:"
#, fuzzy
#~ msgid "Birth date : "
#~ msgstr "Födelsedatum: "
msgid "name"
msgstr "namn"
#: glade.c:1107 glade.c:1109
msgid "to"
msgstr "till"
#: glade.c:1098
msgid "to:"
msgstr "till:"
#~ msgid "Abiword"
#~ msgstr "Abiword"
#~ msgid "From"
#~ msgstr "Från"
#~ msgid "From : "
#~ msgstr "Från: "
#~ msgid "GRAMPS - Merge People"
#~ msgstr "GRAMPS - Slå ihop individer"
#~ msgid "Reletivity - Source Information"
#~ msgstr "Släktskap - Källinformation"
#~ msgid "To"
#~ msgstr "Till"
#~ msgid "To : "
#~ msgstr "Till: "
#~ msgid " as the home person?"
#~ msgstr " som proband?"
#~ msgid " is not a valid date format, and has been\n"
#~ msgstr " är inte ett korrekt datumformat, och har\n"
#~ msgid "Country :"
#~ msgstr "Land:"
#~ msgid "Do you wish to set "
#~ msgstr "Vill du ställa in "
#~ msgid "Unknown Format"
#~ msgstr "Okänt format"
#~ msgid "apr"
#~ msgstr "apr"
#~ msgid "aug"
#~ msgstr "aug"
#~ msgid "dec"
#~ msgstr "dec"
#~ msgid "feb"
#~ msgstr "feb"
#~ msgid "ignored as the date of the event."
#~ msgstr "ignoreras som datum för händelsen."
#~ msgid "jan"
#~ msgstr "jan"
#~ msgid "jul"
#~ msgstr "jul"
#~ msgid "jun"
#~ msgstr "jun"
#~ msgid "mar"
#~ msgstr "mar"
#~ msgid "may"
#~ msgstr "maj"
#~ msgid "nov"
#~ msgstr "nov"
#~ msgid "oct"
#~ msgstr "okt"
#~ msgid "sep"
#~ msgstr "sep"