Converted gramps_main.py to a class, replace utils.py with Utils.py and
Config.py with GrampsCfg.py (for pychecker) svn: r789
This commit is contained in:
parent
8285071eee
commit
d9c223deed
@ -53,7 +53,7 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
import RelImage
|
||||
import RelLib
|
||||
|
||||
@ -82,7 +82,7 @@ class AddMediaObject:
|
||||
self.glade.signal_autoconnect({
|
||||
"on_savephoto_clicked" : self.on_savephoto_clicked,
|
||||
"on_name_changed" : self.on_name_changed,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
self.window.editable_enters(self.description)
|
||||
@ -102,7 +102,7 @@ class AddMediaObject:
|
||||
GnomeErrorDialog(msgstr % filename)
|
||||
return
|
||||
|
||||
type = utils.get_mime_type(filename)
|
||||
type = Utils.get_mime_type(filename)
|
||||
if description == "":
|
||||
description = os.path.basename(filename)
|
||||
|
||||
@ -119,9 +119,9 @@ class AddMediaObject:
|
||||
name = filename
|
||||
mobj.setPath(name)
|
||||
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
self.update()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_name_changed(self,obj):
|
||||
"""
|
||||
@ -139,9 +139,9 @@ class AddMediaObject:
|
||||
self.temp_name = root
|
||||
|
||||
if os.path.isfile(filename):
|
||||
type = utils.get_mime_type(filename)
|
||||
type = Utils.get_mime_type(filename)
|
||||
if type[0:5] == 'image':
|
||||
image = RelImage.scale_image(filename,const.thumbScale)
|
||||
self.image.load_imlib(image)
|
||||
else:
|
||||
self.image.load_file(utils.find_icon(type))
|
||||
self.image.load_file(Utils.find_icon(type))
|
||||
|
@ -52,8 +52,8 @@ import libglade
|
||||
import RelLib
|
||||
import const
|
||||
import sort
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
|
||||
class AddSpouse:
|
||||
"""
|
||||
@ -87,7 +87,7 @@ class AddSpouse:
|
||||
self.surname_combo = self.glade.get_widget("surname_combo")
|
||||
|
||||
self.rel_combo.set_popdown_strings(const.familyRelations)
|
||||
utils.attach_surnames(self.surname_combo)
|
||||
Utils.attach_surnames(self.surname_combo)
|
||||
|
||||
# Typing CR selects 'Add Existing' button
|
||||
self.top.editable_enters(self.given)
|
||||
@ -96,15 +96,15 @@ class AddSpouse:
|
||||
self.name_list = self.db.getPersonMap().values()
|
||||
self.name_list.sort(sort.by_last_name)
|
||||
|
||||
title = _("Choose Spouse/Partner of %s") % Config.nameof(person)
|
||||
title = _("Choose Spouse/Partner of %s") % GrampsCfg.nameof(person)
|
||||
self.glade.get_widget("spouseTitle").set_text(title)
|
||||
|
||||
self.glade.signal_autoconnect({
|
||||
"on_select_spouse_clicked" : self.select_spouse_clicked,
|
||||
"on_new_spouse_clicked" : self.new_spouse_clicked,
|
||||
"on_rel_type_changed" : self.relation_type_changed,
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
self.relation_type.set_text(_("Married"))
|
||||
@ -142,8 +142,8 @@ class AddSpouse:
|
||||
family.setFather(spouse)
|
||||
family.setMother(self.person)
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
utils.modified()
|
||||
Utils.destroy_passed_object(obj)
|
||||
Utils.modified()
|
||||
self.addperson(spouse)
|
||||
self.update(family)
|
||||
|
||||
@ -160,10 +160,10 @@ class AddSpouse:
|
||||
# don't do anything if the marriage already exists
|
||||
for f in self.person.getFamilyList():
|
||||
if spouse == f.getMother() or spouse == f.getFather():
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
return
|
||||
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
family = self.db.newFamily()
|
||||
self.person.addFamily(family)
|
||||
spouse.addFamily(family)
|
||||
@ -176,7 +176,7 @@ class AddSpouse:
|
||||
family.setMother(self.person)
|
||||
|
||||
family.setRelationship(const.save_frel(self.relation_type.get_text()))
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
self.update(family)
|
||||
|
||||
def relation_type_changed(self,obj):
|
||||
@ -204,7 +204,7 @@ class AddSpouse:
|
||||
if person.getGender() == gender:
|
||||
continue
|
||||
name = person.getPrimaryName().getName()
|
||||
self.spouse_list.append([name,utils.birthday(person)])
|
||||
self.spouse_list.append([name,Utils.birthday(person)])
|
||||
self.spouse_list.set_row_data(index,person)
|
||||
index = index + 1
|
||||
self.spouse_list.thaw()
|
||||
|
@ -35,7 +35,7 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
import Date
|
||||
import RelLib
|
||||
|
||||
@ -102,7 +102,7 @@ class AddressEditor:
|
||||
self.srcreflist = []
|
||||
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_addr_edit_ok_clicked" : self.ok_clicked,
|
||||
"on_source_clicked" : self.source_clicked
|
||||
})
|
||||
@ -133,7 +133,7 @@ class AddressEditor:
|
||||
|
||||
self.update(date,street,city,state,country,postal,note,priv)
|
||||
self.parent.redraw_addr_list()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def check(self,get,set,data):
|
||||
"""Compares a data item, updates if necessary, and sets the
|
||||
|
@ -35,7 +35,7 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
from RelLib import *
|
||||
import Sources
|
||||
|
||||
@ -97,9 +97,9 @@ class AttributeEditor:
|
||||
|
||||
self.window.set_data("o",self)
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_attr_edit_ok_clicked" : self.on_ok_clicked,
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"on_source_clicked" : self.on_source_clicked
|
||||
})
|
||||
|
||||
@ -125,7 +125,7 @@ class AttributeEditor:
|
||||
self.update(type,value,note,priv)
|
||||
|
||||
self.parent.redraw_attr_list()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def check(self,get,set,data):
|
||||
"""Compares a data item, updates if necessary, and sets the
|
||||
|
@ -34,7 +34,7 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -81,7 +81,7 @@ class Bookmarks :
|
||||
def add(self,person):
|
||||
"""appends the person to the bottom of the bookmarks"""
|
||||
if person not in self.bookmarks:
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
self.bookmarks.append(person)
|
||||
self.redraw()
|
||||
|
||||
|
@ -41,8 +41,8 @@ import libglade
|
||||
import RelLib
|
||||
import const
|
||||
import sort
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
|
||||
class ChooseParents:
|
||||
"""
|
||||
@ -98,11 +98,11 @@ class ChooseParents:
|
||||
"on_addmother_clicked" : self.add_mother_clicked,
|
||||
"on_addfather_clicked" : self.add_father_clicked,
|
||||
"on_prel_changed" : self.parent_relation_changed,
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
text = _("Choose the Parents of %s") % Config.nameof(self.person)
|
||||
text = _("Choose the Parents of %s") % GrampsCfg.nameof(self.person)
|
||||
self.title.set_text(text)
|
||||
if self.family:
|
||||
self.prel.set_text(_(self.family.getRelationship()))
|
||||
@ -114,8 +114,8 @@ class ChooseParents:
|
||||
|
||||
type = obj.get_text()
|
||||
|
||||
self.father_name.set_text(Config.nameof(self.father))
|
||||
self.mother_name.set_text(Config.nameof(self.mother))
|
||||
self.father_name.set_text(GrampsCfg.nameof(self.father))
|
||||
self.mother_name.set_text(GrampsCfg.nameof(self.mother))
|
||||
|
||||
self.father_list.freeze()
|
||||
self.mother_list.freeze()
|
||||
@ -137,7 +137,7 @@ class ChooseParents:
|
||||
continue
|
||||
if person.getGender() == RelLib.Person.unknown:
|
||||
continue
|
||||
rdata = [utils.phonebook_name(person),utils.birthday(person)]
|
||||
rdata = [Utils.phonebook_name(person),Utils.birthday(person)]
|
||||
if type == "Partners":
|
||||
self.father_list.append(rdata)
|
||||
self.father_list.set_row_data(father_index,person)
|
||||
@ -192,11 +192,11 @@ class ChooseParents:
|
||||
|
||||
def mother_list_select_row(self,obj,a,b,c):
|
||||
self.mother = obj.get_row_data(a)
|
||||
self.mother_name.set_text(Config.nameof(self.mother))
|
||||
self.mother_name.set_text(GrampsCfg.nameof(self.mother))
|
||||
|
||||
def father_list_select_row(self,obj,a,b,c):
|
||||
self.father = obj.get_row_data(a)
|
||||
self.father_name.set_text(Config.nameof(self.father))
|
||||
self.father_name.set_text(GrampsCfg.nameof(self.father))
|
||||
|
||||
def save_parents_clicked(self,obj):
|
||||
mother_rel = const.childRelations[self.mother_rel.get_text()]
|
||||
@ -228,7 +228,7 @@ class ChooseParents:
|
||||
else:
|
||||
self.family = None
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
if self.family:
|
||||
self.family.setRelationship(type)
|
||||
self.change_family_type(self.family,mother_rel,father_rel)
|
||||
@ -239,14 +239,14 @@ class ChooseParents:
|
||||
self.xml.get_widget(sex).set_active(1)
|
||||
self.xml.signal_autoconnect({
|
||||
"on_addfather_close": self.add_parent_close,
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
window = self.xml.get_widget("addperson")
|
||||
window.editable_enters(self.xml.get_widget("given"))
|
||||
window.editable_enters(self.xml.get_widget("surname"))
|
||||
utils.attach_surnames(self.xml.get_widget("surnameCombo"))
|
||||
Utils.attach_surnames(self.xml.get_widget("surnameCombo"))
|
||||
|
||||
def add_father_clicked(self,obj):
|
||||
self.add_parent_clicked(obj,"male")
|
||||
@ -300,7 +300,7 @@ class ChooseParents:
|
||||
self.person.setMainFamily(family)
|
||||
else:
|
||||
self.person.addAltFamily(family,mother_rel,father_rel)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
def add_parent_close(self,obj):
|
||||
|
||||
@ -317,8 +317,8 @@ class ChooseParents:
|
||||
else:
|
||||
person.setGender(RelLib.Person.female)
|
||||
self.mother = person
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
self.parent_relation_changed(self.prel)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
self.full_update()
|
||||
|
||||
|
@ -22,7 +22,6 @@ from TextDoc import *
|
||||
|
||||
import string
|
||||
import os
|
||||
import utils
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -43,8 +43,8 @@ from GDK import ACTION_COPY, BUTTON1_MASK, _2BUTTON_PRESS
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
import Date
|
||||
from RelLib import *
|
||||
import ImageSelect
|
||||
@ -225,19 +225,19 @@ class EditPerson:
|
||||
self.comp = AutoComp.AutoCombo(self.sncombo,const.surnames)
|
||||
|
||||
self.gid.set_text(person.getId())
|
||||
self.gid.set_editable(Config.id_edit)
|
||||
self.event_list.set_column_visibility(3,Config.show_detail)
|
||||
self.name_list.set_column_visibility(1,Config.show_detail)
|
||||
self.attr_list.set_column_visibility(2,Config.show_detail)
|
||||
self.addr_list.set_column_visibility(2,Config.show_detail)
|
||||
self.gid.set_editable(GrampsCfg.id_edit)
|
||||
self.event_list.set_column_visibility(3,GrampsCfg.show_detail)
|
||||
self.name_list.set_column_visibility(1,GrampsCfg.show_detail)
|
||||
self.attr_list.set_column_visibility(2,GrampsCfg.show_detail)
|
||||
self.addr_list.set_column_visibility(2,GrampsCfg.show_detail)
|
||||
|
||||
self.event_list = self.get_widget("eventList")
|
||||
|
||||
if Config.display_attr:
|
||||
self.get_widget("user_label").set_text(Config.attr_name)
|
||||
if GrampsCfg.display_attr:
|
||||
self.get_widget("user_label").set_text(GrampsCfg.attr_name)
|
||||
val = ""
|
||||
for attr in self.person.getAttributeList():
|
||||
if attr.getType() == const.save_pattr(Config.attr_name):
|
||||
if attr.getType() == const.save_pattr(GrampsCfg.attr_name):
|
||||
val = attr.getValue()
|
||||
break
|
||||
self.get_widget("user_data").set_text(val)
|
||||
@ -251,12 +251,12 @@ class EditPerson:
|
||||
self.lds_endowment = self.person.getLdsEndowment()
|
||||
self.lds_sealing = self.person.getLdsSeal()
|
||||
|
||||
if Config.uselds or self.lds_baptism or self.lds_endowment or self.lds_sealing:
|
||||
if GrampsCfg.uselds or self.lds_baptism or self.lds_endowment or self.lds_sealing:
|
||||
self.get_widget("lds_tab").show()
|
||||
self.get_widget("lds_page").show()
|
||||
|
||||
# initial values
|
||||
self.get_widget("activepersonTitle").set_text(Config.nameof(person))
|
||||
self.get_widget("activepersonTitle").set_text(GrampsCfg.nameof(person))
|
||||
self.suffix.set_text(self.pname.getSuffix())
|
||||
|
||||
self.surname_field.set_text(self.pname.getSurname())
|
||||
@ -381,12 +381,12 @@ class EditPerson:
|
||||
m = fam.getMother()
|
||||
if f and m:
|
||||
name = _("%(father)s and %(mother)s") % {
|
||||
'father' : Config.nameof(f),
|
||||
'mother' : Config.nameof(m) }
|
||||
'father' : GrampsCfg.nameof(f),
|
||||
'mother' : GrampsCfg.nameof(m) }
|
||||
elif f:
|
||||
name = Config.nameof(f)
|
||||
name = GrampsCfg.nameof(f)
|
||||
elif m:
|
||||
name = Config.nameof(m)
|
||||
name = GrampsCfg.nameof(m)
|
||||
else:
|
||||
name = _("unknown")
|
||||
item = gtk.GtkMenuItem(name)
|
||||
@ -556,11 +556,11 @@ class EditPerson:
|
||||
|
||||
def redraw_name_list(self):
|
||||
"""redraws the name list"""
|
||||
utils.redraw_list(self.nlist,self.name_list,disp_name)
|
||||
Utils.redraw_list(self.nlist,self.name_list,disp_name)
|
||||
|
||||
def redraw_url_list(self):
|
||||
"""redraws the url list, disabling the go button if no url is selected"""
|
||||
length = utils.redraw_list(self.ulist,self.web_list,disp_url)
|
||||
length = Utils.redraw_list(self.ulist,self.web_list,disp_url)
|
||||
if length > 0:
|
||||
self.web_go.set_sensitive(1)
|
||||
else:
|
||||
@ -570,11 +570,11 @@ class EditPerson:
|
||||
|
||||
def redraw_attr_list(self):
|
||||
"""Redraws the attribute list"""
|
||||
utils.redraw_list(self.alist,self.attr_list,disp_attr)
|
||||
Utils.redraw_list(self.alist,self.attr_list,disp_attr)
|
||||
|
||||
def redraw_addr_list(self):
|
||||
"""redraws the address list for the person"""
|
||||
utils.redraw_list(self.plist,self.addr_list,disp_addr)
|
||||
Utils.redraw_list(self.plist,self.addr_list,disp_addr)
|
||||
|
||||
def redraw_event_list(self):
|
||||
"""redraw_event_list - Update both the birth and death place combo
|
||||
@ -584,11 +584,11 @@ class EditPerson:
|
||||
combo list resets its present value, this code will have to save
|
||||
and restore the value for the event *not* being edited."""
|
||||
|
||||
utils.redraw_list(self.elist,self.event_list,disp_event)
|
||||
Utils.redraw_list(self.elist,self.event_list,disp_event)
|
||||
|
||||
# Remember old combo list input
|
||||
prev_btext = utils.strip_id(self.bplace.get_text())
|
||||
prev_dtext = utils.strip_id(self.dplace.get_text())
|
||||
prev_btext = Utils.strip_id(self.bplace.get_text())
|
||||
prev_dtext = Utils.strip_id(self.dplace.get_text())
|
||||
|
||||
# Update birth with new values, make sure death values don't change
|
||||
if (self.update_birth):
|
||||
@ -683,25 +683,25 @@ class EditPerson:
|
||||
|
||||
def on_aka_delete_clicked(self,obj):
|
||||
"""Deletes the selected name from the name list"""
|
||||
if utils.delete_selected(obj,self.nlist):
|
||||
if Utils.delete_selected(obj,self.nlist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_name_list()
|
||||
|
||||
def on_delete_url_clicked(self,obj):
|
||||
"""Deletes the selected URL from the URL list"""
|
||||
if utils.delete_selected(obj,self.ulist):
|
||||
if Utils.delete_selected(obj,self.ulist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_url_list()
|
||||
|
||||
def on_delete_attr_clicked(self,obj):
|
||||
"""Deletes the selected attribute from the attribute list"""
|
||||
if utils.delete_selected(obj,self.alist):
|
||||
if Utils.delete_selected(obj,self.alist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_attr_list()
|
||||
|
||||
def on_delete_addr_clicked(self,obj):
|
||||
"""Deletes the selected address from the address list"""
|
||||
if utils.delete_selected(obj,self.plist):
|
||||
if Utils.delete_selected(obj,self.plist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_addr_list()
|
||||
|
||||
@ -720,7 +720,7 @@ class EditPerson:
|
||||
q = _("Are you sure you want to abandon your changes?")
|
||||
GnomeQuestionDialog(q,self.cancel_callback)
|
||||
else:
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_delete_event(self,obj,b):
|
||||
"""If the data has changed, give the user a chance to cancel
|
||||
@ -730,13 +730,13 @@ class EditPerson:
|
||||
GnomeQuestionDialog(q,self.cancel_callback)
|
||||
return 1
|
||||
else:
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
return 0
|
||||
|
||||
def cancel_callback(self,a):
|
||||
"""If the user answered yes to abandoning changes, close the window"""
|
||||
if a==0:
|
||||
utils.destroy_passed_object(self.window)
|
||||
Utils.destroy_passed_object(self.window)
|
||||
|
||||
def did_data_change(self):
|
||||
"""Check to see if any of the data has changed from the original record"""
|
||||
@ -884,7 +884,7 @@ class EditPerson:
|
||||
|
||||
def on_event_delete_clicked(self,obj):
|
||||
"""Delete the selected event"""
|
||||
if utils.delete_selected(obj,self.elist):
|
||||
if Utils.delete_selected(obj,self.elist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_event_list()
|
||||
|
||||
@ -953,7 +953,7 @@ class EditPerson:
|
||||
self.event_name_field.set_label(const.display_pevent(event.getName()))
|
||||
self.event_cause_field.set_text(event.getCause())
|
||||
self.event_descr_field.set_text(event.getDescription())
|
||||
self.event_details_field.set_text(utils.get_detail_text(event))
|
||||
self.event_details_field.set_text(Utils.get_detail_text(event))
|
||||
|
||||
def on_addr_list_select_row(self,obj,row,b,c):
|
||||
|
||||
@ -967,7 +967,7 @@ class EditPerson:
|
||||
self.addr_state.set_text(a.getState())
|
||||
self.addr_country.set_text(a.getCountry())
|
||||
self.addr_postal.set_text(a.getPostal())
|
||||
self.addr_details_field.set_text(utils.get_detail_text(a))
|
||||
self.addr_details_field.set_text(Utils.get_detail_text(a))
|
||||
|
||||
def on_name_list_select_row(self,obj,row,b,c):
|
||||
|
||||
@ -976,7 +976,7 @@ class EditPerson:
|
||||
self.alt_given_field.set_text(name.getFirstName())
|
||||
self.alt_last_field.set_text(name.getSurname())
|
||||
self.alt_suffix_field.set_text(name.getSuffix())
|
||||
self.name_details_field.set_text(utils.get_detail_text(name))
|
||||
self.name_details_field.set_text(Utils.get_detail_text(name))
|
||||
|
||||
def on_web_list_select_row(self,obj,row,b,c):
|
||||
|
||||
@ -996,7 +996,7 @@ class EditPerson:
|
||||
attr = obj.get_row_data(row)
|
||||
self.attr_type.set_label(const.display_pattr(attr.getType()))
|
||||
self.attr_value.set_text(attr.getValue())
|
||||
self.attr_details_field.set_text(utils.get_detail_text(attr))
|
||||
self.attr_details_field.set_text(Utils.get_detail_text(attr))
|
||||
|
||||
def aka_double_click(self,obj,event):
|
||||
if event.button == 1 and event.type == _2BUTTON_PRESS:
|
||||
@ -1032,7 +1032,7 @@ class EditPerson:
|
||||
self.person.setUrlList(self.ulist)
|
||||
self.person.setAttributeList(self.alist)
|
||||
self.person.setAddressList(self.plist)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
def on_apply_person_clicked(self,obj):
|
||||
|
||||
@ -1052,9 +1052,9 @@ class EditPerson:
|
||||
del m[self.person.getId()]
|
||||
m[idval] = self.person
|
||||
self.person.setId(idval)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
else:
|
||||
n = Config.nameof(m[idval])
|
||||
n = GrampsCfg.nameof(m[idval])
|
||||
msg1 = _("GRAMPS ID value was not changed.")
|
||||
msg2 = _("%(grampsid)s is already used by %(person)s") % {
|
||||
'grampsid' : idval,
|
||||
@ -1078,11 +1078,11 @@ class EditPerson:
|
||||
|
||||
if not name.are_equal(self.person.getPrimaryName()):
|
||||
self.person.setPrimaryName(name)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if nick != self.person.getNickName():
|
||||
self.person.setNickName(nick)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
self.pmap = {}
|
||||
for p in self.db.getPlaces():
|
||||
@ -1124,7 +1124,7 @@ class EditPerson:
|
||||
else:
|
||||
temp_family.setMother(None)
|
||||
temp_family.setFather(self.person)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
elif female and self.person.getGender() != Person.female:
|
||||
self.person.setGender(Person.female)
|
||||
for temp_family in self.person.getFamilyList():
|
||||
@ -1134,7 +1134,7 @@ class EditPerson:
|
||||
else:
|
||||
temp_family.setFather(None)
|
||||
temp_family.setMother(self.person)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
elif unknown and self.person.getGender() != Person.unknown:
|
||||
self.person.setGender(Person.unknown)
|
||||
for temp_family in self.person.getFamilyList():
|
||||
@ -1150,7 +1150,7 @@ class EditPerson:
|
||||
else:
|
||||
temp_family.setMother(None)
|
||||
temp_family.setFather(self.person)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if error == 1:
|
||||
msg = _("Changing the gender caused problems with marriage information.")
|
||||
@ -1160,7 +1160,7 @@ class EditPerson:
|
||||
text = self.notes_field.get_chars(0,-1)
|
||||
if text != self.person.getNote():
|
||||
self.person.setNote(text)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if self.lds_not_loaded == 0:
|
||||
date = self.ldsbap_date.get_text()
|
||||
@ -1200,30 +1200,30 @@ class EditPerson:
|
||||
ord.setFamily(self.ldsfam)
|
||||
ord.setPlace(place)
|
||||
self.person.setLdsSeal(ord)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
else:
|
||||
d = Date()
|
||||
d.set(date)
|
||||
if compare_dates(d,ord.getDateObj()) != 0:
|
||||
ord.setDateObj(d)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if ord.getPlace() != place:
|
||||
ord.setPlace(place)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if ord.getTemple() != temple:
|
||||
ord.setTemple(temple)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if ord.getStatus() != self.seal_stat:
|
||||
ord.setStatus(self.seal_stat)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if ord.getFamily() != self.ldsfam:
|
||||
ord.setFamily(self.ldsfam)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
self.update_lists()
|
||||
if self.callback:
|
||||
self.callback(self,self.add_places)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def get_place(self,field,makenew=0):
|
||||
text = string.strip(field.get_text())
|
||||
@ -1236,7 +1236,7 @@ class EditPerson:
|
||||
self.pmap[text] = place
|
||||
self.db.addPlace(place)
|
||||
self.add_places.append(place)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
return place
|
||||
else:
|
||||
return None
|
||||
@ -1330,22 +1330,22 @@ def update_ord(func,ord,date,temple,stat,place):
|
||||
ord.setTemple(temple)
|
||||
ord.setPlace(place)
|
||||
func(ord)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
else:
|
||||
d = Date()
|
||||
d.set(date)
|
||||
if compare_dates(d,ord.getDateObj()) != 0:
|
||||
ord.setDateObj(d)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
elif ord.getTemple() != temple:
|
||||
ord.setTemple(temple)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
elif ord.getPlace() != place:
|
||||
ord.setPlace(place)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
elif ord.getStatus() != stat:
|
||||
ord.setStatus(stat)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -1353,7 +1353,7 @@ def update_ord(func,ord,date,temple,stat,place):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def disp_name(name):
|
||||
return [name.getName(),utils.get_detail_flags(name)]
|
||||
return [name.getName(),Utils.get_detail_flags(name)]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -1369,7 +1369,7 @@ def disp_url(url):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def disp_attr(attr):
|
||||
detail = utils.get_detail_flags(attr)
|
||||
detail = Utils.get_detail_flags(attr)
|
||||
return [const.display_pattr(attr.getType()),attr.getValue(),detail]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -1379,7 +1379,7 @@ def disp_attr(attr):
|
||||
#-------------------------------------------------------------------------
|
||||
def disp_addr(addr):
|
||||
location = "%s %s %s" % (addr.getCity(),addr.getState(),addr.getCountry())
|
||||
return [addr.getDate(),location,utils.get_detail_flags(addr)]
|
||||
return [addr.getDate(),location,Utils.get_detail_flags(addr)]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -1387,7 +1387,7 @@ def disp_addr(addr):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def disp_event(event):
|
||||
attr = utils.get_detail_flags(event)
|
||||
attr = Utils.get_detail_flags(event)
|
||||
return [const.display_pevent(event.getName()),
|
||||
event.getQuoteDate(),event.getPlaceName(),attr]
|
||||
|
||||
|
@ -35,8 +35,8 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
from RelLib import *
|
||||
import Sources
|
||||
import ImageSelect
|
||||
@ -111,7 +111,7 @@ class EditPlace:
|
||||
self.note.set_word_wrap(1)
|
||||
|
||||
self.top_window.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_source_clicked" : self.on_source_clicked,
|
||||
"on_photolist_select_icon" : self.gallery.on_photo_select_icon,
|
||||
"on_photolist_button_press_event" : self.gallery.on_button_press_event,
|
||||
@ -179,10 +179,10 @@ class EditPlace:
|
||||
self.place.setUrlList(self.ulist)
|
||||
self.place.set_alternate_locations(self.llist)
|
||||
if self.lists_changed:
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
def redraw_url_list(self):
|
||||
length = utils.redraw_list(self.ulist,self.web_list,disp_url)
|
||||
length = Utils.redraw_list(self.ulist,self.web_list,disp_url)
|
||||
if length > 0:
|
||||
self.web_go.set_sensitive(1)
|
||||
else:
|
||||
@ -191,7 +191,7 @@ class EditPlace:
|
||||
self.web_description.set_text("")
|
||||
|
||||
def redraw_location_list(self):
|
||||
utils.redraw_list(self.llist,self.loc_list,disp_loc)
|
||||
Utils.redraw_list(self.llist,self.loc_list,disp_loc)
|
||||
|
||||
|
||||
def on_web_go_clicked(self,obj):
|
||||
@ -216,47 +216,47 @@ class EditPlace:
|
||||
mloc = self.place.get_main_location()
|
||||
if city != mloc.get_city():
|
||||
mloc.set_city(city)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if parish != mloc.get_parish():
|
||||
mloc.set_parish(parish)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if self.lists_changed:
|
||||
self.place.setSourceRefList(self.srcreflist)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if state != mloc.get_state():
|
||||
mloc.set_state(state)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if county != mloc.get_county():
|
||||
mloc.set_county(county)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if country != mloc.get_country():
|
||||
mloc.set_country(country)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if title != self.place.get_title():
|
||||
self.place.set_title(title)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if longitude != self.place.get_longitude():
|
||||
self.place.set_longitude(longitude)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if latitude != self.place.get_latitude():
|
||||
self.place.set_latitude(latitude)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if note != self.place.getNote():
|
||||
self.place.setNote(note)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
self.update_lists()
|
||||
|
||||
utils.destroy_passed_object(self.top)
|
||||
Utils.destroy_passed_object(self.top)
|
||||
if self.callback:
|
||||
self.callback(self.place)
|
||||
|
||||
@ -285,12 +285,12 @@ class EditPlace:
|
||||
LocEdit.LocationEditor(self,obj.get_row_data(row))
|
||||
|
||||
def on_delete_url_clicked(self,obj):
|
||||
if utils.delete_selected(obj,self.ulist):
|
||||
if Utils.delete_selected(obj,self.ulist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_url_list()
|
||||
|
||||
def on_delete_loc_clicked(self,obj):
|
||||
if utils.delete_selected(obj,self.llist):
|
||||
if Utils.delete_selected(obj,self.llist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_location_list()
|
||||
|
||||
@ -351,7 +351,7 @@ class EditPlace:
|
||||
t = _("%s [%s]: event %s\n")
|
||||
|
||||
for e in pevent:
|
||||
msg = t % (Config.nameof(e[0]),e[0].getId(),e[1].getName())
|
||||
msg = t % (GrampsCfg.nameof(e[0]),e[0].getId(),e[1].getName())
|
||||
self.refinfo.insert_defaults(msg)
|
||||
|
||||
if len(fevent) > 0:
|
||||
@ -363,11 +363,11 @@ class EditPlace:
|
||||
father = e[0].getFather()
|
||||
mother = e[0].getMother()
|
||||
if father and mother:
|
||||
fname = "%s and %s" % (Config.nameof(father),Config.nameof(mother))
|
||||
fname = "%s and %s" % (GrampsCfg.nameof(father),GrampsCfg.nameof(mother))
|
||||
elif father:
|
||||
fname = "%s" % Config.nameof(father)
|
||||
fname = "%s" % GrampsCfg.nameof(father)
|
||||
else:
|
||||
fname = "%s" % Config.nameof(mother)
|
||||
fname = "%s" % GrampsCfg.nameof(mother)
|
||||
|
||||
msg = t % (fname,e[0].getId(),e[1].getName())
|
||||
self.refinfo.insert_defaults(msg)
|
||||
@ -412,7 +412,7 @@ class DeletePlaceQuery:
|
||||
if ans == 1:
|
||||
return
|
||||
del self.db.getPlaceMap()[self.place.getId()]
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
for p in self.db.getPersonMap().values():
|
||||
for event in [p.getBirth(), p.getDeath()] + p.getEventList():
|
||||
|
@ -32,8 +32,8 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
from RelLib import *
|
||||
import ImageSelect
|
||||
|
||||
@ -74,7 +74,7 @@ class EditSource:
|
||||
self.note.set_word_wrap(1)
|
||||
|
||||
self.top_window.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_photolist_select_icon" : self.gallery.on_photo_select_icon,
|
||||
"on_photolist_button_press_event" : self.gallery.on_button_press_event,
|
||||
"on_switch_page" : self.on_switch_page,
|
||||
@ -109,7 +109,7 @@ class EditSource:
|
||||
if sref.getBase() == self.source:
|
||||
p_list.append(name)
|
||||
for p in self.db.getPersonMap().values():
|
||||
name = Config.nameof(p)
|
||||
name = GrampsCfg.nameof(p)
|
||||
for v in p.getEventList() + [p.getBirth(), p.getDeath()]:
|
||||
for sref in v.getSourceRefList():
|
||||
if sref.getBase() == self.source:
|
||||
@ -136,12 +136,12 @@ class EditSource:
|
||||
m = p.getMother()
|
||||
if f and m:
|
||||
name = _("%(father)s and %(mother)s") % {
|
||||
"father" : Config.nameof(f),
|
||||
"mother" : Config.nameof(m)}
|
||||
"father" : GrampsCfg.nameof(f),
|
||||
"mother" : GrampsCfg.nameof(m)}
|
||||
elif f:
|
||||
name = Config.nameof(f)
|
||||
name = GrampsCfg.nameof(f)
|
||||
else:
|
||||
name = Config.nameof(m)
|
||||
name = GrampsCfg.nameof(m)
|
||||
for v in p.getEventList():
|
||||
for sref in v.getSourceRefList():
|
||||
if sref.getBase() == self.source:
|
||||
@ -197,21 +197,21 @@ class EditSource:
|
||||
|
||||
if author != self.source.getAuthor():
|
||||
self.source.setAuthor(author)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if title != self.source.getTitle():
|
||||
self.source.setTitle(title)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if pubinfo != self.source.getPubInfo():
|
||||
self.source.setPubInfo(pubinfo)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if note != self.source.getNote():
|
||||
self.source.setNote(note)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
utils.destroy_passed_object(self.top)
|
||||
Utils.destroy_passed_object(self.top)
|
||||
if self.callback:
|
||||
self.callback(self.source)
|
||||
|
||||
@ -245,7 +245,7 @@ class DelSrcQuery:
|
||||
if ans == 1:
|
||||
return
|
||||
del self.db.getSourceMap()[self.source.getId()]
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
for p in self.db.getPersonMap().values():
|
||||
for v in p.getEventList() + [p.getBirth(), p.getDeath()]:
|
||||
|
@ -35,8 +35,8 @@ import gtk
|
||||
#-------------------------------------------------------------------------
|
||||
import Sources
|
||||
import const
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
import AutoComp
|
||||
|
||||
from Date import compare_dates
|
||||
@ -82,7 +82,7 @@ class EventEditor:
|
||||
self.priv = self.top.get_widget("priv")
|
||||
self.calendar = self.top.get_widget("calendar")
|
||||
|
||||
if Config.calendar:
|
||||
if GrampsCfg.calendar:
|
||||
self.calendar.show()
|
||||
else:
|
||||
self.calendar.hide()
|
||||
@ -126,7 +126,7 @@ class EventEditor:
|
||||
|
||||
self.window.set_data("o",self)
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_event_edit_ok_clicked" : self.on_event_edit_ok_clicked,
|
||||
"on_source_clicked" : self.on_edit_source_clicked
|
||||
})
|
||||
@ -160,7 +160,7 @@ class EventEditor:
|
||||
self.pmap[text] = place
|
||||
self.parent.db.addPlace(place)
|
||||
self.plist.append(place)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
return place
|
||||
else:
|
||||
return None
|
||||
@ -188,7 +188,7 @@ class EventEditor:
|
||||
self.update_event(ename,self.date,eplace_obj,edesc,enote,epriv,ecause)
|
||||
self.parent.redraw_event_list()
|
||||
self.callback(None,self.plist)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def update_event(self,name,date,place,desc,note,priv,cause):
|
||||
if self.event.getPlace() != place:
|
||||
|
@ -24,9 +24,9 @@
|
||||
__author__ = 'Don Allingham'
|
||||
|
||||
import libglade
|
||||
import Config
|
||||
import GrampsCfg
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
import string
|
||||
import gtk
|
||||
import AutoComp
|
||||
@ -45,7 +45,7 @@ class Find:
|
||||
self.task = task
|
||||
self.xml = libglade.GladeXML(const.findFile,"find")
|
||||
self.xml.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_next_clicked" : self.on_next_clicked,
|
||||
"on_prev_clicked" : self.on_prev_clicked,
|
||||
})
|
||||
@ -57,7 +57,7 @@ class Find:
|
||||
for n in plist:
|
||||
self.nlist.append(n.getPrimaryName().getName())
|
||||
|
||||
if Config.autocomp:
|
||||
if GrampsCfg.autocomp:
|
||||
self.comp = AutoComp.AutoEntry(self.entry,self.nlist)
|
||||
|
||||
self.next = self.xml.get_widget("next")
|
||||
|
@ -50,7 +50,7 @@ from RelLib import *
|
||||
from Date import *
|
||||
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
import ListColors
|
||||
|
||||
from intl import gettext
|
||||
@ -86,8 +86,8 @@ _date_entry_list = [
|
||||
]
|
||||
|
||||
_name_format_list = [
|
||||
(_("Firstname Surname"), utils.normal_name),
|
||||
(_("Surname, Firstname"), utils.phonebook_name),
|
||||
(_("Firstname Surname"), Utils.normal_name),
|
||||
(_("Surname, Firstname"), Utils.phonebook_name),
|
||||
]
|
||||
|
||||
panellist = [
|
||||
@ -131,7 +131,7 @@ uncompress = 0
|
||||
show_detail = 0
|
||||
hide_altnames = 0
|
||||
lastfile = None
|
||||
nameof = utils.normal_name
|
||||
nameof = Utils.normal_name
|
||||
display_attr = 0
|
||||
attr_name = ""
|
||||
status_bar = 0
|
||||
@ -377,9 +377,9 @@ def loadConfig(call):
|
||||
|
||||
if _name_format == None or _name_format == 0:
|
||||
_name_format = 0
|
||||
nameof = utils.normal_name
|
||||
nameof = Utils.normal_name
|
||||
else:
|
||||
nameof = utils.phonebook_name
|
||||
nameof = Utils.phonebook_name
|
||||
|
||||
make_path(os.path.expanduser("~/.gramps"))
|
||||
make_path(os.path.expanduser("~/.gramps/filters"))
|
||||
@ -870,11 +870,11 @@ class GrampsPreferences:
|
||||
gnome.help.display('gramps-manual','prefs.html')
|
||||
|
||||
def on_close_clicked(self,obj):
|
||||
utils.destroy_passed_object(self.window)
|
||||
Utils.destroy_passed_object(self.window)
|
||||
|
||||
def on_ok_clicked(self,obj):
|
||||
self.on_propertybox_apply(obj)
|
||||
utils.destroy_passed_object(self.window)
|
||||
Utils.destroy_passed_object(self.window)
|
||||
|
||||
def on_propertybox_apply(self,obj):
|
||||
global nameof
|
||||
@ -1006,9 +1006,9 @@ class GrampsPreferences:
|
||||
set_int("/gramps/config/autoSaveInterval",autosave_int)
|
||||
|
||||
if autosave_int != 0:
|
||||
utils.enable_autosave(None,autosave_int)
|
||||
Utils.enable_autosave(None,autosave_int)
|
||||
else:
|
||||
utils.disable_autosave()
|
||||
Utils.disable_autosave()
|
||||
|
||||
set_bool("/gramps/config/DisplayAltNames",hide_altnames)
|
||||
set_string("/gramps/config/ReportDirectory",report_dir)
|
@ -22,7 +22,7 @@ from RelLib import *
|
||||
from Date import SingleDate
|
||||
|
||||
import string
|
||||
import utils
|
||||
import Utils
|
||||
import xml.parsers.expat
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -405,7 +405,7 @@ class GrampsParser:
|
||||
a.setType(key)
|
||||
a.setValue(u2l(attrs[key]))
|
||||
self.photo.addAttribute(a)
|
||||
self.photo.setMimeType(utils.get_mime_type(self.photo.getPath()))
|
||||
self.photo.setMimeType(Utils.get_mime_type(self.photo.getPath()))
|
||||
self.db.addObject(self.photo)
|
||||
if self.family:
|
||||
self.family.addPhoto(self.pref)
|
||||
|
@ -44,8 +44,8 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
import Plugins
|
||||
from RelLib import *
|
||||
import RelImage
|
||||
@ -103,7 +103,7 @@ class ImageSelect:
|
||||
self.glade.signal_autoconnect({
|
||||
"on_savephoto_clicked" : self.on_savephoto_clicked,
|
||||
"on_name_changed" : self.on_name_changed,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
window.editable_enters(self.description)
|
||||
@ -127,12 +127,12 @@ class ImageSelect:
|
||||
self.temp_name = root
|
||||
|
||||
if os.path.isfile(filename):
|
||||
type = utils.get_mime_type(filename)
|
||||
type = Utils.get_mime_type(filename)
|
||||
if type[0:5] == "image":
|
||||
image = RelImage.scale_image(filename,const.thumbScale)
|
||||
self.image.load_imlib(image)
|
||||
else:
|
||||
self.image.load_file(utils.find_icon(type))
|
||||
self.image.load_file(Utils.find_icon(type))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -159,7 +159,7 @@ class ImageSelect:
|
||||
self.dataobj.addPhoto(oref)
|
||||
self.add_thumbnail(oref)
|
||||
else:
|
||||
type = utils.get_mime_type(filename)
|
||||
type = Utils.get_mime_type(filename)
|
||||
mobj = Photo()
|
||||
if description == "":
|
||||
description = os.path.basename(filename)
|
||||
@ -179,8 +179,8 @@ class ImageSelect:
|
||||
mobj.setLocal(1)
|
||||
mobj.setPath(name)
|
||||
|
||||
utils.modified()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.modified()
|
||||
Utils.destroy_passed_object(obj)
|
||||
self.load_images()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -249,7 +249,7 @@ class Gallery(ImageSelect):
|
||||
#-------------------------------------------------------------------------
|
||||
def add_thumbnail(self, photo):
|
||||
object = photo.getReference()
|
||||
name = utils.thumb_path(self.db.getSavePath(),object)
|
||||
name = Utils.thumb_path(self.db.getSavePath(),object)
|
||||
try:
|
||||
thumb = GdkImlib.Image(name)
|
||||
except IOError,msg:
|
||||
@ -292,7 +292,7 @@ class Gallery(ImageSelect):
|
||||
protocol,site,file, j,k,l = urlparse.urlparse(d)
|
||||
if protocol == "file":
|
||||
name = file
|
||||
mime = utils.get_mime_type(name)
|
||||
mime = Utils.get_mime_type(name)
|
||||
photo = Photo()
|
||||
photo.setPath(name)
|
||||
photo.setMimeType(mime)
|
||||
@ -300,12 +300,12 @@ class Gallery(ImageSelect):
|
||||
(root,ext) = os.path.splitext(basename)
|
||||
photo.setDescription(root)
|
||||
self.savephoto(photo)
|
||||
if Config.mediaref == 0:
|
||||
if GrampsCfg.mediaref == 0:
|
||||
name = RelImage.import_media_object(name,self.path,photo.getId())
|
||||
photo.setPath(name)
|
||||
photo.setLocal(1)
|
||||
utils.modified()
|
||||
if Config.globalprop:
|
||||
Utils.modified()
|
||||
if GrampsCfg.globalprop:
|
||||
GlobalMediaProperties(self.db,photo,None)
|
||||
elif protocol != "":
|
||||
import urllib
|
||||
@ -317,7 +317,7 @@ class Gallery(ImageSelect):
|
||||
|
||||
gnome.ui.GnomeErrorDialog("%s\n%s %d" % (t,msg[0],msg[1]))
|
||||
return
|
||||
mime = utils.get_mime_type(tfile)
|
||||
mime = Utils.get_mime_type(tfile)
|
||||
photo = Photo()
|
||||
photo.setMimeType(mime)
|
||||
photo.setDescription(d)
|
||||
@ -337,8 +337,8 @@ class Gallery(ImageSelect):
|
||||
w.drag_finish(context, 1, 0, time)
|
||||
return
|
||||
self.add_thumbnail(oref)
|
||||
utils.modified()
|
||||
if Config.globalprop:
|
||||
Utils.modified()
|
||||
if GrampsCfg.globalprop:
|
||||
GlobalMediaProperties(self.db,photo,None)
|
||||
else:
|
||||
if self.db.getObjectMap().has_key(data.data):
|
||||
@ -359,7 +359,7 @@ class Gallery(ImageSelect):
|
||||
del nl[index]
|
||||
nl = nl[0:icon_index] + [item] + nl[icon_index:]
|
||||
self.dataobj.setPhotoList(nl)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
self.load_images()
|
||||
return
|
||||
index = index + 1
|
||||
@ -367,9 +367,9 @@ class Gallery(ImageSelect):
|
||||
oref.setReference(self.db.findObjectNoMap(data.data))
|
||||
self.dataobj.addPhoto(oref)
|
||||
self.add_thumbnail(oref)
|
||||
if Config.globalprop:
|
||||
if GrampsCfg.globalprop:
|
||||
LocalMediaProperties(oref,self.path)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
w.drag_finish(context, 1, 0, time)
|
||||
else:
|
||||
w.drag_finish(context, 0, 0, time)
|
||||
@ -426,15 +426,15 @@ class Gallery(ImageSelect):
|
||||
item = gtk.GtkTearoffMenuItem()
|
||||
item.show()
|
||||
menu.append(item)
|
||||
utils.add_menuitem(menu,_("View in the default viewer"),None,self.popup_view_photo)
|
||||
Utils.add_menuitem(menu,_("View in the default viewer"),None,self.popup_view_photo)
|
||||
object = photo.getReference()
|
||||
if object.getMimeType()[0:5] == "image":
|
||||
utils.add_menuitem(menu,_("Edit with the GIMP"),\
|
||||
Utils.add_menuitem(menu,_("Edit with the GIMP"),\
|
||||
None,self.popup_edit_photo)
|
||||
utils.add_menuitem(menu,_("Edit Object Properties"),None,
|
||||
Utils.add_menuitem(menu,_("Edit Object Properties"),None,
|
||||
self.popup_change_description)
|
||||
if object.getLocal() == 0:
|
||||
utils.add_menuitem(menu,_("Convert to local copy"),None,
|
||||
Utils.add_menuitem(menu,_("Convert to local copy"),None,
|
||||
self.popup_convert_to_private)
|
||||
menu.popup(None,None,None,0,0)
|
||||
|
||||
@ -445,7 +445,7 @@ class Gallery(ImageSelect):
|
||||
#-------------------------------------------------------------------------
|
||||
def popup_view_photo(self, obj):
|
||||
photo = self.dataobj.getPhotoList()[self.selectedIcon]
|
||||
utils.view_photo(photo.getReference())
|
||||
Utils.view_photo(photo.getReference())
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -505,7 +505,7 @@ class LocalMediaProperties:
|
||||
|
||||
descr_window.set_text(self.object.getDescription())
|
||||
mtype = self.object.getMimeType()
|
||||
pixmap.load_file(utils.thumb_path(path,self.object))
|
||||
pixmap.load_file(Utils.thumb_path(path,self.object))
|
||||
|
||||
self.change_dialog.get_widget("private").set_active(photo.getPrivacy())
|
||||
self.change_dialog.get_widget("gid").set_text(self.object.getId())
|
||||
@ -514,10 +514,10 @@ class LocalMediaProperties:
|
||||
self.change_dialog.get_widget("path").set_text("<local>")
|
||||
else:
|
||||
self.change_dialog.get_widget("path").set_text(fname)
|
||||
self.change_dialog.get_widget("type").set_text(utils.get_mime_description(mtype))
|
||||
self.change_dialog.get_widget("type").set_text(Utils.get_mime_description(mtype))
|
||||
self.change_dialog.get_widget("notes").insert_defaults(photo.getNote())
|
||||
self.change_dialog.signal_autoconnect({
|
||||
"on_cancel_clicked" : utils.destroy_passed_object,
|
||||
"on_cancel_clicked" : Utils.destroy_passed_object,
|
||||
"on_up_clicked" : self.on_up_clicked,
|
||||
"on_down_clicked" : self.on_down_clicked,
|
||||
"on_ok_clicked" : self.on_ok_clicked,
|
||||
@ -544,7 +544,7 @@ class LocalMediaProperties:
|
||||
obj.select_row(row+1,0)
|
||||
|
||||
def redraw_attr_list(self):
|
||||
utils.redraw_list(self.alist,self.attr_list,disp_attr)
|
||||
Utils.redraw_list(self.alist,self.attr_list,disp_attr)
|
||||
|
||||
def on_apply_clicked(self, obj):
|
||||
priv = self.change_dialog.get_widget("private").get_active()
|
||||
@ -553,21 +553,21 @@ class LocalMediaProperties:
|
||||
if text != note or priv != self.photo.getPrivacy():
|
||||
self.photo.setNote(text)
|
||||
self.photo.setPrivacy(priv)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if self.lists_changed:
|
||||
self.photo.setAttributeList(self.alist)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
def on_ok_clicked(self, obj):
|
||||
self.on_apply_clicked(obj)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_attr_list_select_row(self,obj,row,b,c):
|
||||
attr = obj.get_row_data(row)
|
||||
|
||||
self.attr_type.set_label(attr.getType())
|
||||
self.attr_value.set_text(attr.getValue())
|
||||
self.attr_details.set_text(utils.get_detail_text(attr))
|
||||
self.attr_details.set_text(Utils.get_detail_text(attr))
|
||||
|
||||
def on_update_attr_clicked(self,obj):
|
||||
import AttrEdit
|
||||
@ -578,7 +578,7 @@ class LocalMediaProperties:
|
||||
Plugins.get_image_attributes())
|
||||
|
||||
def on_delete_attr_clicked(self,obj):
|
||||
if utils.delete_selected(obj,self.alist):
|
||||
if Utils.delete_selected(obj,self.alist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_attr_list()
|
||||
|
||||
@ -614,17 +614,17 @@ class GlobalMediaProperties:
|
||||
|
||||
self.descr_window.set_text(self.object.getDescription())
|
||||
mtype = self.object.getMimeType()
|
||||
pixmap.load_file(utils.thumb_path(self.path,self.object))
|
||||
pixmap.load_file(Utils.thumb_path(self.path,self.object))
|
||||
|
||||
self.change_dialog.get_widget("gid").set_text(self.object.getId())
|
||||
self.makelocal = self.change_dialog.get_widget("makelocal")
|
||||
|
||||
self.update_info()
|
||||
|
||||
self.change_dialog.get_widget("type").set_text(utils.get_mime_description(mtype))
|
||||
self.change_dialog.get_widget("type").set_text(Utils.get_mime_description(mtype))
|
||||
self.notes.insert_defaults(object.getNote())
|
||||
self.change_dialog.signal_autoconnect({
|
||||
"on_cancel_clicked" : utils.destroy_passed_object,
|
||||
"on_cancel_clicked" : Utils.destroy_passed_object,
|
||||
"on_up_clicked" : self.on_up_clicked,
|
||||
"on_down_clicked" : self.on_down_clicked,
|
||||
"on_ok_clicked" : self.on_ok_clicked,
|
||||
@ -672,7 +672,7 @@ class GlobalMediaProperties:
|
||||
self.update()
|
||||
|
||||
def redraw_attr_list(self):
|
||||
utils.redraw_list(self.alist,self.attr_list,disp_attr)
|
||||
Utils.redraw_list(self.alist,self.attr_list,disp_attr)
|
||||
|
||||
def button_press(self,obj,event):
|
||||
if len(obj.selection) <= 0:
|
||||
@ -692,13 +692,13 @@ class GlobalMediaProperties:
|
||||
for p in self.db.getPersonMap().values():
|
||||
for o in p.getPhotoList():
|
||||
if o.getReference() == self.object:
|
||||
ref.append([_("Person"),p.getId(),Config.nameof(p)])
|
||||
ref.append([_("Person"),p.getId(),GrampsCfg.nameof(p)])
|
||||
ref.set_row_data(index,(EditPerson.EditPerson,p,self.db))
|
||||
index = index + 1
|
||||
for p in self.db.getFamilyMap().values():
|
||||
for o in p.getPhotoList():
|
||||
if o.getReference() == self.object:
|
||||
ref.append([_("Family"),p.getId(),utils.family_name(p)])
|
||||
ref.append([_("Family"),p.getId(),Utils.family_name(p)])
|
||||
ref.set_row_data(index,(Marriage.Marriage,p,self.db))
|
||||
index = index + 1
|
||||
for p in self.db.getSourceMap().values():
|
||||
@ -725,23 +725,23 @@ class GlobalMediaProperties:
|
||||
if text != note or desc != self.object.getDescription():
|
||||
self.object.setNote(text)
|
||||
self.object.setDescription(desc)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if self.lists_changed:
|
||||
self.object.setAttributeList(self.alist)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if self.update != None:
|
||||
self.update()
|
||||
|
||||
def on_ok_clicked(self, obj):
|
||||
self.on_apply_clicked(obj)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_attr_list_select_row(self,obj,row,b,c):
|
||||
attr = obj.get_row_data(row)
|
||||
|
||||
self.attr_type.set_label(attr.getType())
|
||||
self.attr_value.set_text(attr.getValue())
|
||||
self.attr_details.set_text(utils.get_detail_text(attr))
|
||||
self.attr_details.set_text(Utils.get_detail_text(attr))
|
||||
|
||||
def on_update_attr_clicked(self,obj):
|
||||
import AttrEdit
|
||||
@ -752,7 +752,7 @@ class GlobalMediaProperties:
|
||||
Plugins.get_image_attributes())
|
||||
|
||||
def on_delete_attr_clicked(self,obj):
|
||||
if utils.delete_selected(obj,self.alist):
|
||||
if Utils.delete_selected(obj,self.alist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_attr_list()
|
||||
|
||||
@ -767,7 +767,7 @@ class GlobalMediaProperties:
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def disp_attr(attr):
|
||||
detail = utils.get_detail_flags(attr)
|
||||
detail = Utils.get_detail_flags(attr)
|
||||
return [const.display_pattr(attr.getType()),attr.getValue(),detail]
|
||||
|
||||
|
||||
@ -782,7 +782,7 @@ class DeleteMediaQuery:
|
||||
if ans == 1:
|
||||
return
|
||||
del self.db.getObjectMap()[self.media.getId()]
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
for p in self.db.getPersonMap().values():
|
||||
nl = []
|
||||
|
@ -31,7 +31,7 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
from RelLib import *
|
||||
|
||||
from intl import gettext
|
||||
@ -78,7 +78,7 @@ class LocationEditor:
|
||||
|
||||
self.window.set_data("o",self)
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_loc_edit_ok_clicked" : self.on_location_edit_ok_clicked
|
||||
})
|
||||
|
||||
@ -98,7 +98,7 @@ class LocationEditor:
|
||||
self.update_location(city,parish,county,state,country)
|
||||
|
||||
self.parent.redraw_location_list()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def update_location(self,city,parish,county,state,country):
|
||||
if self.location.get_city() != city:
|
||||
|
@ -37,8 +37,8 @@ import libglade
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import const
|
||||
import Config
|
||||
import utils
|
||||
import GrampsCfg
|
||||
import Utils
|
||||
import AutoComp
|
||||
from RelLib import *
|
||||
import ImageSelect
|
||||
@ -81,7 +81,7 @@ class Marriage:
|
||||
"on_add_attr_clicked" : self.on_add_attr_clicked,
|
||||
"on_addphoto_clicked" : self.gallery.on_add_photo_clicked,
|
||||
"on_attr_list_select_row" : self.on_attr_list_select_row,
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"on_close_marriage_editor" : self.on_close_marriage_editor,
|
||||
"on_delete_attr_clicked" : self.on_delete_attr_clicked,
|
||||
"on_delete_event" : self.on_delete_event,
|
||||
@ -99,8 +99,8 @@ class Marriage:
|
||||
})
|
||||
|
||||
text_win = self.get_widget("marriageTitle")
|
||||
title = _("%s and %s") % (Config.nameof(family.getFather()),
|
||||
Config.nameof(family.getMother()))
|
||||
title = _("%s and %s") % (GrampsCfg.nameof(family.getFather()),
|
||||
GrampsCfg.nameof(family.getMother()))
|
||||
text_win.set_text(title)
|
||||
|
||||
self.event_list = self.get_widget("marriageEventList")
|
||||
@ -124,8 +124,8 @@ class Marriage:
|
||||
self.lds_status = self.get_widget("lds_status")
|
||||
self.lds_place = self.get_widget("lds_place")
|
||||
|
||||
self.event_list.set_column_visibility(3,Config.show_detail)
|
||||
self.attr_list.set_column_visibility(2,Config.show_detail)
|
||||
self.event_list.set_column_visibility(3,GrampsCfg.show_detail)
|
||||
self.attr_list.set_column_visibility(2,GrampsCfg.show_detail)
|
||||
|
||||
self.elist = family.getEventList()[:]
|
||||
self.alist = family.getAttributeList()[:]
|
||||
@ -139,7 +139,7 @@ class Marriage:
|
||||
frel = const.display_frel(family.getRelationship())
|
||||
self.type_field.entry.set_text(frel)
|
||||
self.gid.set_text(family.getId())
|
||||
self.gid.set_editable(Config.id_edit)
|
||||
self.gid.set_editable(GrampsCfg.id_edit)
|
||||
|
||||
self.lds_temple.set_popdown_strings(_temple_names)
|
||||
|
||||
@ -291,10 +291,10 @@ class Marriage:
|
||||
self.family.setAttributeList(self.alist)
|
||||
|
||||
def redraw_attr_list(self):
|
||||
utils.redraw_list(self.alist,self.attr_list,disp_attr)
|
||||
Utils.redraw_list(self.alist,self.attr_list,disp_attr)
|
||||
|
||||
def redraw_event_list(self):
|
||||
utils.redraw_list(self.elist,self.event_list,disp_event)
|
||||
Utils.redraw_list(self.elist,self.event_list,disp_event)
|
||||
|
||||
def get_widget(self,name):
|
||||
return self.top.get_widget(name)
|
||||
@ -323,7 +323,7 @@ class Marriage:
|
||||
else:
|
||||
temple = ""
|
||||
|
||||
place = utils.get_place_from_list(self.lds_place)
|
||||
place = Utils.get_place_from_list(self.lds_place)
|
||||
|
||||
ord = self.family.getLdsSeal()
|
||||
if not ord:
|
||||
@ -348,7 +348,7 @@ class Marriage:
|
||||
quit = obj
|
||||
GnomeQuestionDialog(q,cancel_callback)
|
||||
else:
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_delete_event(self,obj,b):
|
||||
self.on_cancel_edit(obj)
|
||||
@ -363,7 +363,7 @@ class Marriage:
|
||||
del m[family.getId()]
|
||||
m[idval] = family
|
||||
family.setId(idval)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
else:
|
||||
msg1 = _("GRAMPS ID value was not changed.")
|
||||
GnomeWarningDialog("%s" % msg1)
|
||||
@ -383,12 +383,12 @@ class Marriage:
|
||||
self.family.setFather(mother)
|
||||
self.family.setMother(father)
|
||||
self.family.setRelationship(val)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
text = self.notes_field.get_chars(0,-1)
|
||||
if text != self.family.getNote():
|
||||
self.family.setNote(text)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
date = self.lds_date.get_text()
|
||||
temple = self.lds_temple.entry.get_text()
|
||||
@ -396,7 +396,7 @@ class Marriage:
|
||||
temple = const.lds_temple_codes[temple]
|
||||
else:
|
||||
temple = ""
|
||||
place = utils.get_place_from_list(self.lds_place)
|
||||
place = Utils.get_place_from_list(self.lds_place)
|
||||
|
||||
ord = self.family.getLdsSeal()
|
||||
if not ord:
|
||||
@ -407,32 +407,32 @@ class Marriage:
|
||||
ord.setStatus(self.seal_stat)
|
||||
ord.setPlace(place)
|
||||
self.family.setLdsSeal(ord)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
else:
|
||||
d = Date()
|
||||
d.set(date)
|
||||
if compare_dates(d,ord.getDateObj()) != 0:
|
||||
ord.setDateObj(d)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if ord.getTemple() != temple:
|
||||
ord.setTemple(temple)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if ord.getStatus() != self.seal_stat:
|
||||
ord.setStatus(self.seal_stat)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if ord.getPlace() != place:
|
||||
ord.setPlace(place)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
utils.destroy_passed_object(self.get_widget("marriageEditor"))
|
||||
Utils.destroy_passed_object(self.get_widget("marriageEditor"))
|
||||
|
||||
self.update_lists()
|
||||
if self.lists_changed:
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
def on_add_clicked(self,obj):
|
||||
import EventEdit
|
||||
name = utils.family_name(self.family)
|
||||
name = Utils.family_name(self.family)
|
||||
EventEdit.EventEditor(self,name,const.marriageEvents,
|
||||
const.save_pevent,None,None,0,self.cb)
|
||||
|
||||
@ -442,12 +442,12 @@ class Marriage:
|
||||
return
|
||||
|
||||
event = obj.get_row_data(obj.selection[0])
|
||||
name = utils.family_name(self.family)
|
||||
name = Utils.family_name(self.family)
|
||||
EventEdit.EventEditor(self,name,const.marriageEvents,
|
||||
const.save_pevent,event,None,0,self.cb)
|
||||
|
||||
def on_delete_clicked(self,obj):
|
||||
if utils.delete_selected(obj,self.elist):
|
||||
if Utils.delete_selected(obj,self.elist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_event_list()
|
||||
|
||||
@ -458,7 +458,7 @@ class Marriage:
|
||||
self.place_field.set_text(event.getPlaceName())
|
||||
self.cause_field.set_text(event.getCause())
|
||||
self.name_field.set_label(const.display_fevent(event.getName()))
|
||||
self.event_details.set_text(utils.get_detail_text(event))
|
||||
self.event_details.set_text(Utils.get_detail_text(event))
|
||||
self.descr_field.set_text(event.getDescription())
|
||||
|
||||
def on_attr_list_select_row(self,obj,row,b,c):
|
||||
@ -466,7 +466,7 @@ class Marriage:
|
||||
|
||||
self.attr_type.set_label(const.display_fattr(attr.getType()))
|
||||
self.attr_value.set_text(attr.getValue())
|
||||
self.attr_details_field.set_text(utils.get_detail_text(attr))
|
||||
self.attr_details_field.set_text(Utils.get_detail_text(attr))
|
||||
|
||||
def on_update_attr_clicked(self,obj):
|
||||
import AttrEdit
|
||||
@ -485,7 +485,7 @@ class Marriage:
|
||||
AttrEdit.AttributeEditor(self,attr,name,const.familyAttributes)
|
||||
|
||||
def on_delete_attr_clicked(self,obj):
|
||||
if utils.delete_selected(obj,self.alist):
|
||||
if Utils.delete_selected(obj,self.alist):
|
||||
self.lists_changed = 1
|
||||
self.redraw_attr_list()
|
||||
|
||||
@ -509,7 +509,7 @@ class Marriage:
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def disp_attr(attr):
|
||||
detail = utils.get_detail_flags(attr)
|
||||
detail = Utils.get_detail_flags(attr)
|
||||
return [const.display_fattr(attr.getType()),attr.getValue(),detail]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -519,7 +519,7 @@ def disp_attr(attr):
|
||||
#-------------------------------------------------------------------------
|
||||
def disp_event(event):
|
||||
return [const.display_fevent(event.getName()), event.getQuoteDate(),
|
||||
event.getPlaceName(), utils.get_detail_flags(event)]
|
||||
event.getPlaceName(), Utils.get_detail_flags(event)]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -528,7 +528,7 @@ def disp_event(event):
|
||||
#-------------------------------------------------------------------------
|
||||
def cancel_callback(a):
|
||||
if a==0:
|
||||
utils.destroy_passed_object(quit)
|
||||
Utils.destroy_passed_object(quit)
|
||||
|
||||
def src_changed(parent):
|
||||
parent.lists_changed = 1
|
||||
|
@ -26,9 +26,9 @@ import string
|
||||
import ImageSelect
|
||||
|
||||
from RelLib import *
|
||||
import utils
|
||||
import Utils
|
||||
import os
|
||||
import Config
|
||||
import GrampsCfg
|
||||
import const
|
||||
import RelImage
|
||||
|
||||
@ -72,13 +72,13 @@ class MediaView:
|
||||
GDK.ACTION_COPY|GDK.ACTION_MOVE)
|
||||
|
||||
self.update = update
|
||||
self.media_list.set_column_visibility(4,Config.show_detail)
|
||||
self.media_list.set_column_visibility(4,GrampsCfg.show_detail)
|
||||
self.media_list.set_column_visibility(5,0)
|
||||
self.media_list.connect('button-press-event',self.on_button_press_event)
|
||||
|
||||
# Restore the previous sort column
|
||||
|
||||
self.sort_col,self.sort_dir = Config.get_sort_cols("media",0,GTK.SORT_ASCENDING)
|
||||
self.sort_col,self.sort_dir = GrampsCfg.get_sort_cols("media",0,GTK.SORT_ASCENDING)
|
||||
self.media_list.set_sort_type(self.sort_dir)
|
||||
self.media_list.set_sort_column(self.sort_map[self.sort_col])
|
||||
self.set_arrow(self.sort_col)
|
||||
@ -118,7 +118,7 @@ class MediaView:
|
||||
obj.set_sort_type(self.sort_dir)
|
||||
obj.set_sort_column(new_col)
|
||||
self.sort_col = column
|
||||
Config.save_sort_cols("media",self.sort_col,self.sort_dir)
|
||||
GrampsCfg.save_sort_cols("media",self.sort_col,self.sort_dir)
|
||||
obj.sort()
|
||||
if data:
|
||||
row = obj.find_row_from_data(data)
|
||||
@ -130,14 +130,14 @@ class MediaView:
|
||||
|
||||
mobj = obj.get_row_data(row)
|
||||
type = mobj.getMimeType()
|
||||
type_name = utils.get_mime_description(type)
|
||||
type_name = Utils.get_mime_description(type)
|
||||
path = mobj.getPath()
|
||||
thumb_path = utils.thumb_path(self.db.getSavePath(),mobj)
|
||||
thumb_path = Utils.thumb_path(self.db.getSavePath(),mobj)
|
||||
pexists = os.path.exists(path)
|
||||
if pexists and os.path.exists(thumb_path):
|
||||
self.preview.load_file(thumb_path)
|
||||
else:
|
||||
self.preview.load_file(utils.find_icon(type))
|
||||
self.preview.load_file(Utils.find_icon(type))
|
||||
if not pexists:
|
||||
fexists = 0
|
||||
|
||||
@ -150,7 +150,7 @@ class MediaView:
|
||||
self.mpath.set_text(path)
|
||||
else:
|
||||
self.mpath.set_text("<local>")
|
||||
self.mdetails.set_text(utils.get_detail_text(mobj,0))
|
||||
self.mdetails.set_text(Utils.get_detail_text(mobj,0))
|
||||
|
||||
def on_button_press_event(self,obj,event):
|
||||
if len(self.media_list.selection) <= 0:
|
||||
@ -164,19 +164,19 @@ class MediaView:
|
||||
item.show()
|
||||
menu.append(item)
|
||||
self.obj = object
|
||||
utils.add_menuitem(menu,_("View in the default viewer"),None,self.popup_view_photo)
|
||||
Utils.add_menuitem(menu,_("View in the default viewer"),None,self.popup_view_photo)
|
||||
if object.getMimeType()[0:5] == "image":
|
||||
utils.add_menuitem(menu,_("Edit with the GIMP"),\
|
||||
Utils.add_menuitem(menu,_("Edit with the GIMP"),\
|
||||
None,self.popup_edit_photo)
|
||||
utils.add_menuitem(menu,_("Edit Object Properties"),None,
|
||||
Utils.add_menuitem(menu,_("Edit Object Properties"),None,
|
||||
self.popup_change_description)
|
||||
if object.getLocal() == 0:
|
||||
utils.add_menuitem(menu,_("Convert to local copy"),None,
|
||||
Utils.add_menuitem(menu,_("Convert to local copy"),None,
|
||||
self.popup_convert_to_private)
|
||||
menu.popup(None,None,None,0,0)
|
||||
|
||||
def popup_view_photo(self, obj):
|
||||
utils.view_photo(self.obj)
|
||||
Utils.view_photo(self.obj)
|
||||
|
||||
def popup_edit_photo(self, obj):
|
||||
if os.fork() == 0:
|
||||
@ -202,8 +202,8 @@ class MediaView:
|
||||
|
||||
self.media_list.freeze()
|
||||
self.media_list.clear()
|
||||
self.media_list.set_column_visibility(1,Config.id_visible)
|
||||
self.media_list.set_column_visibility(4,Config.show_detail)
|
||||
self.media_list.set_column_visibility(1,GrampsCfg.id_visible)
|
||||
self.media_list.set_column_visibility(4,GrampsCfg.show_detail)
|
||||
|
||||
index = 0
|
||||
objects = self.db.getObjectMap().values()
|
||||
@ -211,12 +211,12 @@ class MediaView:
|
||||
for src in objects:
|
||||
title = src.getDescription()
|
||||
id = src.getId()
|
||||
type = utils.get_mime_description(src.getMimeType())
|
||||
type = Utils.get_mime_description(src.getMimeType())
|
||||
if src.getLocal():
|
||||
path = "<local copy>"
|
||||
else:
|
||||
path = src.getPath()
|
||||
details = utils.get_detail_flags(src,0)
|
||||
details = Utils.get_detail_flags(src,0)
|
||||
stitle = string.upper(title)
|
||||
self.media_list.append([title,id,type,path,details,stitle])
|
||||
self.media_list.set_row_data(index,src)
|
||||
@ -267,7 +267,7 @@ class MediaView:
|
||||
else:
|
||||
map = self.db.getObjectMap()
|
||||
del map[mobj.getId()]
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
self.update(0)
|
||||
|
||||
def is_media_object_used(self,mobj):
|
||||
@ -302,25 +302,25 @@ class MediaView:
|
||||
protocol,site,file, j,k,l = urlparse.urlparse(d)
|
||||
if protocol == "file":
|
||||
name = file
|
||||
mime = utils.get_mime_type(name)
|
||||
mime = Utils.get_mime_type(name)
|
||||
photo = Photo()
|
||||
photo.setPath(name)
|
||||
photo.setMimeType(mime)
|
||||
description = os.path.basename(name)
|
||||
photo.setDescription(description)
|
||||
self.db.addObject(photo)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
w.drag_finish(context, 1, 0, time)
|
||||
self.load_media()
|
||||
if Config.mediaref == 0:
|
||||
if GrampsCfg.mediaref == 0:
|
||||
name = RelImage.import_media_object(name,
|
||||
self.db.getSavePath(),
|
||||
photo.getId())
|
||||
if name:
|
||||
photo.setPath(name)
|
||||
photo.setLocal(1)
|
||||
utils.modified()
|
||||
if Config.globalprop:
|
||||
Utils.modified()
|
||||
if GrampsCfg.globalprop:
|
||||
ImageSelect.GlobalMediaProperties(self.db,photo,self.load_media)
|
||||
elif protocol != "":
|
||||
import urllib
|
||||
@ -332,7 +332,7 @@ class MediaView:
|
||||
|
||||
gnome.ui.GnomeErrorDialog("%s\n%s %d" % (t,msg[0],msg[1]))
|
||||
return
|
||||
mime = utils.get_mime_type(tfile)
|
||||
mime = Utils.get_mime_type(tfile)
|
||||
photo = Photo()
|
||||
photo.setMimeType(mime)
|
||||
photo.setDescription(d)
|
||||
@ -352,8 +352,8 @@ class MediaView:
|
||||
photo.setPath(tfile)
|
||||
w.drag_finish(context, 1, 0, time)
|
||||
return
|
||||
utils.modified()
|
||||
if Config.globalprop:
|
||||
Utils.modified()
|
||||
if GrampsCfg.globalprop:
|
||||
ImageSelect.GlobalMediaProperties(self.db,photo,None)
|
||||
else:
|
||||
w.drag_finish(context, 0, 0, time)
|
||||
|
@ -19,8 +19,8 @@
|
||||
#
|
||||
|
||||
import RelLib
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
import const
|
||||
|
||||
from intl import gettext
|
||||
@ -53,21 +53,21 @@ class MergePeople:
|
||||
self.glade.signal_autoconnect({
|
||||
"on_merge_clicked" : self.on_merge_clicked,
|
||||
"on_next_clicked" : self.on_merge_edit_clicked,
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
})
|
||||
|
||||
label_text = "Merge %s and %s" % (Config.nameof(person1),Config.nameof(person2))
|
||||
label_text = "Merge %s and %s" % (GrampsCfg.nameof(person1),GrampsCfg.nameof(person2))
|
||||
self.glade.get_widget("progress").set_text(label_text)
|
||||
f1 = person1.getMainFamily()
|
||||
f2 = person2.getMainFamily()
|
||||
|
||||
name1 = Config.nameof(person1)
|
||||
name1 = GrampsCfg.nameof(person1)
|
||||
death1 = person1.getDeath().getDate()
|
||||
dplace1 = self.place_name(person1.getDeath())
|
||||
birth1 = person1.getBirth().getDate()
|
||||
bplace1 = self.place_name(person1.getBirth())
|
||||
|
||||
name2 = Config.nameof(person2)
|
||||
name2 = GrampsCfg.nameof(person2)
|
||||
death2 = person2.getDeath().getDate()
|
||||
dplace2 = self.place_name(person2.getDeath())
|
||||
birth2 = person2.getBirth().getDate()
|
||||
@ -157,7 +157,7 @@ class MergePeople:
|
||||
if spouse == None:
|
||||
name = "unknown"
|
||||
else:
|
||||
name = "%s (%s)" % (Config.nameof(spouse),spouse.getId())
|
||||
name = "%s (%s)" % (GrampsCfg.nameof(spouse),spouse.getId())
|
||||
self.glade.get_widget("spouse1").append([name])
|
||||
|
||||
length = min(len(p2list),3)
|
||||
@ -172,7 +172,7 @@ class MergePeople:
|
||||
if spouse == None:
|
||||
name = "unknown"
|
||||
else:
|
||||
name = "%s (%s)" % (Config.nameof(spouse),spouse.getId())
|
||||
name = "%s (%s)" % (GrampsCfg.nameof(spouse),spouse.getId())
|
||||
self.glade.get_widget("spouse2").append([name])
|
||||
|
||||
if name1 != name2:
|
||||
@ -231,7 +231,7 @@ class MergePeople:
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
def on_merge_clicked(self,obj):
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
list = self.p1.getAlternateNames()[:]
|
||||
for xdata in self.p2.getAlternateNames():
|
||||
@ -345,9 +345,9 @@ class MergePeople:
|
||||
try:
|
||||
del self.db.getPersonMap()[self.p2.getId()]
|
||||
except:
|
||||
print "%s is not in the person map!" % (Config.nameof(self.p2))
|
||||
print "%s is not in the person map!" % (GrampsCfg.nameof(self.p2))
|
||||
self.update(self.p1,self.p2)
|
||||
utils.destroy_passed_object(self.top)
|
||||
Utils.destroy_passed_object(self.top)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
@ -579,8 +579,8 @@ def compare_people(p1,p2):
|
||||
if father1 == father2:
|
||||
chance = chance + 1
|
||||
else:
|
||||
fname1 = Config.nameof(father1)
|
||||
fname2 = Config.nameof(father2)
|
||||
fname1 = GrampsCfg.nameof(father1)
|
||||
fname2 = GrampsCfg.nameof(father2)
|
||||
value = name_match(fname1,fname2)
|
||||
if value != -1:
|
||||
chance = chance + value
|
||||
@ -591,8 +591,8 @@ def compare_people(p1,p2):
|
||||
if mother1 == mother2:
|
||||
chance = chance + 1
|
||||
else:
|
||||
mname1 = Config.nameof(mother1)
|
||||
mname2 = Config.nameof(mother2)
|
||||
mname1 = GrampsCfg.nameof(mother1)
|
||||
mname2 = GrampsCfg.nameof(mother2)
|
||||
value = name_match(mname1,mname2)
|
||||
if value != -1:
|
||||
chance = chance + value
|
||||
@ -786,7 +786,7 @@ def ancestors_of(p1,list):
|
||||
def name_of(p):
|
||||
if not p:
|
||||
return ""
|
||||
return "%s (%s)" % ( Config.nameof(p),p.getId())
|
||||
return "%s (%s)" % ( GrampsCfg.nameof(p),p.getId())
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -808,7 +808,7 @@ class MergePlaces:
|
||||
self.t3.set_text(place1.get_title())
|
||||
|
||||
self.glade.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_merge_places_clicked" : self.on_merge_places_clicked,
|
||||
})
|
||||
self.top.show()
|
||||
@ -860,6 +860,6 @@ class MergePlaces:
|
||||
event.setPlace(self.p1)
|
||||
del self.db.getPlaceMap()[self.p2.getId()]
|
||||
self.update()
|
||||
utils.modified()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.modified()
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
|
@ -31,7 +31,7 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
from RelLib import *
|
||||
|
||||
from intl import gettext
|
||||
@ -53,7 +53,7 @@ class NameEditor:
|
||||
self.surname_field = self.top.get_widget("alt_last")
|
||||
self.suffix_field = self.top.get_widget("alt_suffix")
|
||||
self.note_field = self.top.get_widget("alt_note")
|
||||
utils.attach_surnames(self.top.get_widget("alt_surname_list"))
|
||||
Utils.attach_surnames(self.top.get_widget("alt_surname_list"))
|
||||
self.priv = self.top.get_widget("priv")
|
||||
|
||||
if self.name:
|
||||
@ -81,8 +81,8 @@ class NameEditor:
|
||||
self.note_field.set_word_wrap(1)
|
||||
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"on_name_edit_ok_clicked" : self.on_name_edit_ok_clicked,
|
||||
"on_source_clicked" : self.on_name_source_clicked
|
||||
})
|
||||
@ -107,7 +107,7 @@ class NameEditor:
|
||||
self.parent.lists_changed = 1
|
||||
|
||||
self.parent.redraw_name_list()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def update_name(self,first,last,suffix,note,priv):
|
||||
|
||||
|
@ -31,7 +31,7 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
from RelLib import *
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -55,12 +55,12 @@ class NoteEditor:
|
||||
|
||||
self.editnote.signal_autoconnect({
|
||||
"on_save_note_clicked" : self.on_save_note_clicked,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
def on_save_note_clicked(self,obj):
|
||||
text = self.textobj.get_chars(0,-1)
|
||||
if text != self.data.getNote():
|
||||
self.data.setNote(text)
|
||||
utils.modified()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.modified()
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
import TextDoc
|
||||
import gtk
|
||||
import Config
|
||||
import GrampsCfg
|
||||
|
||||
from intl import gettext
|
||||
_ = gettext
|
||||
@ -48,7 +48,7 @@ def make_paper_menu(main_menu):
|
||||
menuitem.set_data("i",paper)
|
||||
menuitem.show()
|
||||
myMenu.append(menuitem)
|
||||
if name == Config.paper_preference:
|
||||
if name == GrampsCfg.paper_preference:
|
||||
myMenu.set_active(index)
|
||||
index = index + 1
|
||||
main_menu.set_menu(myMenu)
|
||||
|
@ -26,7 +26,7 @@ import GTK
|
||||
import GDK
|
||||
import gtk
|
||||
|
||||
import Config
|
||||
import GrampsCfg
|
||||
|
||||
from intl import gettext
|
||||
_ = gettext
|
||||
@ -178,7 +178,7 @@ class PedigreeView:
|
||||
myMenu = gtk.GtkMenu()
|
||||
for family in self.active_person.getFamilyList():
|
||||
for child in family.getChildList():
|
||||
menuitem = gtk.GtkMenuItem(Config.nameof(child))
|
||||
menuitem = gtk.GtkMenuItem(GrampsCfg.nameof(child))
|
||||
myMenu.append(menuitem)
|
||||
menuitem.set_data(_PERSON,child)
|
||||
menuitem.connect("activate",self.on_childmenu_changed)
|
||||
@ -358,7 +358,7 @@ class PedigreeView:
|
||||
elif event.type == GDK.ENTER_NOTIFY:
|
||||
obj.set(fill_color_gdk=style.bg[GTK.STATE_SELECTED],
|
||||
width_pixels=4)
|
||||
name = Config.nameof(person)
|
||||
name = GrampsCfg.nameof(person)
|
||||
msg = _("Double clicking will make %s the active person") % name
|
||||
self.sb.set_status(msg)
|
||||
elif event.type == GDK.LEAVE_NOTIFY:
|
||||
|
@ -45,8 +45,8 @@ import string
|
||||
#-------------------------------------------------------------------------
|
||||
from RelLib import *
|
||||
import EditPlace
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
|
||||
from intl import gettext
|
||||
_ = gettext
|
||||
@ -86,7 +86,7 @@ class PlaceView:
|
||||
|
||||
# Restore the previous sort column
|
||||
|
||||
self.sort_col,self.sort_dir = Config.get_sort_cols("place",0,GTK.SORT_ASCENDING)
|
||||
self.sort_col,self.sort_dir = GrampsCfg.get_sort_cols("place",0,GTK.SORT_ASCENDING)
|
||||
self.set_arrow(self.sort_col)
|
||||
self.place_list.set_sort_column(self.sort_map[self.sort_col])
|
||||
self.place_list.set_sort_type(self.sort_dir)
|
||||
@ -104,7 +104,7 @@ class PlaceView:
|
||||
self.place_list.freeze()
|
||||
self.place_list.clear()
|
||||
|
||||
self.place_list.set_column_visibility(1,Config.id_visible)
|
||||
self.place_list.set_column_visibility(1,GrampsCfg.id_visible)
|
||||
|
||||
index = 0
|
||||
u = string.upper
|
||||
@ -184,7 +184,7 @@ class PlaceView:
|
||||
self.set_arrow(column)
|
||||
self.place_list.set_sort_type(self.sort_dir)
|
||||
self.place_list.set_sort_column(self.sort_map[self.sort_col])
|
||||
Config.save_sort_cols("place",self.sort_col,self.sort_dir)
|
||||
GrampsCfg.save_sort_cols("place",self.sort_col,self.sort_dir)
|
||||
|
||||
self.place_list.sort()
|
||||
if sel:
|
||||
@ -253,7 +253,7 @@ class PlaceView:
|
||||
obj.remove(index)
|
||||
map = self.db.getPlaceMap()
|
||||
del map[place.getId()]
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
def on_edit_place_clicked(self,obj):
|
||||
"""Display the selected places in the EditPlace display"""
|
||||
|
@ -50,8 +50,8 @@ from re import compile
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
from intl import gettext
|
||||
_ = gettext
|
||||
|
||||
@ -103,7 +103,7 @@ class ReportPlugins:
|
||||
self.dialog.signal_autoconnect({
|
||||
"on_report_apply_clicked" : self.on_apply_clicked,
|
||||
"on_report_ok_clicked" : self.on_apply_clicked,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
tree = self.dialog.get_widget("tree1")
|
||||
@ -113,7 +113,7 @@ class ReportPlugins:
|
||||
def on_apply_clicked(self,obj):
|
||||
"""Execute the selected report"""
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
if self.run_tool:
|
||||
self.run_tool(self.db,self.active)
|
||||
|
||||
@ -159,7 +159,7 @@ class ToolPlugins:
|
||||
self.dialog.signal_autoconnect({
|
||||
"on_apply_clicked" : self.on_apply_clicked,
|
||||
"on_ok_clicked" : self.on_apply_clicked,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
tree = self.dialog.get_widget("tree")
|
||||
@ -169,7 +169,7 @@ class ToolPlugins:
|
||||
def on_apply_clicked(self,obj):
|
||||
"""Execute the selected tool."""
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
if self.run_tool:
|
||||
self.run_tool(self.db,self.active,self.update)
|
||||
|
||||
@ -487,7 +487,7 @@ def get_text_doc_menu(main_menu,tables,callback,obj=None):
|
||||
menuitem.connect("activate",callback)
|
||||
menuitem.show()
|
||||
myMenu.append(menuitem)
|
||||
if name == Config.output_preference:
|
||||
if name == GrampsCfg.output_preference:
|
||||
myMenu.set_active(index)
|
||||
callback(menuitem)
|
||||
index = index + 1
|
||||
@ -536,7 +536,7 @@ def get_draw_doc_menu(main_menu,callback=None,obj=None):
|
||||
menuitem.connect("activate",callback)
|
||||
menuitem.show()
|
||||
myMenu.append(menuitem)
|
||||
if name == Config.goutput_preference:
|
||||
if name == GrampsCfg.goutput_preference:
|
||||
myMenu.set_active(index)
|
||||
if callback:
|
||||
callback(menuitem)
|
||||
|
@ -40,7 +40,7 @@ from gnome.ui import GnomeErrorDialog, GnomeWarningDialog
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
import ImgManip
|
||||
from intl import gettext
|
||||
_ = gettext
|
||||
@ -58,7 +58,7 @@ def import_media_object(filename,path,base):
|
||||
GnomeErrorDialog(_("Could not import %s\nThe file has been moved or deleted") % filename)
|
||||
return ""
|
||||
|
||||
type = utils.get_mime_type(filename)
|
||||
type = Utils.get_mime_type(filename)
|
||||
if type[0:5] == "image":
|
||||
name = "%s/%s.jpg" % (path,base)
|
||||
base = "%s.jpg" % (base)
|
||||
|
@ -26,7 +26,7 @@ import os
|
||||
import re
|
||||
import sort
|
||||
import string
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
import Plugins
|
||||
|
||||
@ -35,7 +35,7 @@ _ = intl.gettext
|
||||
from TextDoc import *
|
||||
from StyleEditor import *
|
||||
|
||||
import Config
|
||||
import GrampsCfg
|
||||
import PaperMenu
|
||||
|
||||
from gtk import *
|
||||
@ -127,7 +127,7 @@ class Report:
|
||||
|
||||
def progress_bar_done(self):
|
||||
"""Done with the progress bar. It can be destroyed now."""
|
||||
utils.destroy_passed_object(self.ptop)
|
||||
Utils.destroy_passed_object(self.ptop)
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@ -285,7 +285,7 @@ class ReportDialog:
|
||||
"""Get the name of the directory to which the target dialog
|
||||
box should default. This value can be set in the preferences
|
||||
panel."""
|
||||
return Config.report_dir
|
||||
return GrampsCfg.report_dir
|
||||
|
||||
def set_default_directory(self, value):
|
||||
"""Save the name of the current directory, so that any future
|
||||
@ -295,7 +295,7 @@ class ReportDialog:
|
||||
This means that the last directory used will only be
|
||||
remembered for this session of gramps unless the user saves
|
||||
his/her preferences."""
|
||||
Config.report_dir = value
|
||||
GrampsCfg.report_dir = value
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -360,7 +360,7 @@ class ReportDialog:
|
||||
frame, because it must be recreated to reflect any changes
|
||||
whenever the user closes the style editor dialog."""
|
||||
style_sheet_map = self.style_sheet_list.get_style_sheet_map()
|
||||
myMenu = utils.build_string_optmenu(style_sheet_map, "default")
|
||||
myMenu = Utils.build_string_optmenu(style_sheet_map, "default")
|
||||
self.style_menu.set_menu(myMenu)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@ -566,7 +566,7 @@ class ReportDialog:
|
||||
# The optional pagecount stuff.
|
||||
if pagecount_map:
|
||||
self.pagecount_menu = GtkOptionMenu()
|
||||
myMenu = utils.build_string_optmenu(pagecount_map, start_text)
|
||||
myMenu = Utils.build_string_optmenu(pagecount_map, start_text)
|
||||
self.pagecount_menu.set_menu(myMenu)
|
||||
table.attach(GtkLabel(_("Page Count")),2,1,3,2,FILL,FILL,pad,pad)
|
||||
table.attach(self.pagecount_menu,3,2,4,2,xpadding=pad,ypadding=pad)
|
||||
@ -654,7 +654,7 @@ class ReportDialog:
|
||||
self.extra_menu_label = GtkLabel(em_label)
|
||||
self.extra_menu_label.set_alignment(1.0,0.5)
|
||||
self.extra_menu = GtkOptionMenu()
|
||||
myMenu = utils.build_string_optmenu(extra_map, preset)
|
||||
myMenu = Utils.build_string_optmenu(extra_map, preset)
|
||||
self.extra_menu.set_menu(myMenu)
|
||||
self.extra_menu.set_sensitive(len(extra_map) > 1)
|
||||
self.add_tooltip(self.extra_menu,em_tip)
|
||||
|
@ -42,8 +42,8 @@ from RelLib import *
|
||||
|
||||
import const
|
||||
import sort
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
import string
|
||||
import AutoComp
|
||||
|
||||
@ -64,13 +64,13 @@ class SelectChild:
|
||||
self.xml.signal_autoconnect({
|
||||
"on_save_child_clicked" : self.on_save_child_clicked,
|
||||
"on_show_toggled" : self.on_show_toggled,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
self.select_child_list = {}
|
||||
self.top = self.xml.get_widget("selectChild")
|
||||
self.add_child = self.xml.get_widget("addChild")
|
||||
self.add_child.set_column_visibility(1,Config.id_visible)
|
||||
self.add_child.set_column_visibility(1,GrampsCfg.id_visible)
|
||||
|
||||
if (self.family):
|
||||
father = self.family.getFather()
|
||||
@ -161,8 +161,8 @@ class SelectChild:
|
||||
|
||||
person_list.sort(sort.by_last_name)
|
||||
for person in person_list:
|
||||
self.add_child.append([utils.phonebook_name(person),
|
||||
utils.birthday(person),
|
||||
self.add_child.append([Utils.phonebook_name(person),
|
||||
Utils.birthday(person),
|
||||
person.getId()])
|
||||
self.add_child.set_row_data(index,person)
|
||||
index = index + 1
|
||||
@ -202,9 +202,9 @@ class SelectChild:
|
||||
else:
|
||||
select_child.addAltFamily(self.family,mrel,frel)
|
||||
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
self.redraw(self.family)
|
||||
|
||||
def on_show_toggled(self,obj):
|
||||
@ -225,7 +225,7 @@ class NewChild:
|
||||
"on_male_toggled" : self.on_male_toggled,
|
||||
"on_female_toggled" : self.on_female_toggled,
|
||||
"on_gender_toggled" : self.on_gender_toggled,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
if autoname == 0:
|
||||
@ -242,7 +242,7 @@ class NewChild:
|
||||
self.top = self.xml.get_widget("addChild")
|
||||
self.surname = self.xml.get_widget("surname")
|
||||
self.given = self.xml.get_widget("childGiven")
|
||||
if Config.autocomp:
|
||||
if GrampsCfg.autocomp:
|
||||
self.comp = AutoComp.AutoEntry(self.surname,const.surnames)
|
||||
|
||||
self.surname.set_text(self.update_surname(2))
|
||||
@ -297,7 +297,7 @@ class NewChild:
|
||||
pass
|
||||
|
||||
def combo_insert_text(self,combo,new_text,new_text_len,i_dont_care):
|
||||
utils.combo_insert_text(combo,new_text,new_text_len,i_dont_care)
|
||||
Utils.combo_insert_text(combo,new_text,new_text_len,i_dont_care)
|
||||
|
||||
def north_american(self,val):
|
||||
if self.person.getGender() == Person.male:
|
||||
@ -383,8 +383,8 @@ class NewChild:
|
||||
# must do an apply filter here to make sure the main window gets updated
|
||||
|
||||
self.update(self.family,person,[])
|
||||
utils.modified()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.modified()
|
||||
Utils.destroy_passed_object(obj)
|
||||
self.new_child = person
|
||||
|
||||
def other_update(self,arg1,plist):
|
||||
|
@ -41,8 +41,8 @@ import gnome.ui
|
||||
#-------------------------------------------------------------------------
|
||||
from RelLib import *
|
||||
import EditSource
|
||||
import utils
|
||||
import Config
|
||||
import Utils
|
||||
import GrampsCfg
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -69,7 +69,7 @@ class SourceView:
|
||||
self.sort_arrow = [self.title_arrow, self.id_arrow, self.author_arrow]
|
||||
self.source_list.connect('click-column',self.click_column)
|
||||
|
||||
self.sort_col,self.sort_dir = Config.get_sort_cols("source",3,GTK.SORT_ASCENDING)
|
||||
self.sort_col,self.sort_dir = GrampsCfg.get_sort_cols("source",3,GTK.SORT_ASCENDING)
|
||||
if self.sort_col >= len(self.sort_arrow):
|
||||
self.sort_col = 0
|
||||
|
||||
@ -113,7 +113,7 @@ class SourceView:
|
||||
obj.set_sort_type(self.sort_dir)
|
||||
obj.set_sort_column(new_col)
|
||||
self.sort_col = new_col
|
||||
Config.save_sort_cols("source",self.sort_col,self.sort_dir)
|
||||
GrampsCfg.save_sort_cols("source",self.sort_col,self.sort_dir)
|
||||
obj.sort()
|
||||
if data:
|
||||
row = obj.find_row_from_data(data)
|
||||
@ -129,7 +129,7 @@ class SourceView:
|
||||
|
||||
self.source_list.clear()
|
||||
self.source_list.freeze()
|
||||
self.source_list.set_column_visibility(1,Config.id_visible)
|
||||
self.source_list.set_column_visibility(1,GrampsCfg.id_visible)
|
||||
|
||||
index = 0
|
||||
for src in self.db.getSourceMap().values():
|
||||
@ -174,7 +174,7 @@ class SourceView:
|
||||
else:
|
||||
map = self.db.getSourceMap()
|
||||
del map[source.getId()]
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
self.update(0)
|
||||
|
||||
def is_source_used(self,source):
|
||||
|
@ -33,7 +33,7 @@ import libglade
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
from RelLib import *
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -56,7 +56,7 @@ class SourceSelector:
|
||||
self.update=update
|
||||
self.top = libglade.GladeXML(const.srcselFile,"sourcesel")
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_add_src_clicked" : self.on_add_src_clicked,
|
||||
"on_del_src_clicked" : self.on_del_src_clicked,
|
||||
"on_edit_src_clicked" : self.on_edit_src_clicked,
|
||||
@ -84,7 +84,7 @@ class SourceSelector:
|
||||
for s in self.list:
|
||||
self.orig.append(s)
|
||||
self.update(self.parent)
|
||||
utils.destroy_passed_object(self.sourcesel)
|
||||
Utils.destroy_passed_object(self.sourcesel)
|
||||
|
||||
def on_edit_src_clicked(self,obj):
|
||||
sel = obj.selection
|
||||
@ -119,17 +119,17 @@ class SourceEditor:
|
||||
self.source_ref = srcref
|
||||
self.showSource = libglade.GladeXML(const.srcselFile, "sourceDisplay")
|
||||
self.showSource.signal_autoconnect({
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"on_sourceok_clicked" : self.on_sourceok_clicked,
|
||||
"on_source_changed" : self.on_source_changed,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
self.sourceDisplay = self.get_widget("sourceDisplay")
|
||||
self.source_field = self.get_widget("sourceList")
|
||||
self.title_menu = self.get_widget("source_title")
|
||||
self.title_menu.set_data("o",self)
|
||||
self.conf_menu = self.get_widget("conf")
|
||||
utils.build_confidence_menu(self.conf_menu)
|
||||
Utils.build_confidence_menu(self.conf_menu)
|
||||
self.conf_menu.set_history(srcref.getConfidence())
|
||||
|
||||
self.author_field = self.get_widget("sauthor")
|
||||
@ -218,8 +218,8 @@ class SourceEditor:
|
||||
if self.update:
|
||||
self.update(self.parent,self.source_ref)
|
||||
|
||||
utils.modified()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.modified()
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_source_changed(self,obj):
|
||||
self.active_source = obj.list.get_selection()[0].get_data("s")
|
||||
|
@ -21,7 +21,7 @@
|
||||
import const
|
||||
import libglade
|
||||
import gnome.config
|
||||
import utils
|
||||
import Utils
|
||||
|
||||
_StartupEntry = "/gramps/config/startup"
|
||||
|
||||
@ -78,9 +78,9 @@ class StartupDialog:
|
||||
gnome.config.set_int("/gramps/config/UseLDS",lds)
|
||||
gnome.config.set_int(_StartupEntry,const.startup)
|
||||
gnome.config.sync()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_cancel_clicked(self,obj):
|
||||
gnome.config.set_int(_StartupEntry,const.startup)
|
||||
gnome.config.sync()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
import libglade
|
||||
import gtk
|
||||
import utils
|
||||
import Utils
|
||||
import ListColors
|
||||
import const
|
||||
|
||||
@ -40,7 +40,7 @@ class StyleListDisplay:
|
||||
self.sheetlist = stylesheetlist
|
||||
self.top = libglade.GladeXML(const.stylesFile,"styles")
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_list_select_row" : on_list_select_row,
|
||||
"on_ok_clicked" : on_ok_clicked,
|
||||
"on_add_clicked" : on_add_clicked,
|
||||
@ -92,7 +92,7 @@ def on_ok_clicked(obj):
|
||||
|
||||
top.callback(top.object)
|
||||
top.sheetlist.save()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -143,7 +143,7 @@ class StyleEditor:
|
||||
|
||||
self.top.signal_autoconnect({
|
||||
"on_save_style_clicked" : on_save_style_clicked,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
self.window = self.top.get_widget("editor")
|
||||
@ -272,7 +272,7 @@ def on_save_style_clicked(obj):
|
||||
top.save_paragraph(p)
|
||||
top.parent.sheetlist.set_style_sheet(name,top.style)
|
||||
top.parent.redraw()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
import string
|
||||
import os
|
||||
import utils
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -31,7 +31,7 @@ import libglade
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
from RelLib import *
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -58,7 +58,7 @@ class UrlEditor:
|
||||
self.priv.set_active(url.getPrivacy())
|
||||
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_url_edit_ok_clicked" : self.on_url_edit_ok_clicked
|
||||
})
|
||||
|
||||
@ -73,7 +73,7 @@ class UrlEditor:
|
||||
|
||||
self.update_url(des,addr,priv)
|
||||
self.parent.redraw_url_list()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def update_url(self,des,addr,priv):
|
||||
if self.url.get_path() != addr:
|
||||
|
@ -167,10 +167,10 @@ def destroy_passed_object(obj):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def get_detail_flags(obj,priv=1):
|
||||
import Config
|
||||
import GrampsCfg
|
||||
|
||||
detail = ""
|
||||
if Config.show_detail:
|
||||
if GrampsCfg.show_detail:
|
||||
if obj.getNote() != "":
|
||||
detail = "N"
|
||||
if len(obj.getSourceRefList()) > 0:
|
@ -28,7 +28,7 @@ import os
|
||||
import string
|
||||
import shutil
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
|
||||
from re import compile
|
||||
|
||||
@ -85,7 +85,7 @@ class RevisionComment:
|
||||
|
||||
def on_savecomment_clicked(self,obj):
|
||||
comment = self.text.get_text()
|
||||
utils.destroy_passed_object(self.win)
|
||||
Utils.destroy_passed_object(self.win)
|
||||
self.save(self.filename,comment)
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ class RevisionSelect:
|
||||
index = index + 1
|
||||
|
||||
def on_cancel_clicked(self,obj):
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
if self.callback:
|
||||
self.callback()
|
||||
|
||||
@ -122,7 +122,7 @@ class RevisionSelect:
|
||||
rev = self.revlist.get_row_data(self.revlist.selection[0])
|
||||
f = self.vc.get_version(rev)
|
||||
self.load(f,self.filename,rev)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
class VersionControl:
|
||||
"""Base class for revision control systems"""
|
||||
|
@ -38,7 +38,7 @@ import os
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import Config
|
||||
import GrampsCfg
|
||||
from RelLib import *
|
||||
from Date import SingleDate
|
||||
from intl import gettext
|
||||
@ -65,7 +65,7 @@ def exportData(database, filename, callback):
|
||||
if os.path.isfile(filename):
|
||||
shutil.copy(filename, filename + ".bak")
|
||||
|
||||
compress = Config.uncompress ==0 and _gzip_ok == 1
|
||||
compress = GrampsCfg.uncompress ==0 and _gzip_ok == 1
|
||||
|
||||
try:
|
||||
g = XmlWriter(database,callback,0,compress)
|
||||
|
@ -21,7 +21,6 @@
|
||||
import os
|
||||
import string
|
||||
import re
|
||||
import utils
|
||||
import gnome.ui
|
||||
import Plugins
|
||||
import ImgManip
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
from TextDoc import *
|
||||
from latin_utf8 import latin_to_utf8
|
||||
import utils
|
||||
import time
|
||||
import StringIO
|
||||
import os
|
||||
|
@ -25,7 +25,6 @@ import string
|
||||
from TextDoc import *
|
||||
from latin_utf8 import latin_to_utf8
|
||||
import const
|
||||
import utils
|
||||
import Plugins
|
||||
import intl
|
||||
import ImgManip
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
import Filter
|
||||
import re
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -41,7 +41,7 @@ class RegExMatch(Filter.Filter):
|
||||
if self.ok == 0:
|
||||
return 0
|
||||
else:
|
||||
return self.regexp.search(utils.phonebook_name(person))
|
||||
return self.regexp.search(Utils.phonebook_name(person))
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
import Filter
|
||||
import string
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -30,7 +30,7 @@ class SubString(Filter.Filter):
|
||||
"Names that contain a substring"
|
||||
|
||||
def match(self,person):
|
||||
return string.find(utils.phonebook_name(person),self.text) >= 0
|
||||
return string.find(Utils.phonebook_name(person),self.text) >= 0
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
3657
src/gramps_main.py
3657
src/gramps_main.py
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,7 @@
|
||||
|
||||
"Graphical Reports/Ancestor Chart"
|
||||
|
||||
import Config
|
||||
import GrampsCfg
|
||||
import os
|
||||
import string
|
||||
|
||||
@ -88,10 +88,10 @@ class AncestorChart:
|
||||
B = person.getBirth().getPlaceName()
|
||||
D = person.getDeath().getPlaceName()
|
||||
i = "%s" % person.getId()
|
||||
A = Config.attr_name
|
||||
A = GrampsCfg.attr_name
|
||||
a = ""
|
||||
for attr in person.getAttributeList():
|
||||
if attr.getType() == Config.attr_name:
|
||||
if attr.getType() == GrampsCfg.attr_name:
|
||||
a = attr.getValue()
|
||||
break
|
||||
|
||||
|
@ -26,7 +26,7 @@ import gnome.ui
|
||||
import libglade
|
||||
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
|
||||
_ = intl.gettext
|
||||
@ -52,8 +52,8 @@ class ChangeTypes:
|
||||
self.glade.get_widget("new").set_popdown_strings(const.personalEvents)
|
||||
|
||||
self.glade.signal_autoconnect({
|
||||
"on_close_clicked" : utils.destroy_passed_object,
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"on_close_clicked" : Utils.destroy_passed_object,
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"on_apply_clicked" : self.on_apply_clicked
|
||||
})
|
||||
|
||||
@ -70,7 +70,7 @@ class ChangeTypes:
|
||||
if event.getName() == original:
|
||||
event.setName(new)
|
||||
modified = modified + 1
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
if modified == 1:
|
||||
msg = _("1 event record was modified")
|
||||
@ -78,7 +78,7 @@ class ChangeTypes:
|
||||
msg = _("%d event records were modified") % modified
|
||||
|
||||
gnome.ui.GnomeOkDialog(msg)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -21,7 +21,7 @@
|
||||
"Database Processing/Check and repair database"
|
||||
|
||||
import RelLib
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -81,7 +81,7 @@ class CheckIntegrity:
|
||||
break
|
||||
else:
|
||||
family.removeChild(child)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
self.broken_links.append((child,family))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -104,7 +104,7 @@ class CheckIntegrity:
|
||||
family_list = self.db.getFamilyMap().values()[:]
|
||||
for family in family_list:
|
||||
if family.getFather() == None and family.getMother() == None:
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
self.empty_family.append(family)
|
||||
self.delete_empty_family(family)
|
||||
|
||||
@ -200,7 +200,7 @@ class CheckIntegrity:
|
||||
glade_file = base + os.sep + "summary.glade"
|
||||
topDialog = libglade.GladeXML(glade_file,"summary")
|
||||
topDialog.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
})
|
||||
title = _("Check Integrity")
|
||||
top = topDialog.get_widget("summary")
|
||||
|
@ -27,8 +27,6 @@ from DrawDoc import *
|
||||
from Report import *
|
||||
from TextDoc import *
|
||||
|
||||
import Config
|
||||
|
||||
import libglade
|
||||
import gtk
|
||||
import string
|
||||
|
@ -22,9 +22,9 @@
|
||||
|
||||
from RelLib import *
|
||||
import os
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
import Config
|
||||
import GrampsCfg
|
||||
|
||||
_ = intl.gettext
|
||||
|
||||
@ -51,7 +51,7 @@ class DesBrowse:
|
||||
|
||||
self.glade = libglade.GladeXML(glade_file,"top")
|
||||
self.glade.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
})
|
||||
top = self.glade.get_widget("top")
|
||||
tree= self.glade.get_widget("tree1")
|
||||
@ -60,7 +60,7 @@ class DesBrowse:
|
||||
top.show()
|
||||
|
||||
def add_to_tree(self,tree,person):
|
||||
item = gtk.GtkTreeItem(Config.nameof(person))
|
||||
item = gtk.GtkTreeItem(GrampsCfg.nameof(person))
|
||||
item.show()
|
||||
item.connect('button-press-event',self.button_press_event)
|
||||
item.set_data('d',person)
|
||||
|
@ -27,7 +27,7 @@
|
||||
#------------------------------------------------------------------------
|
||||
import os
|
||||
import sort
|
||||
import utils
|
||||
import Utils
|
||||
import string
|
||||
import ListColors
|
||||
import Filter
|
||||
@ -151,7 +151,7 @@ class EventComparison:
|
||||
"on_filter_save_clicked" : self.on_filter_save_clicked,
|
||||
"on_filter_load_clicked" : self.on_filter_load_clicked,
|
||||
"on_apply_clicked" : self.on_apply_clicked,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
top =self.filterDialog.get_widget("filters")
|
||||
@ -224,8 +224,8 @@ class EventComparison:
|
||||
if len(names) > 0:
|
||||
self.filter_combo.set_popdown_strings(names)
|
||||
self.load_dialog.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"combo_insert_text" : utils.combo_insert_text,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"combo_insert_text" : Utils.combo_insert_text,
|
||||
"on_load_filter" : self.on_save_filter,
|
||||
})
|
||||
|
||||
@ -237,8 +237,8 @@ class EventComparison:
|
||||
if len(names) > 0:
|
||||
self.filter_combo.set_popdown_strings(names)
|
||||
self.load_dialog.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"combo_insert_text" : utils.combo_insert_text,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"combo_insert_text" : Utils.combo_insert_text,
|
||||
"on_load_filter" : self.on_load_filter,
|
||||
})
|
||||
|
||||
@ -256,12 +256,12 @@ class EventComparison:
|
||||
name = Filter.get_filter_description(name)
|
||||
self.filter_list_obj.append([name,f.get_text(),invert])
|
||||
self.filter_list_obj.thaw()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_save_filter(self,obj):
|
||||
name = self.load_dialog.get_widget("name").get_text()
|
||||
self.interface.save_filter(name,self.filter_list)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def on_filter_name_changed(self,obj):
|
||||
self.qual = obj.get_data(QUALIFIER)
|
||||
@ -376,7 +376,7 @@ class DisplayChart:
|
||||
self.topDialog = libglade.GladeXML(self.glade_file,"view")
|
||||
self.topDialog.signal_autoconnect({
|
||||
"on_write_table" : self.on_write_table,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
self.top = self.topDialog.get_widget("view")
|
||||
@ -478,7 +478,7 @@ class DisplayChart:
|
||||
self.form.signal_autoconnect({
|
||||
"on_save_clicked" : self.on_save_clicked,
|
||||
"on_html_toggled" : self.on_html_toggled,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
self.save_form = self.form.get_widget("dialog1")
|
||||
self.save_form.show()
|
||||
@ -505,7 +505,7 @@ class DisplayChart:
|
||||
spreadsheet.write_table_data(bottom)
|
||||
|
||||
spreadsheet.finalize()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -26,7 +26,7 @@ import posixpath
|
||||
import re
|
||||
import sort
|
||||
import string
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -155,7 +155,7 @@ def report(database,person):
|
||||
else:
|
||||
boxes.append( (x, y, (personList[id].getGender() == Person.female), id ) )
|
||||
personList[id].setPosition( (x,y) )
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
else:
|
||||
print "just lost person with key %s" % (id)
|
||||
|
||||
@ -368,7 +368,7 @@ def button_release_event(widget, event):
|
||||
id = b[3]
|
||||
person = db.findPersonNoMap(id)
|
||||
person.setPosition( (b[0], b[1]) )
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
redraw_tree( widget )
|
||||
return TRUE
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
import os
|
||||
import intl
|
||||
import Utils
|
||||
|
||||
_ = intl.gettext
|
||||
|
||||
@ -154,7 +155,7 @@ class GraphVizDialog(ReportDialog):
|
||||
"""Build a one item menu of document types that are
|
||||
appropriate for this report."""
|
||||
map = {"Graphviz (dot)" : None}
|
||||
myMenu = utils.build_string_optmenu(map, None)
|
||||
myMenu = Utils.build_string_optmenu(map, None)
|
||||
self.format_menu.set_menu(myMenu)
|
||||
|
||||
def make_document(self):
|
||||
|
@ -24,8 +24,6 @@ import RelLib
|
||||
import const
|
||||
import os
|
||||
import string
|
||||
import utils
|
||||
import Config
|
||||
import intl
|
||||
|
||||
_ = intl.gettext
|
||||
|
@ -21,10 +21,10 @@
|
||||
"Database Processing/Merge people"
|
||||
|
||||
import RelLib
|
||||
import utils
|
||||
import Utils
|
||||
import soundex
|
||||
import intl
|
||||
import Config
|
||||
import GrampsCfg
|
||||
_ = intl.gettext
|
||||
|
||||
import string
|
||||
@ -104,13 +104,13 @@ class Merge:
|
||||
|
||||
top.signal_autoconnect({
|
||||
"on_merge_ok_clicked" : self.on_merge_ok_clicked,
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
def on_merge_ok_clicked(self,obj):
|
||||
active = self.menu.get_menu().get_active().get_data("v")
|
||||
self.use_soundex = self.soundex_obj.get_active()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
self.find_potentials(active)
|
||||
self.show()
|
||||
|
||||
@ -186,7 +186,7 @@ class Merge:
|
||||
self.window = top.get_widget("mergelist")
|
||||
self.mlist = top.get_widget("mlist")
|
||||
top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_do_merge_clicked" : self.on_do_merge_clicked,
|
||||
})
|
||||
self.mlist.connect('button-press-event',self.button_press_event)
|
||||
@ -241,7 +241,7 @@ class Merge:
|
||||
|
||||
def update_and_destroy(self,obj):
|
||||
self.update(1)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
def list_reduce(self,list1,list2):
|
||||
value = 0
|
||||
@ -487,7 +487,7 @@ class Merge:
|
||||
def name_of(p):
|
||||
if not p:
|
||||
return ""
|
||||
return "%s (%s)" % ( Config.nameof(p),p.getId())
|
||||
return "%s (%s)" % ( GrampsCfg.nameof(p),p.getId())
|
||||
|
||||
def get_name_obj(person):
|
||||
if person:
|
||||
|
@ -23,7 +23,7 @@
|
||||
import os
|
||||
import re
|
||||
import intl
|
||||
import utils
|
||||
import Utils
|
||||
|
||||
_ = intl.gettext
|
||||
|
||||
@ -83,7 +83,7 @@ class PatchNames:
|
||||
|
||||
self.top = libglade.GladeXML(glade_file,"summary")
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_ok_clicked" : self.on_ok_clicked
|
||||
})
|
||||
self.top.get_widget("textwindow").show_string(msg)
|
||||
@ -96,15 +96,15 @@ class PatchNames:
|
||||
name = grp[0].getPrimaryName()
|
||||
name.setFirstName(grp[1])
|
||||
grp[0].setNickName(grp[2])
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
for grp in self.title_list:
|
||||
name = grp[0].getPrimaryName()
|
||||
name.setFirstName(grp[2])
|
||||
name.setTitle(grp[1])
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
self.cb(1)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -33,7 +33,7 @@ import os
|
||||
import re
|
||||
import string
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
|
||||
import gtk
|
||||
import gnome.ui
|
||||
@ -93,17 +93,17 @@ def importData(database, filename):
|
||||
statusWindow = statusTop.get_widget("status")
|
||||
statusTop.get_widget("close").set_sensitive(0)
|
||||
statusTop.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
try:
|
||||
g = GedcomParser(database,filename,statusTop)
|
||||
except IOError,msg:
|
||||
utils.destroy_passed_object(statusWindow)
|
||||
Utils.destroy_passed_object(statusWindow)
|
||||
gnome.ui.GnomeErrorDialog(_("%s could not be opened\n") % filename + str(msg))
|
||||
return
|
||||
except:
|
||||
utils.destroy_passed_object(statusWindow)
|
||||
Utils.destroy_passed_object(statusWindow)
|
||||
gnome.ui.GnomeErrorDialog(_("%s could not be opened\n") % filename)
|
||||
return
|
||||
|
||||
@ -111,7 +111,7 @@ def importData(database, filename):
|
||||
|
||||
statusTop.get_widget("close").set_sensitive(1)
|
||||
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
if callback:
|
||||
callback(1)
|
||||
|
||||
@ -803,7 +803,7 @@ class GedcomParser:
|
||||
photo = Photo()
|
||||
photo.setPath(path)
|
||||
photo.setDescription(title)
|
||||
photo.setMimeType(utils.get_mime_type(path))
|
||||
photo.setMimeType(Utils.get_mime_type(path))
|
||||
self.db.addObject(photo)
|
||||
oref = ObjectRef()
|
||||
oref.setReference(photo)
|
||||
@ -838,7 +838,7 @@ class GedcomParser:
|
||||
photo = Photo()
|
||||
photo.setPath(path)
|
||||
photo.setDescription(title)
|
||||
photo.setMimeType(utils.get_mime_type(path))
|
||||
photo.setMimeType(Utils.get_mime_type(path))
|
||||
self.db.addObject(photo)
|
||||
oref = ObjectRef()
|
||||
oref.setReference(photo)
|
||||
@ -873,7 +873,7 @@ class GedcomParser:
|
||||
photo = Photo()
|
||||
photo.setPath(path)
|
||||
photo.setDescription(title)
|
||||
photo.setMimeType(utils.get_mime_type(path))
|
||||
photo.setMimeType(Utils.get_mime_type(path))
|
||||
self.db.addObject(photo)
|
||||
oref = ObjectRef()
|
||||
oref.setReference(photo)
|
||||
@ -1647,7 +1647,7 @@ def on_ok_clicked(obj):
|
||||
else:
|
||||
clear_data = 0
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
importData(db,name)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -1667,7 +1667,7 @@ def readData(database,active_person,cb):
|
||||
glade_file = "%s/gedcomimport.glade" % os.path.dirname(__file__)
|
||||
|
||||
dic = {
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_ok_clicked" : on_ok_clicked
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
import libglade
|
||||
from ReadXML import *
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
|
||||
_ = intl.gettext
|
||||
@ -53,7 +53,7 @@ def readData(database,active_person,cb):
|
||||
glade_file = base + os.sep + "grampsimport.glade"
|
||||
|
||||
dic = {
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_ok_clicked" : on_ok_clicked
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ def on_ok_clicked(obj):
|
||||
name = topDialog.get_widget("filename").get_text()
|
||||
name = name + os.sep + const.indexFile
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
importData(db,name,progress)
|
||||
callback(1)
|
||||
|
||||
|
@ -29,7 +29,7 @@ from libglade import *
|
||||
import RelLib
|
||||
import sort
|
||||
import intl
|
||||
import utils
|
||||
import Utils
|
||||
|
||||
_ = intl.gettext
|
||||
|
||||
@ -319,7 +319,7 @@ class RelCalc:
|
||||
self.people.thaw()
|
||||
|
||||
self.glade.signal_autoconnect({
|
||||
"on_close_clicked" : utils.destroy_passed_object,
|
||||
"on_close_clicked" : Utils.destroy_passed_object,
|
||||
"on_apply_clicked" : self.on_apply_clicked
|
||||
})
|
||||
|
||||
|
@ -24,7 +24,7 @@ scheme specified in the database's prefix ids
|
||||
"""
|
||||
|
||||
import re
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
|
||||
_ = intl.gettext
|
||||
@ -39,7 +39,7 @@ def runTool(database,active_person,callback):
|
||||
make_new_ids(database.getObjectMap(),database.oprefix)
|
||||
make_new_ids(database.getSourceMap(),database.sprefix)
|
||||
make_new_ids(database.getPlaceMap(),database.pprefix)
|
||||
utils.modified()
|
||||
Utils.modified()
|
||||
callback(1)
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ import os
|
||||
import posixpath
|
||||
import re
|
||||
import string
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -45,7 +45,7 @@ def report(database,person):
|
||||
|
||||
topDialog = GladeXML(glade_file,"summary")
|
||||
topDialog.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
})
|
||||
|
||||
personList = database.getPersonMap().values()
|
||||
|
@ -26,7 +26,7 @@ import posixpath
|
||||
import re
|
||||
import sort
|
||||
import string
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -60,7 +60,7 @@ def runTool(database,active_person,callback):
|
||||
verifySettings = GladeXML(glade_file,"verify_settings")
|
||||
|
||||
verifySettings.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_verify_ok_clicked" : on_apply_clicked
|
||||
})
|
||||
|
||||
@ -272,7 +272,7 @@ def on_apply_clicked(obj):
|
||||
verifyResult = GladeXML(glade_file,"verify_result")
|
||||
|
||||
verifyResult.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
})
|
||||
top = verifyResult.get_widget("verify_result")
|
||||
textwindow = verifyResult.get_widget("textwindow")
|
||||
|
@ -24,8 +24,7 @@ from RelLib import *
|
||||
from HtmlDoc import *
|
||||
|
||||
import const
|
||||
import utils
|
||||
import Config
|
||||
import GrampsCfg
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -844,7 +843,7 @@ class WebReportDialog(ReportDialog):
|
||||
"""Get the name of the directory to which the target dialog
|
||||
box should default. This value can be set in the preferences
|
||||
panel."""
|
||||
return Config.web_dir
|
||||
return GrampsCfg.web_dir
|
||||
|
||||
def set_default_directory(self, value):
|
||||
"""Save the name of the current directory, so that any future
|
||||
@ -854,7 +853,7 @@ class WebReportDialog(ReportDialog):
|
||||
This means that the last directory used will only be
|
||||
remembered for this session of gramps unless the user saves
|
||||
his/her preferences."""
|
||||
Config.web_dir = value
|
||||
GrampsCfg.web_dir = value
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -25,7 +25,7 @@ import os
|
||||
import string
|
||||
import time
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
import Date
|
||||
_ = intl.gettext
|
||||
@ -410,7 +410,7 @@ class GedcomWriter:
|
||||
|
||||
self.topDialog = libglade.GladeXML(glade_file,"gedcomExport")
|
||||
self.topDialog.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_ok_clicked" : self.on_ok_clicked
|
||||
})
|
||||
|
||||
@ -484,13 +484,13 @@ class GedcomWriter:
|
||||
|
||||
(self.plist,self.flist,self.slist) = filter(self.db,self.person,self.private)
|
||||
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
glade_file = "%s/gedcomexport.glade" % os.path.dirname(__file__)
|
||||
|
||||
self.exprogress = libglade.GladeXML(glade_file,"exportprogress")
|
||||
self.exprogress.signal_autoconnect({
|
||||
"on_close_clicked" : utils.destroy_passed_object
|
||||
"on_close_clicked" : Utils.destroy_passed_object
|
||||
})
|
||||
|
||||
self.fbar = self.exprogress.get_widget("fbar")
|
||||
@ -499,7 +499,7 @@ class GedcomWriter:
|
||||
self.progress = self.exprogress.get_widget('exportprogress')
|
||||
|
||||
closebtn = self.exprogress.get_widget("close")
|
||||
closebtn.connect("clicked",utils.destroy_passed_object)
|
||||
closebtn.connect("clicked",Utils.destroy_passed_object)
|
||||
closebtn.set_sensitive(0)
|
||||
|
||||
self.export_data(name)
|
||||
|
@ -25,7 +25,7 @@ import os
|
||||
import string
|
||||
import time
|
||||
import const
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -531,7 +531,7 @@ def on_ok_clicked(obj):
|
||||
filter()
|
||||
|
||||
exportData(db,name)
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -550,7 +550,7 @@ def writeData(database,person):
|
||||
glade_file = base + os.sep + "pafexport.glade"
|
||||
|
||||
dic = {
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_ok_clicked" : on_ok_clicked
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ import WriteXML
|
||||
import time
|
||||
import os
|
||||
import TarFile
|
||||
import utils
|
||||
import Utils
|
||||
import libglade
|
||||
|
||||
from cStringIO import StringIO
|
||||
@ -46,7 +46,7 @@ def writeData(database,person):
|
||||
glade_file = base + os.sep + "pkgexport.glade"
|
||||
|
||||
dic = {
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_ok_clicked" : on_ok_clicked
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ def on_ok_clicked(obj):
|
||||
global topDialog
|
||||
|
||||
name = topDialog.get_widget("filename").get_text()
|
||||
utils.destroy_passed_object(obj)
|
||||
Utils.destroy_passed_object(obj)
|
||||
exportData(db,name)
|
||||
|
||||
def callback(a):
|
||||
|
@ -26,7 +26,7 @@ import posixpath
|
||||
import re
|
||||
import sort
|
||||
import string
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
_ = intl.gettext
|
||||
|
||||
@ -40,7 +40,7 @@ def report(database,person):
|
||||
glade_file = base + os.sep + "summary.glade"
|
||||
topDialog = GladeXML(glade_file,"summary")
|
||||
topDialog.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
})
|
||||
thisgen = []
|
||||
allgen = []
|
||||
|
@ -28,7 +28,7 @@ from libglade import *
|
||||
|
||||
import RelLib
|
||||
import soundex
|
||||
import utils
|
||||
import Utils
|
||||
import intl
|
||||
|
||||
_ = intl.gettext
|
||||
@ -50,8 +50,8 @@ class SoundGen:
|
||||
|
||||
self.glade = GladeXML(glade_file,"soundEx")
|
||||
self.glade.signal_autoconnect({
|
||||
"destroy_passed_object" : utils.destroy_passed_object,
|
||||
"on_combo_insert_text" : utils.combo_insert_text,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"on_combo_insert_text" : Utils.combo_insert_text,
|
||||
"on_apply_clicked" : self.on_apply_clicked,
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user