GTK translation updates

svn: r1155
This commit is contained in:
Don Allingham 2002-10-28 13:36:39 +00:00
parent 0585d6fefd
commit 7cb2c15d32
24 changed files with 1567 additions and 1487 deletions

Binary file not shown.

View File

@ -67,7 +67,7 @@ class DisplayTrace:
self.top.set_title(_('Internal Error - GRAMPS'))
window.get_buffer().set_text(msg.getvalue())
self.glade.signal_autoconnect('on_close_clicked',self.close)
self.glade.signal_autoconnect({'on_close_clicked':self.close})
def close(self,obj):
self.top.destroy()

View File

@ -228,7 +228,7 @@ class DelSrcQuery:
object.setSourceRefList(l)
def query_response(self):
del self.db.getSourceMap()[self.source.getId()]
self.db.removeSource(self.source.getId())
Utils.modified()
for key in self.db.getPersonKeys():

View File

@ -87,6 +87,7 @@ class FamilyView:
self.top.get_widget('add_spparents').connect('clicked',self.add_sp_parents)
self.top.get_widget('del_spparents').connect('clicked',self.del_sp_parents)
self.top.get_widget('fam_back').connect('clicked',self.child_back)
self.top.get_widget('del_child_btn').connect('clicked',self.remove_child_clicked)
column = gtk.TreeViewColumn('',gtk.CellRendererText(),text=0)
self.spouse_list.append_column(column)
@ -153,6 +154,29 @@ class FamilyView:
except:
DisplayTrace.DisplayTrace()
def remove_child_clicked(self,obj):
if not self.family or not self.person:
return
model, iter = self.child_selection.get_selected()
if not iter:
return
id = self.child_model.get_value(iter,2)
child = self.parent.db.getPerson(id)
self.family.removeChild(child)
child.removeAltFamily(child)
if len(self.family.getChildList()) == 0:
if self.family.getFather() == None:
self.parent.delete_family_from(self.family.getMother())
elif self.family.getMother() == None:
self.parent.delete_family_from(self.family.getFather())
Utils.modified()
self.load_family()
def remove_spouse(self,obj):
"""Delete the currently selected spouse from the family"""
if self.person == None:

View File

@ -835,49 +835,49 @@ if not CustomFilters:
reload_custom_filters()
def build_filter_menu(local_filters = []):
menu = gtk.GtkMenu()
menu = gtk.Menu()
menuitem = gtk.GtkMenuItem(_("Local Filters"))
menuitem = gtk.MenuItem(_("Local Filters"))
menu.append(menuitem)
menuitem.show()
menuitem.set_sensitive(0)
menuitem = gtk.GtkMenuItem()
menuitem = gtk.MenuItem()
menuitem.show()
menu.append(menuitem)
for filter in local_filters:
menuitem = gtk.GtkMenuItem(filter.get_name())
menuitem = gtk.MenuItem(filter.get_name())
menuitem.show()
menu.append(menuitem)
menuitem.set_data("filter", filter)
menuitem = gtk.GtkMenuItem(_("System Filters"))
menuitem = gtk.MenuItem(_("System Filters"))
menuitem.show()
menu.append(menuitem)
menuitem.set_sensitive(0)
menuitem = gtk.GtkMenuItem()
menuitem = gtk.MenuItem()
menuitem.show()
menu.append(menuitem)
for filter in SystemFilters.get_filters():
menuitem = gtk.GtkMenuItem(_(filter.get_name()))
menuitem = gtk.MenuItem(_(filter.get_name()))
menuitem.show()
menu.append(menuitem)
menuitem.set_data("filter", filter)
menuitem = gtk.GtkMenuItem(_("Custom Filters"))
menuitem = gtk.MenuItem(_("Custom Filters"))
menu.append(menuitem)
menuitem.show()
menuitem.set_sensitive(0)
menuitem = gtk.GtkMenuItem()
menuitem = gtk.MenuItem()
menuitem.show()
menu.append(menuitem)
for filter in CustomFilters.get_filters():
menuitem = gtk.GtkMenuItem(_(filter.get_name()))
menuitem = gtk.MenuItem(_(filter.get_name()))
menuitem.show()
menu.append(menuitem)
menuitem.set_data("filter", filter)

