UTF-8 support for translations, clean up gettext, improved gallery handling

svn: r1204
This commit is contained in:
Don Allingham 2002-11-25 04:30:36 +00:00
parent 57beb883ee
commit b6926fa77b
79 changed files with 2579 additions and 2750 deletions

2
gramps2/configure vendored
View File

@ -1567,7 +1567,7 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
RELEASE=pre5
RELEASE=pre6
VERSIONSTRING=$VERSION
if test x"$RELEASE" != "x"

View File

@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl May need to run automake && aclocal first
AC_INIT(src/gramps.py)
AM_INIT_AUTOMAKE(gramps, 0.9.0)
RELEASE=pre5
RELEASE=pre6
VERSIONSTRING=$VERSION
if test x"$RELEASE" != "x"

View File

@ -1,5 +1,5 @@
%define ver 0.9.0
%define rel pre5
%define rel pre6
%define prefix /usr
Summary: Genealogical Research and Analysis Management Programming System.

View File

@ -35,8 +35,7 @@ import os
#
#-------------------------------------------------------------------------
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -49,6 +49,7 @@ import RelLib
import const
import Utils
import GrampsCfg
import ListModel
#-------------------------------------------------------------------------
#
@ -80,37 +81,14 @@ class AddSpouse:
self.rel_combo = self.glade.get_widget("rel_combo")
self.relation_type = self.glade.get_widget("rel_type")
self.spouse_list = self.glade.get_widget("spouse_list")
self.model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
gobject.TYPE_STRING, gobject.TYPE_STRING,
gobject.TYPE_STRING)
self.spouse_list.set_model(self.model)
self.selection = self.spouse_list.get_selection()
self.selection.connect('changed',self.select_row)
titles = [ (_('Name'),3,200), (_('ID'),1,50), (_('Birth Date'),4,50),
('',0,50), ('',0,0)]
self.slist = ListModel.ListModel(self.spouse_list, titles, self.select_row )
self.relation_def = self.glade.get_widget("reldef")
self.ok = self.glade.get_widget('spouse_ok')
colno = 0
for title in [ (_('Name'),3,200),
(_('ID'),1,50),
(_('Birth Date'),4,50),
('',0,50),
('',0,0)]:
renderer = gtk.CellRendererText ()
column = gtk.TreeViewColumn (title[0], renderer, text=colno)
colno = colno + 1
column.set_clickable (gtk.TRUE)
if title[0] == '':
column.set_clickable(gtk.TRUE)
column.set_visible(gtk.FALSE)
else:
column.set_resizable(gtk.TRUE)
column.set_sort_column_id(title[1])
column.set_min_width(title[2])
self.spouse_list.append_column(column)
if colno == 1:
column.clicked()
self.ok.set_sensitive(0)
self.rel_combo.set_popdown_strings(const.familyRelations)
@ -234,16 +212,12 @@ class AddSpouse:
index = 0
self.entries = []
self.model.clear()
self.slist.clear()
for key in self.db.getPersonKeys():
data = self.db.getPersonDisplay(key)
if data[2] == sgender:
continue
iter = self.model.append()
self.entries.append(key)
self.model.set(iter,0,data[0],1,data[1],2,data[3],3,data[5],4,data[6])
if person == key:
self.selection.select_iter(iter)
self.slist.add([data[0],data[1],data[3],data[5],data[6]],key,person==key)
#-------------------------------------------------------------------------
#

View File

@ -41,8 +41,7 @@ import RelLib
import Sources
from DateEdit import DateEdit
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -130,7 +130,7 @@ class AttributeEditor:
self.attrib.setSourceRefList(self.srcreflist)
self.update(type,value,note,priv)
print self.parent
self.parent.redraw_attr_list()
Utils.destroy_passed_object(obj)

View File

