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 fi
echo "$ac_t""ok" 1>&6 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 $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_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"

View File

@ -109,6 +109,56 @@ then
fi fi
AC_MSG_RESULT(ok) 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 libraries.
dnl Checks for header files. 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): def box_event(obj,event):
if event.type == GDK._2BUTTON_PRESS: if event.type == GDK._2BUTTON_PRESS:
if event.button == 1: 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")) change_active_person(obj.get_data("p"))
load_canvas() load_canvas()
else: else:
@ -2464,6 +2464,7 @@ def box_event(obj,event):
anchor=ANCHOR_WEST, anchor=ANCHOR_WEST,
x=PAD, x=PAD,
y=2*h+(h/2)) y=2*h+(h/2))
statusbar.set_status(_("Doubleclick to edit, Shift-Doubleclick to make the active person"))
elif event.type == GDK.LEAVE_NOTIFY: elif event.type == GDK.LEAVE_NOTIFY:
ch = obj.children() ch = obj.children()
length = len(ch) length = len(ch)
@ -2479,6 +2480,7 @@ def box_event(obj,event):
ch[4].destroy() ch[4].destroy()
if length > 3: if length > 3:
ch[3].destroy() ch[3].destroy()
modify_statusbar()
canvas.update_now() canvas.update_now()
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -3004,6 +3006,7 @@ def main(arg):
read_file(Config.lastfile) read_file(Config.lastfile)
database.setResearcher(Config.owner) database.setResearcher(Config.owner)
mainloop() mainloop()
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

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

View File

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

View File

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

View File

@ -164,7 +164,7 @@ class FamilyGroup:
self.doc.end_cell() self.doc.end_cell()
self.doc.start_cell("TextContentsEnd") self.doc.start_cell("TextContentsEnd")
self.doc.start_paragraph('Normal') 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_paragraph()
self.doc.end_cell() self.doc.end_cell()
self.doc.end_row() self.doc.end_row()
@ -182,7 +182,7 @@ class FamilyGroup:
self.doc.end_cell() self.doc.end_cell()
self.doc.start_cell("TextContentsEnd") self.doc.start_cell("TextContentsEnd")
self.doc.start_paragraph('Normal') 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_paragraph()
self.doc.end_cell() self.doc.end_cell()
self.doc.end_row() self.doc.end_row()
@ -228,7 +228,7 @@ class FamilyGroup:
def dump_child_event(self,text,name,event): def dump_child_event(self,text,name,event):
if event: if event:
date = event.getDate() date = event.getDate()
place = event.getPlace().get_title() place = event.getPlaceName()
else: else:
date = "" date = ""
place = "" place = ""

View File

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

View File

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

View File

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

View File

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

View File

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