View File

@ -355,13 +355,6 @@ def set_bool(key,value):
def set_string(key,value):
client.set_string(key,value)
def get_string(key):
val = client.get_string(key)
if val:
return val
else:
return ""
def sync():
client.suggest_sync()

View File

@ -59,11 +59,12 @@ class DescendLine(GraphLayout):
self.maxy = pos
self.elist.pop()
def depth(self,person,val=1.0):
def depth(self,person,val=0):
for family in person.getFamilyList():
clist = family.getChildList()
val = val + len(clist)
for child in clist:
val = self.depth(child,val)
val = val - 1.0
return val
d=self.depth(child)
if d > 0:
val = val + d - 1 #first child is always on the same
return val #row as the parent, so subtract 1

View File

@ -54,6 +54,7 @@ import Marriage
import EditPlace
import EditSource
import ListModel
import grampslib
from QuestionDialog import ErrorDialog
from intl import gettext as _
@ -428,14 +429,17 @@ class Gallery(ImageSelect):
if event.button == 3:
photo = self.dataobj.getPhotoList()[icon]
menu = gtk.GtkMenu()
item = gtk.GtkTearoffMenuItem()
menu = gtk.Menu()
item = gtk.TearoffMenuItem()
item.show()
menu.append(item)
Utils.add_menuitem(menu,_("View in the default viewer"),
mtype = object.getMimeType()
progname = grampslib.default_application_name(mtype)
Utils.add_menuitem(menu,_("Open in %s") % progname,
None,self.popup_view_photo)
object = photo.getReference()
if object.getMimeType()[0:5] == "image":
if mtype[0:5] == "image":
Utils.add_menuitem(menu,_("Edit with the GIMP"),
None,self.popup_edit_photo)
Utils.add_menuitem(menu,_("Edit Object Properties"),None,

View File

@ -58,7 +58,7 @@ import latin_utf8
u2l = latin_utf8.utf8_to_latin
_ = intl.gettext
from QuesionDialog import ErrorDialog
from QuestionDialog import ErrorDialog
#-------------------------------------------------------------------------
#
@ -815,8 +815,8 @@ class ReportDialog:
return None
if not self.get_target_is_directory() and os.path.isdir(self.target_path):
GnomeErrorDialog(_("The filename that you gave is a directory.\n"
"You need to provide a valid filename."))
ErrorDialog(_("The filename that you gave is a directory.\n"
"You need to provide a valid filename."))
return None
self.set_default_directory(os.path.dirname(self.target_path) + os.sep)

View File

@ -65,7 +65,6 @@ class SourceView:
self.db = db
self.update = update
self.list = glade.get_widget("source_list")
self.id2col = {}
self.selection = self.list.get_selection()
colno = 0
for title in _column_headers:
@ -88,28 +87,21 @@ class SourceView:
gobject.TYPE_STRING)
self.list.set_model(self.model)
self.list.get_column(0).clicked()
# self.selection.connect('changed',self.list_row_changed)
def change_db(self,db):
self.db = db
def load_sources(self):
self.model.clear()
self.id2col = {}
for key in self.db.getSourceKeys():
val = self.db.getSourceDisplay(key)
iter = self.model.append()
self.id2col[key] = iter
self.model.set(iter, 0, val[0], 1, val[1], 2, val[2],
3, val[3], 4, val[4])
self.list.connect('button-press-event',self.button_press)
def list_row_changed(self,obj):
pass
# self.change_active_person(self.db.getPerson(id))
def button_press(self,obj,event):
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
store,iter = self.selection.get_selected()
@ -122,12 +114,13 @@ class SourceView:
EditSource.EditSource(Source(),self.db,self.new_after_edit)
def on_delete_clicked(self,obj):
if len(obj.selection) == 0:
store,iter = self.selection.get_selected()
if not iter:
return
else:
index = obj.selection[0]
source = self.db.getSourceMap()[obj.get_row_data(index)]
id = store.get_value(iter,1)
source = self.db.getSource(id)
if self.is_used(source):
ans = EditSource.DelSrcQuery(source,self.db,self.update)

View File

@ -41,7 +41,7 @@ import gtk
import Utils
import const
import TextDoc
import ListModel
class StyleListDisplay:
"""
@ -66,27 +66,26 @@ class StyleListDisplay:
"on_ok_clicked" : self.on_ok_clicked,
"on_add_clicked" : self.on_add_clicked,
"on_delete_clicked" : self.on_delete_clicked,
"on_button_press" : self.on_button_press,
"on_edit_clicked" : self.on_edit_clicked
})
self.list = self.top.get_widget("list")
self.dialog = self.top.get_widget("styles")
self.list = ListModel.ListModel(self.top.get_widget("list"),[('Style',10,10)])
self.redraw()
def redraw(self):
"""Redraws the list of styles that are current available"""
self.list.clear()
self.list.model.clear()
sheet = self.sheetlist.get_style_sheet("default")
self.list.append(["default"])
self.list.set_row_data(0,("default",sheet))
self.list.add(["default"])
index = 1
for style in self.sheetlist.get_style_names():
if style == "default":
continue
sheet = self.sheetlist.get_style_sheet(style)
self.list.append([style])
self.list.set_row_data(index,(style,sheet))
self.list.add([style])
index = index + 1
def on_add_clicked(self,obj):
@ -101,22 +100,33 @@ class StyleListDisplay:
self.callback()
self.sheetlist.save()
Utils.destroy_passed_object(obj)
def on_button_press(self,obj,event):
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
self.on_edit_clicked(obj)
def on_edit_clicked(self,obj):
"""
Called with the EDIT button is clicked. Calls the StyleEditor to edit the
selected style.
"""
if len(self.list.selection) > 0:
(name,style) = self.list.get_row_data(self.list.selection[0])
StyleEditor(name,style,self)
store,iter = self.list.selection.get_selected()
if not iter:
return
name = self.list.model.get_value(iter,0)
style = self.sheetlist.get_style_sheet(name)
StyleEditor(name,style,self)
def on_delete_clicked(self,obj):
"""Deletes teh selected style."""
if len(self.list.selection) > 0:
(name,style) = self.list.get_row_data(self.list.selection[0])
self.sheetlist.delete_style_sheet(name)
self.redraw()
store,iter = self.list.selection.get_selected()
if not iter:
return
name = self.list.model.get_value(iter,0)
style = self.sheetlist.get_style_sheet(name)
self.sheetlist.delete_style_sheet(name)
self.redraw()
class StyleEditor:
"""
@ -141,26 +151,23 @@ class StyleEditor:
self.top.signal_autoconnect({
"on_save_style_clicked" : self.on_save_style_clicked,
"fg_color_set":self.fg_color_set,
"bg_color_set":self.bg_color_set,
"destroy_passed_object" : Utils.destroy_passed_object
})
self.window = self.top.get_widget("editor")
self.pnames = self.top.get_widget("name")
# Typing CR selects OK button
self.window.editable_enters(self.top.get_widget("rmargin"))
self.window.editable_enters(self.top.get_widget("lmargin"))
self.window.editable_enters(self.top.get_widget("pad"))
self.top.get_widget("style_name").set_text(name)
myMenu = gtk.GtkMenu()
myMenu = gtk.Menu()
first = 0
for p_name in self.style.get_names():
p = self.style.get_style(p_name)
if first == 0:
self.draw(p)
first = 1
menuitem = gtk.GtkMenuItem(p_name)
menuitem = gtk.MenuItem(p_name)
menuitem.set_data("o",p)
menuitem.connect("activate",self.change_display)
menuitem.show()
@ -200,6 +207,12 @@ class StyleEditor:
c = p.get_background_color()
self.top.get_widget("bgcolor").set_i8(c[0],c[1],c[2],0)
def bg_color_set(self,obj,r,g,b,a):
print r,g,b,a
def fg_color_set(self,obj,r,g,b,a):
print r,g,b,ax
def save_paragraph(self,p):
"""Saves the current paragraph displayed on the dialog"""
@ -231,9 +244,9 @@ class StyleEditor:
p.set_right_border(self.top.get_widget("rborder").get_active())
p.set_bottom_border(self.top.get_widget("bborder").get_active())
c = self.top.get_widget("color").get_i8()
c = fg.get_i8()
font.set_color((c[0],c[1],c[2]))
c = self.top.get_widget("bgcolor").get_i8()
c = bg.get_i8()
p.set_background_color((c[0],c[1],c[2]))
def on_save_style_clicked(self,obj):

View File

@ -264,21 +264,14 @@ def add_menuitem(menu,msg,obj,func):
#-------------------------------------------------------------------------
def view_photo(photo):
type = photo.getMimeType()
prog = ""
open = ""
edit = ""
#for key in gnome.mime.get_keys(type):
# if key == 'view':
# prog = string.split(gnome.mime.get_value(type,key))
# if key == 'open':
# open = string.split(gnome.mime.get_value(type,key))
# if key == 'edit':
# edit = string.split(gnome.mime.get_value(type,key))
prog = grampslib.gnome_vfs_mime_get_value(type,'view')
open = grampslib.gnome_vfs_mime_get_value(type,'open')
edit = grampslib.gnome_vfs_mime_get_value(type,'edit')
if prog == "" and open == "" and edit == "":
#GnomeWarningDialog("Sorry, I cannot find a viewer for %s type" % type)
return
if prog == "" and open == "":
if not prog and not open :
prog = edit
else:
prog = open
@ -360,8 +353,6 @@ def get_place_from_list(obj):
else:
return select[0].get_data(LISTOBJ)
import os
def find_icon(mtype):
n = "%s/icons/%s.png" % (const.rootDir,string.replace(string.replace(mtype,'/','-'),'.','-'))
if os.path.isfile(n):

View File

@ -1865,7 +1865,7 @@
</child>
<child>
<widget class="GtkButton" id="button155">
<widget class="GtkButton" id="add_child_btn">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Adds a new child to the selected family</property>
<property name="can_focus">True</property>
@ -1891,7 +1891,7 @@
</child>
<child>
<widget class="GtkButton" id="button156">
<widget class="GtkButton" id="del_child_btn">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Deletes the selected child from the selected family</property>
<property name="can_focus">True</property>

View File

@ -1,6 +1,22 @@
%module grampslib
%{
#include <libgnomevfs/gnome-vfs-application-registry.h>
%}
extern char* gnome_vfs_mime_get_icon(const char *);
extern char* gnome_vfs_mime_type_from_name(const char* );
extern char* gnome_vfs_mime_get_description(const char*);
extern char* gnome_vfs_mime_get_value(const char*,const char*);
extern const char* gnome_vfs_mime_get_icon(const char *);
extern const char* gnome_vfs_mime_type_from_name(const char* );
extern const char* gnome_vfs_mime_get_description(const char*);
extern const char* gnome_vfs_mime_get_value(const char*,const char*);
%inline %{
const char* default_application_name(const char* type) {
GnomeVFSMimeApplication *a = gnome_vfs_mime_get_default_application(type);
return a->name;
}
const char* default_application_command(const char* type) {
GnomeVFSMimeApplication *a = gnome_vfs_mime_get_default_application(type);
return a->command;
}
%}

View File

@ -79,7 +79,7 @@ class DesBrowse:
top.show()
def add_to_tree(self,tree,person):
item = gtk.GtkTreeItem(GrampsCfg.nameof(person))
item = gtk.TreeItem(GrampsCfg.nameof(person))
item.show()
item.connect('button-press-event',self.button_press_event)
item.set_data('d',person)
@ -88,7 +88,7 @@ class DesBrowse:
for family in person.getFamilyList():
for child in family.getChildList():
if subtree == None:
subtree = gtk.GtkTree()
subtree = gtk.Tree()
subtree.show()
item.set_subtree(subtree)
self.add_to_tree(subtree,child)

View File

@ -771,15 +771,15 @@ class DetDescendantReportDialog(TextReportDialog):
def add_user_options(self):
# Create a GTK Checkbox widget for pronoun usage
self.first_name_option = gtk.GtkCheckButton(_("Use first names instead of pronouns"))
self.first_name_option = gtk.CheckButton(_("Use first names instead of pronouns"))
self.first_name_option.set_active(0)
# Create a GTK Checkbox widget for full date usage
self.full_date_option = gtk.GtkCheckButton(_("Use full dates instead of only the year"))
self.full_date_option = gtk.CheckButton(_("Use full dates instead of only the year"))
self.full_date_option.set_active(1)
# Create a GTK Checkbox widget for full date usage
self.list_children_option = gtk.GtkCheckButton(_("List children"))
self.list_children_option = gtk.CheckButton(_("List children"))
self.list_children_option.set_active(1)
# Add new options. The first argument is the tab name for grouping options.

View File

@ -204,7 +204,7 @@ class DisplayChart:
def draw_clist_display(self):
eventlist = gtk.GtkCList(len(self.event_titles),self.event_titles)
eventlist = gtk.CList(len(self.event_titles),self.event_titles)
self.table.add(eventlist)
eventlist.show()

View File

@ -229,7 +229,7 @@ class FilterEditor:
self.frame = self.rule.get_widget('values')
self.rname = self.rule.get_widget('rule_name')
self.notebook = gtk.GtkNotebook()
self.notebook = gtk.Notebook()
self.notebook.set_show_tabs(0)
self.notebook.set_show_border(0)
self.notebook.show()
@ -247,13 +247,13 @@ class FilterEditor:
vallist = []
tlist = []
self.page.append((name,cname,vallist,tlist))
table = gtk.GtkTable(2,len(arglist))
table = gtk.Table(2,len(arglist))
table.show()
pos = 0
l2 = gtk.GtkLabel(name)
l2 = gtk.Label(name)
l2.set_alignment(0,0.5)
l2.show()
c = gtk.GtkListItem()
c = gtk.ListItem()
c.add(l2)
c.set_data('d',pos)
c.show()
@ -261,27 +261,27 @@ class FilterEditor:
map[name] = c
for v in arglist:
v1 = _(v)
l = gtk.GtkLabel(v1)
l = gtk.Label(v1)
l.set_alignment(1,0.5)
l.show()
if v == 'Place':
t = gtk.GtkCombo()
t = gtk.Combo()
AutoComp.AutoCombo(t,self.pmap.keys())
elif _name2list.has_key(v1):
t = gtk.GtkCombo()
t = gtk.Combo()
_name2list[v1].sort()
t.set_popdown_strings(_name2list[v1])
t.set_value_in_list(1,0)
t.entry.set_editable(0)
tlist.append(t.entry)
else:
t = gtk.GtkEntry()
t = gtk.Entry()
tlist.append(t)
t.show()
table.attach(l,0,1,pos,pos+1,gtk.gdk.FILL,0,5,5)
table.attach(t,1,2,pos,pos+1,gtk.gdk.EXPAND|gtk.gdk.FILL,0,5,5)
pos = pos + 1
self.notebook.append_page(table,gtk.GtkLabel(name))
self.notebook.append_page(table,gtk.Label(name))
self.name2page[name] = self.page_num
self.page_num = self.page_num + 1
self.page_num = 0

View File

@ -95,25 +95,25 @@ class GraphVizDialog(ReportDialog):
return [all,des,ans]
def add_user_options(self):
self.arrowstyle_optionmenu = gtk.GtkOptionMenu()
menu = gtk.GtkMenu()
self.arrowstyle_optionmenu = gtk.OptionMenu()
menu = gtk.Menu()
menuitem = gtk.GtkMenuItem(_("Descendants <- Ancestors"))
menuitem = gtk.MenuItem(_("Descendants <- Ancestors"))
menuitem.set_data('t', ('none', 'normal'))
menuitem.show()
menu.append(menuitem)
menuitem = gtk.GtkMenuItem(_("Descendants -> Ancestors"))
menuitem = gtk.MenuItem(_("Descendants -> Ancestors"))
menuitem.set_data('t', ('normal', 'none'))
menuitem.show()
menu.append(menuitem)
menuitem = gtk.GtkMenuItem(_("Descendants <-> Ancestors"))
menuitem = gtk.MenuItem(_("Descendants <-> Ancestors"))
menuitem.set_data('t', ('normal', 'normal'))
menuitem.show()
menu.append(menuitem)
menuitem = gtk.GtkMenuItem(_("Descendants - Ancestors"))
menuitem = gtk.MenuItem(_("Descendants - Ancestors"))
menuitem.set_data('t', ('none', 'none'))
menuitem.show()
menu.append(menuitem)
@ -128,7 +128,7 @@ class GraphVizDialog(ReportDialog):
_("Choose the direction that the arrows point."))
msg = _("Include Birth and Death Dates")
self.includedates_cb = gtk.GtkCheckButton(msg)
self.includedates_cb = gtk.CheckButton(msg)
self.includedates_cb.set_active(1)
self.add_frame_option(_("GraphViz Options"), '',
self.includedates_cb,
@ -136,7 +136,7 @@ class GraphVizDialog(ReportDialog):
"was born and/or died in the graph node "
"labels."))
self.includeurl_cb = gtk.GtkCheckButton(_("Include URLs"))
self.includeurl_cb = gtk.CheckButton(_("Include URLs"))
self.includeurl_cb.set_active(1)
self.add_frame_option(_("GraphViz Options"), '',
self.includeurl_cb,
@ -146,7 +146,7 @@ class GraphVizDialog(ReportDialog):
"to the files generated by the 'Generate "
"Web Site' report."))
self.colorize_cb = gtk.GtkCheckButton(_("Colorize Graph"))
self.colorize_cb = gtk.CheckButton(_("Colorize Graph"))
self.colorize_cb.set_active(1)
self.add_frame_option(_("GraphViz Options"),
'',
@ -156,7 +156,7 @@ class GraphVizDialog(ReportDialog):
"an individual is unknown it will be "
"outlined in black."))
self.adoptionsdashed_cb = gtk.GtkCheckButton(_("Indicate non-birth relationships with dashed lines"))
self.adoptionsdashed_cb = gtk.CheckButton(_("Indicate non-birth relationships with dashed lines"))
self.adoptionsdashed_cb.set_active(1)
self.add_frame_option(_("GraphViz Options"),
'',
@ -164,13 +164,13 @@ class GraphVizDialog(ReportDialog):
_("Non-birth relationships will show up "
"as dashed lines in the graph."))
tb_margin_adj = gtk.GtkAdjustment(value=0.5, lower=0.25,
tb_margin_adj = gtk.Adjustment(value=0.5, lower=0.25,
upper=100.0, step_incr=0.25)
lr_margin_adj = gtk.GtkAdjustment(value=0.5, lower=0.25,
lr_margin_adj = gtk.Adjustment(value=0.5, lower=0.25,
upper=100.0, step_incr=0.25)
self.tb_margin_sb = gtk.GtkSpinButton(adj=tb_margin_adj, digits=2)
self.lr_margin_sb = gtk.GtkSpinButton(adj=lr_margin_adj, digits=2)
self.tb_margin_sb = gtk.SpinButton(adj=tb_margin_adj, digits=2)
self.lr_margin_sb = gtk.SpinButton(adj=lr_margin_adj, digits=2)
self.add_frame_option(_("GraphViz Options"),
_("Top & Bottom Margins"),
@ -179,11 +179,11 @@ class GraphVizDialog(ReportDialog):
_("Left & Right Margins"),
self.lr_margin_sb)
hpages_adj = gtk.GtkAdjustment(value=1, lower=1, upper=25, step_incr=1)
vpages_adj = gtk.GtkAdjustment(value=1, lower=1, upper=25, step_incr=1)
hpages_adj = gtk.Adjustment(value=1, lower=1, upper=25, step_incr=1)
vpages_adj = gtk.Adjustment(value=1, lower=1, upper=25, step_incr=1)
self.hpages_sb = gtk.GtkSpinButton(adj=hpages_adj, digits=0)
self.vpages_sb = gtk.GtkSpinButton(adj=vpages_adj, digits=0)
self.hpages_sb = gtk.SpinButton(adj=hpages_adj, digits=0)
self.vpages_sb = gtk.SpinButton(adj=vpages_adj, digits=0)
self.add_frame_option(_("GraphViz Options"),
_("Number of Horizontal Pages"),

View File

@ -432,7 +432,7 @@ class IndivSummaryDialog(TextReportDialog):
TextReportDialog.__init__(self,database,person)
def add_user_options(self):
self.use_srcs = gtk.GtkCheckButton(_('Include Source Information'))
self.use_srcs = gtk.CheckButton(_('Include Source Information'))
self.use_srcs.show()
self.add_option('',self.use_srcs)

View File

@ -1655,7 +1655,7 @@ def readData(database,active_person,cb):
db = database
callback = cb
top = gtk.GtkFileSelection("%s - GRAMPS" % _("Import from GEDCOM"))
top = gtk.FileSelection("%s - GRAMPS" % _("Import from GEDCOM"))
top.hide_fileop_buttons()
top.ok_button.connect_object('clicked', on_ok_clicked,top)
top.cancel_button.connect_object('clicked', Utils.destroy_passed_object,top)

View File

@ -46,20 +46,20 @@ class ReadNative:
self.db = database
self.callback = cb
self.top = gtk.GtkFileSelection("%s - GRAMPS" % _("Import from GRAMPS"))
self.top = gtk.FileSelection("%s - GRAMPS" % _("Import from GRAMPS"))
self.top.hide_fileop_buttons()
self.top.ok_button.connect('clicked', self.on_ok_clicked)
self.top.cancel_button.connect_object('clicked', Utils.destroy_passed_object,self.top)
self.top.show()
def show_display(self):
self.window = gtk.GtkWindow(title=_("Import from GRAMPS"))
vbox = gtk.GtkVBox()
self.window = gtk.Window(title=_("Import from GRAMPS"))
vbox = gtk.VBox()
self.window.add(vbox)
label = gtk.GtkLabel(_("Import from GRAMPS"))
label = gtk.Label(_("Import from GRAMPS"))
vbox.add(label)
adj = gtk.GtkAdjustment(lower=0,upper=100)
self.progress_bar = gtk.GtkProgressBar(adj)
adj = gtk.Adjustment(lower=0,upper=100)
self.progress_bar = gtk.ProgressBar(adj)
vbox.add(self.progress_bar)
self.window.show_all()

View File

@ -346,9 +346,9 @@ class GedcomWriter:
gedmap = GedcomInfoDB()
target_obj = self.topDialog.get_widget("target")
myMenu = gtk.GtkMenu()
myMenu = gtk.Menu()
for name in gedmap.get_name_list():
menuitem = gtk.GtkMenuItem(name)
menuitem = gtk.MenuItem(name)
myMenu.append(menuitem)
data = gedmap.get_description(name)
menuitem.set_data("data",data)
@ -649,7 +649,7 @@ class GedcomWriter:
for f in person.getParentList():
mrel = string.lower(f[1])
frel = string.lower(f[2])
if mrel=="adopted" or mrel=="adopted":
if mrel=="adopted" or frel=="adopted":
fam = f[0]
break
if fam:
@ -675,7 +675,7 @@ class GedcomWriter:
for f in person.getParentList():
mrel = string.lower(f[1])
frel = string.lower(f[2])
if mrel=="adopted" or mrel=="adopted":
if mrel=="adopted" or frel=="adopted":
fam = f[0]
break
if fam:
@ -872,7 +872,7 @@ class GedcomWriter:
val = "FROM %s TO %s" % (make_date(start,mlist),
make_date(stop,mlist))
else:
val = make_date(start,_hmonth)
val = make_date(start,mlist)
self.g.write("%s %s %s\n" % (prefix,cal,val))
else:
mydate = Date.Date(date)

File diff suppressed because it is too large Load Diff