@ -100,7 +100,7 @@ class AutoCompBase:
this form of a select_region() call works in a signal handler and
the other form doesn't is a mystery.
"""
entry.select_region(0, 0)
gtk.Editable.select_region(entry,0, 0)
def timer_callback(self,entry):
"""
@ -146,8 +146,10 @@ class AutoCombo(AutoCompBase):
self.inb = 0
text = self.entry.entry.get_text()
if self.nl == string.lower(text):
self.entry.entry.set_position(self.l)
self.entry.entry.select_region(self.l, -1)
gtk.Editable.set_position(self.entry.entry,self.l)
gtk.Editable.select_region(self.entry.entry,self.l,-1)
# self.entry.entry.set_position(self.l)
# self.entry.entry.select_region(self.l, -1)
def build_list(self,widget,event):
"""Internal task that builds the popdown strings. This task is called when the
@ -202,8 +204,8 @@ class AutoCombo(AutoCompBase):
n = self.vals[0]
self.nl = string.lower(n)
entry.set_text(n)
entry.set_position(self.l)
entry.select_region(self.l, -1)
gtk.Editable.set_position(entry,self.l)
gtk.Editable.select_region(entry,self.l, -1)
else:
self.vals = [""]
@ -256,7 +258,7 @@ class AutoEntry(AutoCompBase):
if nl[0:self.l] == typed_lc:
self.nl = nl
entry.set_text(n)
entry.set_position(self.l)
entry.select_region(self.l, -1)
gtk.Editable.set_position(entry,self.l)
gtk.Editable.select_region(entry,self.l, -1)
return

View File

@ -38,8 +38,7 @@ import time
#
#-------------------------------------------------------------------------
import Calendar
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -36,8 +36,7 @@ import Utils
import const
import GrampsCfg
import VersionControl
from intl import gettext
_ = gettext
from intl import gettext as _
try:
import ZODB

View File

@ -40,9 +40,7 @@ import gtk.glade
#
#-------------------------------------------------------------------------
import const
import intl
_ = intl.gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -28,8 +28,7 @@ import os
import sys
import gtk
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -45,8 +45,7 @@ from gnome.ui import *
#-------------------------------------------------------------------------
import GrampsCfg
import AutoComp
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -49,8 +49,7 @@ import gtk
import const
from RelLib import *
import Date
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -81,7 +81,6 @@ class ImageSelect:
self.parent = parent
self.canvas_list = {}
self.item_map = {}
self.item_map = {}
self.p_map = {}
def add_thumbnail(self, photo):
@ -241,14 +240,17 @@ class Gallery(ImageSelect):
def item_event(self, widget, event=None):
if self.button and event.type == gtk.gdk.MOTION_NOTIFY :
if widget.drag_check_threshold(self.remember_x,self.remember_y,event.x,event.y):
self.drag_item = widget.get_item_at(self.remember_x,self.remember_y)
if widget.drag_check_threshold(self.remember_x,self.remember_y,
event.x,event.y):
self.drag_item = widget.get_item_at(self.remember_x,
self.remember_y)
if self.drag_item:
context = widget.drag_begin(_drag_targets,
gtk.gdk.ACTION_COPY|gtk.gdk.ACTION_MOVE,
self.button, event)
return gtk.TRUE
photo = widget.get_data('obj')
style = self.iconlist.get_style()
if event.type == gtk.gdk.BUTTON_PRESS:
if event.button == 1:
@ -257,7 +259,6 @@ class Gallery(ImageSelect):
item = widget.get_item_at(event.x,event.y)
if item:
(i,t,b,self.photo) = self.p_map[item]
style = self.iconlist.get_style()
t.set(fill_color_gdk=style.fg[gtk.STATE_SELECTED])
b.set(fill_color_gdk=style.bg[gtk.STATE_SELECTED])
if self.sel:
@ -281,7 +282,10 @@ class Gallery(ImageSelect):
elif event.type == gtk.gdk.BUTTON_RELEASE:
self.button = 0
elif event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
LocalMediaProperties(photo,self.path,self)
item = widget.get_item_at(event.x,event.y)
if item:
(i,t,b,self.photo) = self.p_map[item]
LocalMediaProperties(self.photo,self.path,self)
return gtk.TRUE
elif event.type == gtk.gdk.MOTION_NOTIFY:
if event.state & gtk.gdk.BUTTON1_MASK:
@ -313,7 +317,7 @@ class Gallery(ImageSelect):
oid = object.getId()
if self.canvas_list.has_key(oid):
(grp,item,text,bg,x,y) = self.canvas_list[oid]
(grp,item,text,x,y) = self.canvas_list[oid]
if x != self.cx or y != self.cy:
grp.move(self.cx-x,self.cy-y)
else:
@ -331,39 +335,28 @@ class Gallery(ImageSelect):
xloc = (_IMAGEX-x)/2
yloc = (_IMAGEY-y)/2
bg = grp.add(gnome.canvas.CanvasRect,
x1=0,
x2=_IMAGEX,
y2=_IMAGEY,
y1=_IMAGEY-20)
style = self.iconlist.get_style()
box = grp.add(gnome.canvas.CanvasRect,x1=0,x2=_IMAGEX,y1=_IMAGEY-20,
y2=_IMAGEY, fill_color_gdk=style.bg[gtk.STATE_NORMAL])
item = grp.add(gnome.canvas.CanvasPixbuf,
pixbuf=image,
x=xloc,
y=yloc)
text = grp.add(gnome.canvas.CanvasText,
x=_IMAGEX/2,
y=_IMAGEX,
pixbuf=image,x=xloc, y=yloc)
text = grp.add(gnome.canvas.CanvasText, x=_IMAGEX/2,
anchor=gtk.ANCHOR_CENTER,
text=description)
justification=gtk.JUSTIFY_CENTER,
y=_IMAGEY-10, text=description)
self.item_map[item] = oid
self.item_map[box] = oid
self.item_map[text] = oid
self.item_map[grp] = oid
self.item_map[bg] = oid
self.item_map[item] = oid
for i in [ item, text, box, grp ] :
self.item_map[i] = oid
self.p_map[i] = (item,text,box,photo)
i.show()
self.p_map[item] = (item,text,bg,photo)
self.p_map[text] = (item,text,bg,photo)
self.p_map[grp] = (item,text,bg,photo)
self.p_map[bg] = (item,text,bg,photo)
item.show()
text.show()
bg.show()
self.canvas_list[oid] = (grp,item,text,bg,self.cx,self.cy)
self.canvas_list[oid] = (grp,item,text,self.cx,self.cy)
if self.cx + _PAD + _IMAGEX > self.x:
self.cx = _PAD
@ -511,7 +504,6 @@ class Gallery(ImageSelect):
val[0].hide()
val[1].hide()
val[2].hide()
val[3].hide()
l = self.dataobj.getPhotoList()
l.remove(photo)
@ -584,29 +576,31 @@ class LocalMediaProperties:
self.alist = photo.getAttributeList()[:]
self.lists_changed = 0
self.parent = parent
self.db = parent.db
fname = self.object.getPath()
self.change_dialog = gtk.glade.XML(const.imageselFile,
"change_description")
descr_window = self.change_dialog.get_widget("description")
pixmap = self.change_dialog.get_widget("pixmap")
self.pixmap = self.change_dialog.get_widget("pixmap")
self.attr_type = self.change_dialog.get_widget("attr_type")
self.attr_value = self.change_dialog.get_widget("attr_value")
self.attr_details = self.change_dialog.get_widget("attr_details")
self.attr_list = self.change_dialog.get_widget("attr_list")
self.attr_model = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING)
Utils.build_columns(self.attr_list, [(_('Attribute'),150,-1),
(_('Value'),100,-1)])
self.attr_list.set_model(self.attr_model)
self.attr_list.get_selection().connect('changed',self.on_attr_list_select_row)
titles = [(_('Attribute'),-1,150),(_('Value'),-1,100)]
self.atree = ListModel.ListModel(self.attr_list,titles,
self.on_attr_list_select_row,
self.on_update_attr_clicked)
descr_window.set_text(self.object.getDescription())
mtype = self.object.getMimeType()
if os.path.isfile(path):
self.pix = gtk.gdk.pixbuf_new_from_file(path)
pixmap.set_from_pixbuf(self.pix)
thumb = Utils.thumb_path(path,self.object)
if os.path.isfile(thumb):
self.pix = gtk.gdk.pixbuf_new_from_file(thumb)
self.pixmap.set_from_pixbuf(self.pix)
self.change_dialog.get_widget("private").set_active(photo.getPrivacy())
self.change_dialog.get_widget("gid").set_text(self.object.getId())
@ -627,24 +621,28 @@ class LocalMediaProperties:
"on_apply_clicked" : self.on_apply_clicked,
"on_add_attr_clicked": self.on_add_attr_clicked,
"on_delete_attr_clicked" : self.on_delete_attr_clicked,
"on_update_attr_clicked" : self.on_update_attr_clicked,
})
self.redraw_attr_list()
def on_up_clicked(self,obj):
store,iter = obj.get_selected()
store,iter = self.atree.get_selected()
if iter:
row = store.get_path(iter)
# select row
row = self.atree.get_row(iter)
if row != 0:
self.atree.select_row(row-1)
def on_down_clicked(self,obj):
store,iter = obj.get_selected()
if iter:
row = store.get_path(iter)
# select row
model,iter = self.atree.get_selected()
if not iter:
return
row = self.atree.get_row(iter)
self.atree.select_row(row+1)
def redraw_attr_list(self):
Utils.redraw_list(self.alist,self.attr_model,disp_attr)
self.atree.clear()
for attr in self.alist:
d = [attr.getType(),attr.getValue()]
self.atree.add(d,attr)
def on_apply_clicked(self, obj):
priv = self.change_dialog.get_widget("private").get_active()
@ -666,11 +664,10 @@ class LocalMediaProperties:
self.on_apply_clicked(obj)
Utils.destroy_passed_object(obj)
def on_attr_list_select_row(self,obj,row,b,c):
store,iter = obj.get_selected()
def on_attr_list_select_row(self,obj):
store,iter = self.atree.get_selected()
if iter:
row = store.get_path(iter)
attr = self.alist[row[0]]
attr = self.atree.get_object(iter)
self.attr_type.set_label(attr.getType())
self.attr_value.set_text(attr.getValue())
@ -681,10 +678,9 @@ class LocalMediaProperties:
def on_update_attr_clicked(self,obj):
import AttrEdit
store,iter = obj.get_selected()
store,iter = self.atree.get_selected()
if iter:
row = store.get_path(iter)
attr = self.alist[row[0]]
attr = self.atree.get_object(iter)
AttrEdit.AttributeEditor(self,attr,"Media Object",
Plugins.get_image_attributes())
@ -717,21 +713,23 @@ class GlobalMediaProperties:
self.change_dialog = gtk.glade.XML(const.imageselFile,"change_global")
self.descr_window = self.change_dialog.get_widget("description")
self.notes = self.change_dialog.get_widget("notes")
pixmap = self.change_dialog.get_widget("pixmap")
self.pixmap = self.change_dialog.get_widget("pixmap")
self.attr_type = self.change_dialog.get_widget("attr_type")
self.attr_value = self.change_dialog.get_widget("attr_value")
self.attr_details = self.change_dialog.get_widget("attr_details")
self.attr_list = self.change_dialog.get_widget("attr_list")
self.attr_model = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING)
Utils.build_columns(self.attr_list, [(_('Attribute'),150,-1), (_('Value'),100,-1)])
self.attr_list.set_model(self.attr_model)
self.attr_list.get_selection().connect('changed',self.on_attr_list_select_row)
titles = [(_('Attribute'),-1,150),(_('Value'),-1,100)]
self.atree = ListModel.ListModel(self.attr_list,titles,
self.on_attr_list_select_row,
self.on_update_attr_clicked)
self.descr_window.set_text(self.object.getDescription())
mtype = self.object.getMimeType()
pb = gtk.gdk.pixbuf_new_from_file(Utils.thumb_path(self.path,self.object))
pixmap.set_from_pixbuf(pb)
self.pixmap.set_from_pixbuf(pb)
self.change_dialog.get_widget("gid").set_text(self.object.getId())
self.makelocal = self.change_dialog.get_widget("makelocal")
@ -755,16 +753,18 @@ class GlobalMediaProperties:
self.redraw_attr_list()
def on_up_clicked(self,obj):
store,iter = obj.get_selected()
store,iter = self.atree.get_selected()
if iter:
row = store.get_path(iter)
# select row
row = self.atree.get_row(iter)
if row != 0:
self.atree.select_row(row-1)
def on_down_clicked(self,obj):
store,iter = obj.get_selected()
if iter:
row = store.get_path(iter)
# select row
model,iter = self.atree.get_selected()
if not iter:
return
row = self.atree.get_row(iter)
self.atree.select_row(row+1)
def update_info(self):
fname = self.object.getPath()
@ -786,7 +786,10 @@ class GlobalMediaProperties:
self.update()
def redraw_attr_list(self):
Utils.redraw_list(self.alist,self.attr_model,disp_attr)
self.atree.clear()
for attr in self.alist:
d = [attr.getType(),attr.getValue()]
self.atree.add(d,attr)
def button_press(self,obj,event):
store,iter = self.refmodel.selection.get_selected()
@ -800,11 +803,9 @@ class GlobalMediaProperties:
return
self.refs = 1
titles = [(_('Type'),0,150),(_('ID'),1,75),(_('Value'),2,100)]
self.refmodel = ListModel.ListModel(self.change_dialog.get_widget("refinfo"),
[(_('Type'),150),(_('ID'),75),(_('Value'),100)])
ref = self.refmodel.tree
ref.connect('button-press-event',self.button_press)
titles,event_func=self.button_press)
for key in self.db.getPersonKeys():
p = self.db.getPerson(key)
for o in p.getPhotoList():
@ -849,10 +850,9 @@ class GlobalMediaProperties:
Utils.destroy_passed_object(obj)
def on_attr_list_select_row(self,obj,row,b,c):
store,iter = obj.get_selected()
store,iter = self.atree.get_selected()
if iter:
row = store.get_path(iter)
attr = self.alist[row[0]]
attr = self.atree.get_object(iter)
self.attr_type.set_label(attr.getType())
self.attr_value.set_text(attr.getValue())
@ -863,10 +863,9 @@ class GlobalMediaProperties:
def on_update_attr_clicked(self,obj):
import AttrEdit
store,iter = obj.get_selected()
store,iter = self.atree.get_selected()
if iter:
row = store.get_path(iter)
attr = self.alist[row[0]]
attr = self.atree.get_object(iter)
AttrEdit.AttributeEditor(self,attr,"Media Object",
Plugins.get_image_attributes())
@ -880,15 +879,6 @@ class GlobalMediaProperties:
AttrEdit.AttributeEditor(self,None,"Media Object",
Plugins.get_image_attributes())
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def disp_attr(attr):
return [const.display_pattr(attr.getType()),attr.getValue(),'']
class DeleteMediaQuery:
def __init__(self,media,db,update):

View File

@ -27,8 +27,8 @@ class ListModel:
l = len(dlist)
self.mylist = [TYPE_STRING]*l + [TYPE_PYOBJECT]
self.tree.set_rules_hint(gtk.TRUE)
self.new_model()
self.selection = self.tree.get_selection()
self.data_index = l
@ -39,10 +39,13 @@ class ListModel:
column = gtk.TreeViewColumn(name[0],renderer,text=cnum)
column.set_min_width(name[2])
if name[0] == '':
column.set_clickable(gtk.TRUE)
column.set_visible(gtk.FALSE)
else:
column.set_resizable(gtk.TRUE)
if name[1] == -1:
column.set_clickable(gtk.FALSE)
else:
column.set_clickable(gtk.TRUE)
cnum = cnum + 1
self.tree.append_column(column)
@ -57,7 +60,7 @@ class ListModel:
num = num + 1
self.connect_model()
self.column.clicked()
self.model.set_sort_column_id(0,gtk.SORT_ASCENDING)
if select_func:
self.selection.connect('changed',select_func)
@ -70,7 +73,7 @@ class ListModel:
def connect_model(self):
self.tree.set_model(self.model)
self.column.clicked()
self.model.set_sort_column_id(0,gtk.SORT_ASCENDING)
def get_selected(self):
return self.selection.get_selected()
@ -91,13 +94,15 @@ class ListModel:
def get_object(self,iter):
return self.model.get_value(iter,self.data_index)
def add(self,data,info=None):
def add(self,data,info=None,select=0):
iter = self.model.append()
col = 0
for object in data:
self.model.set_value(iter,col,object)
col = col + 1
self.model.set_value(iter,col,info)
if select:
self.selection.select_iter(iter)
def add_and_select(self,data,info=None):
iter = self.model.append()

View File

@ -34,8 +34,7 @@ import const
import Utils
from RelLib import *
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -131,7 +131,7 @@ class Marriage:
self.gallery.load_images()
etitles = [(_('Event'),0,150),(_('Date'),1,150),(_('Place'),2,150)]
atitles = [(_('Attribute'),0,150),(_('Value'),1,150)]
atitles = [(_('Attribute'),-1,150),(_('Value'),-1,150)]
self.etree = ListModel.ListModel(self.event_list, etitles,
self.on_select_row,
@ -306,20 +306,18 @@ class Marriage:
data = str(('fattr',self.family.getId(),pickled));
selection_data.set(selection_data.target, bits_per, data)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def update_lists(self):
self.family.setEventList(self.elist)
self.family.setAttributeList(self.alist)
def redraw_attr_list(self):
for data in self.alist:
self.atree.add([data.getName(),data.getValue()],data)
self.atree.clear()
for attr in self.alist:
d = [const.display_fattr(attr.getType()),attr.getValue()]
self.atree.add(d,attr)
def redraw_event_list(self):
self.etree.clear()
for data in self.elist:
self.etree.add([data.getName(),data.getQuoteDate(),data.getPlaceName()],data)
@ -559,22 +557,3 @@ class Marriage:
name = mother.getPrimaryName().getName()
AttrEdit.AttributeEditor(self,None,name,const.familyAttributes)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def disp_attr(attr):
return [const.display_fattr(attr.getType()),attr.getValue()]
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def disp_event(event):
return [const.display_fevent(event.getName()),
event.getQuoteDate(),
event.getPlaceName()]

View File

@ -36,8 +36,7 @@ import AutoComp
import Sources
from RelLib import *
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -44,8 +44,7 @@ import gtk.glade
# standard python modules
#
#-------------------------------------------------------------------------
from intl import gettext
_ = gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -1,35 +0,0 @@
/* XPM */
static char * bad_xpm[] = {
"10 10 21 1",
" c None",
". c #A21818",
"+ c #A31818",
"@ c #9A1717",
"# c #C80E0E",
"$ c #C90F0F",
"% c #CA0C0C",
"& c #E60606",
"* c #F40202",
"= c #DE0909",
"- c #8F0D0D",
"; c #F90101",
"> c #FF0000",
", c #F80101",
"' c #E50707",
") c #C20E0E",
"! c #C10E0E",
"~ c #000000",
"{ c #810C0C",
"] c #C80C0C",
"^ c #130202",
" .++@ ",
" #$$$$% ",
".$&&&*=- ",
"+$&;>,') ",
"+$&>>,'!~ ",
"@$*,,*={~ ",
" %=''=]^ ",
" -)!{^~ ",
" ~~ ",
" "
};

View File

@ -1,35 +0,0 @@
/* XPM */
static char * caution_xpm[] = {
"10 10 21 1",
" c None",
". c #B0AF28",
"+ c #B2B028",
"@ c #A9A726",
"# c #D1D017",
"$ c #D2D118",
"% c #D2D114",
"& c #EAEA0B",
"* c #F6F604",
"= c #E3E30F",
"- c #979615",
"; c #F9F902",
"> c #FFFF00",
", c #F9F903",
"' c #E9E90B",
") c #CACA18",
"! c #C9C918",
"~ c #000000",
"{ c #898813",
"] c #CFCF14",
"^ c #151504",
" .++@ ",
" #$$$$% ",
".$&&&*=- ",
"+$&;>,') ",
"+$&>>,'!~ ",
"@$*,,*={~ ",
" %=''=]^ ",
" -)!{^~ ",
" ~~ ",
" "
};

View File

@ -30,7 +30,8 @@ import os
# internationalization
#
#-------------------------------------------------------------------------
from intl import gettext as _
from intl import gettext
_ = gettext
#-------------------------------------------------------------------------
#
@ -56,11 +57,11 @@ if os.environ.has_key('GRAMPSDIR'):
else:
rootDir = "."
papersize = "%s/papersize.xml" % rootDir
good_xpm = "%s/good.png" % rootDir
bad_xpm = "%s/bad.png" % rootDir
caution_xpm = "%s/caution.png" % rootDir
papersize = "%s/papersize.xml" % rootDir
system_filters = "%s/system_filters.xml" % rootDir
custom_filters = "~/.gramps/custom_filters.xml"
icon = "%s/gramps.xpm" % rootDir
@ -99,7 +100,7 @@ startup = 1
#
#-------------------------------------------------------------------------
progName = "GRAMPS"
version = "0.9.0-pre5"
version = "0.9.0-pre6"
copyright = "© 2001-2002 Donald N. Allingham"
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
comments = _("GRAMPS (Genealogical Research and Analysis "

View File

@ -34,8 +34,7 @@ from latin_utf8 import latin_to_utf8
import string
import Plugins
import ImgManip
import intl
_ = intl.gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -31,8 +31,7 @@ import const
from TextDoc import *
from intl import gettext
_ = gettext
from intl import gettext as _
t_header_line_re = re.compile(r"(.*)<TITLE>(.*)</TITLE>(.*)",
re.DOTALL|re.IGNORECASE|re.MULTILINE)

View File

@ -28,8 +28,7 @@ import gzip
from TarFile import TarFile
import Plugins
import ImgManip
import intl
_ = intl.gettext
from intl import gettext as _
def points(val):
inch = float(val)/2.54

View File

@ -31,8 +31,7 @@
from TextDoc import *
import Plugins
import ImgManip
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -22,8 +22,7 @@ import os
import tempfile
import string
import Plugins
import intl
_ = intl.gettext
from intl import gettext as _
from TextDoc import *
from DrawDoc import *

View File

@ -26,11 +26,9 @@ from TextDoc import *
from latin_utf8 import latin_to_utf8
import const
import Plugins
import intl
from intl import gettext as _
import ImgManip
_ = intl.gettext
try:
from codecs import *
except:

View File

@ -21,8 +21,7 @@
import os
import string
import Plugins
import intl
_ = intl.gettext
from intl import gettext as _
from TextDoc import *
from DrawDoc import *

View File

@ -26,8 +26,7 @@
from TextDoc import *
import Plugins
import ImgManip
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -24,8 +24,7 @@ import string
from TextDoc import *
from DrawDoc import *
import Plugins
import intl
_ = intl.gettext
from intl import gettext as _
try:
from reportlab.pdfgen import canvas

View File

@ -27,8 +27,7 @@ from TextDoc import *
import Plugins
import ImgManip
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -21,8 +21,7 @@
import os
import string
import Plugins
import intl
_ = intl.gettext
from intl import gettext as _
from TextDoc import *
from DrawDoc import *

View File

@ -22,8 +22,7 @@
import Filter
import Date
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -22,8 +22,7 @@
import Filter
import Date
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -21,8 +21,7 @@
"Disconnected individuals"
import Filter
import intl
_ = intl.gettext
from intl import gettext as _
class Disconnected(Filter.Filter):
"Disconnected individuals"

View File

@ -22,8 +22,7 @@
import Filter
import re
import intl
_ = intl.gettext
from intl import gettext as _
class EventPlace(Filter.Filter):
"""Finds people with a specfied event location in any field"""

View File

@ -21,8 +21,7 @@
"People who have an event type of ..."
import Filter
import intl
_ = intl.gettext
from intl import gettext as _
class EventType(Filter.Filter):

View File

@ -22,8 +22,7 @@
import Filter
from RelLib import Person
import intl
_ = intl.gettext
from intl import gettext as _
class Females(Filter.Filter):
"Females"

View File

@ -21,8 +21,7 @@
"People who have images"
import Filter
import intl
_ = intl.gettext
from intl import gettext as _
class HavePhotos(Filter.Filter):
"People who have images"

View File

@ -22,8 +22,7 @@
import Filter
from RelLib import Person
import intl
_ = intl.gettext
from intl import gettext as _
class IncompleteNames(Filter.Filter):
"People with incomplete names"

View File

@ -22,8 +22,7 @@
import Filter
from RelLib import Person
import intl
_ = intl.gettext
from intl import gettext as _
class Males(Filter.Filter):
"Males"

View File

@ -22,8 +22,7 @@
import Filter
import soundex
import intl
_ = intl.gettext
from intl import gettext as _
class MatchSndEx(Filter.Filter):
"Names with same SoundEx code as ..."

View File

@ -22,8 +22,7 @@
import Filter
import soundex
import intl
_ = intl.gettext
from intl import gettext as _
class MatchSndEx2(Filter.Filter):
"Names with the specified SoundEx code"

View File

@ -21,8 +21,7 @@
"People with multiple marriage records"
import Filter
import intl
_ = intl.gettext
from intl import gettext as _
class MultipleMarriages(Filter.Filter):
"People with multiple marriage records"

View File

@ -21,8 +21,7 @@
"People with no marriage records"
import Filter
import intl
_ = intl.gettext
from intl import gettext as _
class NeverMarried(Filter.Filter):
"People with no marriage records"

View File

@ -21,8 +21,7 @@
"People without a birth date"
import Filter
import intl
_ = intl.gettext
from intl import gettext as _
class NoBirthdate(Filter.Filter):
"People without a birth date"

View File

@ -21,8 +21,7 @@
"People with children"
import Filter
import intl
_ = intl.gettext
from intl import gettext as _
class HaveChildren(Filter.Filter):
"People with children"

View File

@ -23,8 +23,7 @@
import Filter
import re
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
class RegExMatch(Filter.Filter):
"Names that match a regular expression"

View File

@ -23,8 +23,7 @@
import Filter
import string
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
class SubString(Filter.Filter):
"Names that contain a substring"

View File

@ -1,38 +0,0 @@
/* XPM */
static char * good_xpm[] = {
"10 10 24 1",
" c None",
". c #0EB40E",
"+ c #11A711",
"@ c #11A211",
"# c #0DA10D",
"$ c #09CB09",
"% c #0BCC0B",
"& c #08CD08",
"* c #098609",
"= c #05E705",
"- c #02F502",
"; c #07E007",
"> c #0A9D0A",
", c #01F901",
"' c #00FF00",
") c #01F801",
"! c #05E605",
"~ c #0AC40A",
"{ c #0AC30A",
"] c #000000",
"^ c #099209",
"/ c #08CB08",
"( c #033403",
"_ c #098509",
" .+++@# ",
".$%%%%&* ",
"+%===-;> ",
"+%=,')!~ ",
"+%='')!{] ",
"@%-))-;^] ",
"#&;!!;/( ",
" _>~{^(] ",
" ]] ",
" "
};

View File

@ -6,16 +6,19 @@
#
#-------------------------------------------------------------------------
import os
import intl
import locale
import gtk.glade
import intl
if os.environ.has_key("GRAMPSI18N"):
loc = os.environ["GRAMPSI18N"]
else:
loc = "locale"
intl.textdomain("gramps")
intl.bindtextdomain("gramps",loc)
intl.bind_textdomain_codeset("gramps",'UTF-8')
intl.textdomain("gramps")
locale.setlocale(locale.LC_NUMERIC,"C")
#-------------------------------------------------------------------------

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -59,6 +59,14 @@ PyIntl_bindtextdomain(PyObject* self,PyObject*args)
return PyString_FromString(bindtextdomain(domain,dirname));
}
static PyObject*
PyIntl_bind_textdomain_codeset(PyObject* self,PyObject*args)
{
char *domain,*dirname;
if(!PyArg_ParseTuple(args,"zz",&domain,&dirname))return 0;
return PyString_FromString(bind_textdomain_codeset(domain,dirname));
}
static PyObject*
PyIntl_setlocale(PyObject* self,PyObject* args)
{
@ -120,6 +128,7 @@ static struct PyMethodDef PyIntl_Methods[] = {
{"dcgettext",(PyCFunction)PyIntl_dcgettext,1},
{"textdomain",(PyCFunction)PyIntl_textdomain,1},
{"bindtextdomain",(PyCFunction)PyIntl_bindtextdomain,1},
{"bind_textdomain_codeset",(PyCFunction)PyIntl_bind_textdomain_codeset,1},
{"setlocale",(PyCFunction)PyIntl_setlocale,1},
{"localeconv",(PyCFunction)PyIntl_localeconv,0},
{NULL, NULL}

View File

@ -10,6 +10,7 @@
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="default_width">550</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="has_separator">True</property>
@ -871,15 +872,26 @@
</child>
<child>
<widget class="GtkTreeView" id="marriageEventList">
<property name="width_request">500</property>
<property name="height_request">250</property>
<widget class="GtkScrolledWindow" id="scrolledwindow25">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTreeView" id="marriageEventList">
<property name="width_request">500</property>
<property name="height_request">250</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -31,8 +31,7 @@ from SubstKeywords import SubstKeywords
import gtk
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -23,9 +23,7 @@
import RelLib
import os
import string
import intl
_ = intl.gettext
from intl import gettext as _
from Report import *
from TextDoc import *

View File

@ -46,8 +46,7 @@ from Report import *
from TextDoc import *
from SubstKeywords import SubstKeywords
import intl
_ = intl.gettext
from intl import gettext as _
_sep = 0.5

View File

@ -34,11 +34,9 @@ import os
#------------------------------------------------------------------------
from RelLib import *
import Utils
import intl
from intl import gettext as _
import GrampsCfg
_ = intl.gettext
#------------------------------------------------------------------------
#
# GTK/GNOME modules

View File

@ -36,9 +36,7 @@ import string
#------------------------------------------------------------------------
from Report import *
from TextDoc import *
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -24,9 +24,7 @@
import RelLib
import os
import sort
import intl
_ = intl.gettext
from intl import gettext as _
from Report import *
from TextDoc import *

View File

@ -24,9 +24,7 @@
import RelLib
import os
import sort
import intl
_ = intl.gettext
from intl import gettext as _
from Report import *
from TextDoc import *

View File

@ -22,8 +22,7 @@
import RelLib
import os
import intl
_ = intl.gettext
from intl import gettext as _
from Report import *
from TextDoc import *

View File

@ -23,13 +23,11 @@
import os
import string
import intl
from intl import gettext as _
import Utils
import gtk
_ = intl.gettext
from Report import *
from TextDoc import *

View File

@ -37,9 +37,7 @@ from TextDoc import *
from StyleEditor import *
from Report import *
import GenericFilter
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -24,9 +24,7 @@ import RelLib
import const
import os
import string
import intl
_ = intl.gettext
from intl import gettext as _
from TextDoc import *
from StyleEditor import *

View File

@ -22,7 +22,6 @@
import os
import re
import intl
import Utils
from intl import gettext as _

View File

@ -22,12 +22,10 @@
from ReadXML import *
import Utils
import intl
from intl import gettext as _
import gtk
import const
_ = intl.gettext
#-------------------------------------------------------------------------
#
#

View File

@ -25,9 +25,7 @@ scheme specified in the database's prefix ids
import re
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
_findint = re.compile('^[^\d]*(\d+)[^\d]*')

View File

@ -35,8 +35,7 @@ import posixpath
#------------------------------------------------------------------------
from RelLib import *
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
#------------------------------------------------------------------------
#

View File

@ -44,9 +44,7 @@ import gtk.glade
from RelLib import *
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
db = None
glade_file = None

View File

@ -27,8 +27,7 @@ import const
import GrampsCfg
import GenericFilter
import Date
import intl
_ = intl.gettext
from intl import gettext as _
import os
import re

View File

@ -27,11 +27,9 @@ import string
import time
import const
import Utils
import intl
import Date
import re
_ = intl.gettext
from intl import gettext as _
import gtk
import gnome.ui

View File

@ -26,8 +26,7 @@ import string
import time
import const
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
from gnome.ui import *
import gtk

View File

@ -48,8 +48,7 @@ import WriteXML
import TarFile
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -23,8 +23,7 @@
from RelLib import *
import os
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
from gnome.ui import *
import gtk

View File

@ -29,9 +29,7 @@ from gnome.ui import *
import RelLib
import soundex
import Utils
import intl
_ = intl.gettext
from intl import gettext as _
#-------------------------------------------------------------------------
#