Updated configure script to check for gnome support in libglade, Fixed place names

svn: r383
This commit is contained in:
Don Allingham 2001-09-03 17:45:04 +00:00
parent 5c62a201c2
commit 13d0bfa400
12 changed files with 133 additions and 28 deletions

54
gramps/configure vendored
View File

@ -1054,10 +1054,62 @@ then
fi
echo "$ac_t""ok" 1>&6
echo $ac_n "checking Python/libglade bindings""... $ac_c" 1>&6
echo "configure:1059: checking Python/libglade bindings" >&5
cat > conftest.py <<EOF
try:
import libglade
f = open("conftest.out", "w")
f.write("YES")
f.close()
except ImportError:
f = open("conftest.out", "w")
f.write("NO")
f.close()
EOF
$PYTHON conftest.py
has_pygtk=`cat conftest.out`
rm -f conftest.out conftest.py
if test "YES" != $has_pygtk
then
{ echo "configure: error:
**** The python interpreter can't find the python bindings for libglade." 1>&2; exit 1; }
fi
echo "$ac_t""ok" 1>&6
echo $ac_n "checking Python/GNOME bindings for libglade""... $ac_c" 1>&6
echo "configure:1085: checking Python/GNOME bindings for libglade" >&5
cat > conftest.py <<EOF
try:
import _gladegnome
f = open("conftest.out", "w")
f.write("YES")
f.close()
except ImportError:
f = open("conftest.out", "w")
f.write("NO")
f.close()
EOF
$PYTHON conftest.py
has_pygtk=`cat conftest.out`
rm -f conftest.out conftest.py
if test "YES" != $has_pygtk
then
{ echo "configure: error:
**** The python interpreter can't find the GNOME bindings for libglade." 1>&2; exit 1; }
fi
echo "$ac_t""ok" 1>&6
echo $ac_n "checking for headers required to compile python extensions""... $ac_c" 1>&6
echo "configure:1061: checking for headers required to compile python extensions" >&5
echo "configure:1113: checking for headers required to compile python extensions" >&5
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"

View File

@ -109,6 +109,56 @@ then
fi
AC_MSG_RESULT(ok)
AC_MSG_CHECKING(Python/libglade bindings)
changequote(,)
cat > conftest.py <<EOF
try:
import libglade
f = open("conftest.out", "w")
f.write("YES")
f.close()
except ImportError:
f = open("conftest.out", "w")
f.write("NO")
f.close()
EOF
changequote([, ])
$PYTHON conftest.py
has_pygtk=`cat conftest.out`
rm -f conftest.out conftest.py
if test "YES" != $has_pygtk
then
AC_MSG_ERROR([
**** The python interpreter can't find the python bindings for libglade.])
fi
AC_MSG_RESULT(ok)
AC_MSG_CHECKING(Python/GNOME bindings for libglade)
changequote(,)
cat > conftest.py <<EOF
try:
import _gladegnome
f = open("conftest.out", "w")
f.write("YES")
f.close()
except ImportError:
f = open("conftest.out", "w")
f.write("NO")
f.close()
EOF
changequote([, ])
$PYTHON conftest.py
has_pygtk=`cat conftest.out`
rm -f conftest.out conftest.py
if test "YES" != $has_pygtk
then
AC_MSG_ERROR([
**** The python interpreter can't find the GNOME bindings for libglade.])
fi
AC_MSG_RESULT(ok)
dnl Checks for libraries.
dnl Checks for header files.

View File

@ -2435,7 +2435,7 @@ def add_box(root,x,y,bwidth,bheight,person,style):
def box_event(obj,event):
if event.type == GDK._2BUTTON_PRESS:
if event.button == 1:
if event.state & GDK.SHIFT_MASK:
if (event.state & GDK.SHIFT_MASK) or (event.state & GDK.CONTROL_MASK):
change_active_person(obj.get_data("p"))
load_canvas()
else:
@ -2464,6 +2464,7 @@ def box_event(obj,event):
anchor=ANCHOR_WEST,
x=PAD,
y=2*h+(h/2))
statusbar.set_status(_("Doubleclick to edit, Shift-Doubleclick to make the active person"))
elif event.type == GDK.LEAVE_NOTIFY:
ch = obj.children()
length = len(ch)
@ -2479,6 +2480,7 @@ def box_event(obj,event):
ch[4].destroy()
if length > 3:
ch[3].destroy()
modify_statusbar()
canvas.update_now()
#-------------------------------------------------------------------------
@ -3004,6 +3006,7 @@ def main(arg):
read_file(Config.lastfile)
database.setResearcher(Config.owner)
mainloop()
#-------------------------------------------------------------------------

View File

@ -102,8 +102,8 @@ class AncestorReport:
N = person.getPrimaryName().getName()
b = person.getBirth().getDate()
d = person.getDeath().getDate()
B = person.getBirth().getPlace().get_title()
D = person.getDeath().getPlace().get_title()
B = person.getBirth().getPlaceName()
D = person.getDeath().getPlaceName()
i = "%s" % person.getId()
A = Config.attr_name
a = ""

View File

@ -170,7 +170,7 @@ class AncestorReport:
birth = person.getBirth()
if birth:
date = birth.getDateObj().get_start_date()
place = birth.getPlace().get_title()
place = birth.getPlaceName()
if place[-1:] == '.':
place = place[:-1]
if date.getDate() != "" or place != "":
@ -199,7 +199,7 @@ class AncestorReport:
if death:
date = death.getDateObj().get_start_date()
place = death.getPlace().get_title()
place = death.getPlaceName()
if place[-1:] == '.':
place = place[:-1]
if date.getDate() != "" or place != "":
@ -240,7 +240,7 @@ class AncestorReport:
if buried:
date = buried.getDateObj().get_start_date()
place = buried.getPlace().get_title()
place = buried.getPlaceName()
if place[-1:] == '.':
place = place[:-1]
if date.getDate() != "" or place != "":

View File

@ -295,7 +295,7 @@ class EventComparison:
added = 0
if first:
tlist = [name,birth.getDate(),death.getDate()]
blist = ["",birth.getPlace().get_title(),death.getPlace().get_title()]
blist = ["",birth.getPlaceName(),death.getPlaceName()]
else:
tlist = ["","",""]
blist = ["","",""]
@ -305,7 +305,7 @@ class EventComparison:
event = mylist[0]
del mylist[0]
tlist.append(event.getDate())
blist.append(event.getPlace().get_title())
blist.append(event.getPlaceName())
added = 1
else:
tlist.append("")
@ -396,8 +396,8 @@ class EventComparison:
while done == 0:
added = 0
if first:
tlist = [name,birth.getDate(),death.getDate().get_title()]
blist = ["",birth.getPlace(),death.getPlace().get_title()]
tlist = [name,birth.getDate(),death.getDate()]
blist = ["",birth.getPlaceName(),death.getPlaceName()]
else:
tlist = ["","",""]
blist = ["","",""]
@ -407,7 +407,7 @@ class EventComparison:
event = mylist[0]
del mylist[0]
tlist.append(event.getDate())
blist.append(event.getPlace().get_title())
blist.append(event.getPlaceName())
added = 1
else:
tlist.append("")

View File

@ -164,7 +164,7 @@ class FamilyGroup:
self.doc.end_cell()
self.doc.start_cell("TextContentsEnd")
self.doc.start_paragraph('Normal')
self.doc.write_text(birth.getPlace().get_title())
self.doc.write_text(birth.getPlaceName())
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.end_row()
@ -182,7 +182,7 @@ class FamilyGroup:
self.doc.end_cell()
self.doc.start_cell("TextContentsEnd")
self.doc.start_paragraph('Normal')
self.doc.write_text(death.getPlace().get_title())
self.doc.write_text(death.getPlaceName())
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.end_row()
@ -228,7 +228,7 @@ class FamilyGroup:
def dump_child_event(self,text,name,event):
if event:
date = event.getDate()
place = event.getPlace().get_title()
place = event.getPlaceName()
else:
date = ""
place = ""

View File

@ -348,7 +348,7 @@ def print_event(html,name,event):
return
date = event.getDate()
place = event.getPlace().get_title()
place = event.getPlaceName()
if date != "" or place != "":
html.write("<H2>%s</H2>\n" % name)
@ -465,7 +465,7 @@ def dump_person(person,prefix,templateTop,templateBottom,targetDir):
marriage = family.getMarriage()
if marriage and not alive and not spouse_alive:
place = marriage.getPlace().get_title()
place = marriage.getPlaceName()
date = marriage.getDate()
if place:
txt = _("Marriage place")

View File

@ -113,7 +113,7 @@ class IndivSummary:
return
name = event.getName()
date = event.getDate()
place = event.getPlace().get_title()
place = event.getPlaceName()
description = event.getDescription()
if date == "":
if place == "":

View File

@ -479,15 +479,15 @@ class Merge:
name1 = person1.getPrimaryName().getName()
death1 = person1.getDeath().getDate()
dplace1 = person1.getDeath().getPlace().get_title()
dplace1 = person1.getDeath().getPlaceName()
birth1 = person1.getBirth().getDate()
bplace1 = person1.getBirth().getPlace().get_title()
bplace1 = person1.getBirth().getPlaceName()
name2 = person2.getPrimaryName().getName()
death2 = person2.getDeath().getDate()
dplace2 = person2.getDeath().getPlace().get_title()
dplace2 = person2.getDeath().getPlaceName()
birth2 = person2.getBirth().getDate()
bplace2 = person2.getBirth().getPlace().get_title()
bplace2 = person2.getBirth().getPlaceName()
if f2 and not f1:
self.topDialog.get_widget("bfather2").set_active(1)

View File

@ -301,7 +301,7 @@ class IndividualPage:
name = _(event.getName())
date = event.getDate()
if event.getPlace():
place = event.getPlace().get_title()
place = event.getPlaceName()
else:
place = ""
description = event.getDescription()
@ -350,7 +350,7 @@ class IndividualPage:
name = event.getName()
date = event.getDate()
if event.getPlace():
place = event.getPlace().get_title()
place = event.getPlaceName()
else:
place = ""
description = event.getDescription()

View File

@ -262,8 +262,8 @@ def write_long_text(g,tag,level,note):
def dump_event_stats(g,event):
if event.getSaveDate() != "":
g.write("2 DATE %s\n" % cnvtxt(event.getSaveDate()))
if event.getPlace().get_title() != "":
g.write("2 PLAC %s\n" % cnvtxt(event.getPlace().get_title()))
if event.getPlaceName() != "":
g.write("2 PLAC %s\n" % cnvtxt(event.getPlaceName()))
if event.getNote() != "":
write_long_text(g,"NOTE",2,event.getNote())
if event.getSourceRef() != None:
@ -368,13 +368,13 @@ def write_person(g,person):
birth = person.getBirth()
if not (private and birth.getPrivacy()):
if birth.getSaveDate() != "" or birth.getPlace().get_title() != "":
if birth.getSaveDate() != "" or birth.getPlaceName() != "":
g.write("1 BIRT\n")
dump_event_stats(g,birth)
death = person.getDeath()
if not (private and death.getPrivacy()):
if death.getSaveDate() != "" or death.getPlace().get_title() != "":
if death.getSaveDate() != "" or death.getPlaceName() != "":
g.write("1 DEAT\n")
dump_event_stats(g,death)