pychecker fixes
svn: r6409
This commit is contained in:
parent
0158575672
commit
6fbe1c9e70
@ -77,7 +77,7 @@ from DdTargets import DdTargets
|
|||||||
from DisplayTabs import *
|
from DisplayTabs import *
|
||||||
from GrampsWidgets import *
|
from GrampsWidgets import *
|
||||||
|
|
||||||
from ObjectSelector import PersonSelector,PersonFilterSpec
|
#from ObjectSelector import PersonSelector,PersonFilterSpec
|
||||||
|
|
||||||
from SelectPerson import SelectPerson
|
from SelectPerson import SelectPerson
|
||||||
|
|
||||||
@ -216,15 +216,12 @@ class ChildEmbedList(EmbeddedList):
|
|||||||
self.rebuild()
|
self.rebuild()
|
||||||
|
|
||||||
def share_button_clicked(self,obj):
|
def share_button_clicked(self,obj):
|
||||||
from SelectPerson import SelectPerson
|
|
||||||
|
|
||||||
# it only makes sense to skip those who are already in the family
|
# it only makes sense to skip those who are already in the family
|
||||||
|
|
||||||
skip = [self.family.get_father_handle(), self.family.get_mother_handle()] + \
|
skip_list = [self.family.get_father_handle(), self.family.get_mother_handle()] + \
|
||||||
[x.ref for x in self.family.get_child_ref_list() ]
|
[x.ref for x in self.family.get_child_ref_list() ]
|
||||||
|
|
||||||
sel = SelectPerson(self.dbstate.db, "Select Child",
|
sel = SelectPerson(self.dbstate.db, "Select Child", skip=skip_list)
|
||||||
skip=[ x for x in skip if x])
|
|
||||||
person = sel.run()
|
person = sel.run()
|
||||||
|
|
||||||
if person:
|
if person:
|
||||||
@ -234,8 +231,8 @@ class ChildEmbedList(EmbeddedList):
|
|||||||
self.rebuild()
|
self.rebuild()
|
||||||
|
|
||||||
def run(self,skip):
|
def run(self,skip):
|
||||||
SelectPerson(self.dbstate.db, "Select Child",
|
skip_list = [ x for x in skip if x]
|
||||||
skip=[ x for x in skip if x])
|
SelectPerson(self.dbstate.db, "Select Child", skip=skip_list)
|
||||||
|
|
||||||
def del_button_clicked(self,obj):
|
def del_button_clicked(self,obj):
|
||||||
handle = self.get_selected()
|
handle = self.get_selected()
|
||||||
@ -273,8 +270,8 @@ class ChildEmbedList(EmbeddedList):
|
|||||||
mother_handle = self.family.get_mother_handle()
|
mother_handle = self.family.get_mother_handle()
|
||||||
if not father_handle or not mother_handle:
|
if not father_handle or not mother_handle:
|
||||||
return ("","")
|
return ("","")
|
||||||
father = self.db.db.get_person_from_handle(father_handle)
|
father = self.dbstate.db.get_person_from_handle(father_handle)
|
||||||
mother = self.db.db.get_person_from_handle(mother_handle)
|
mother = self.dbstate.db.get_person_from_handle(mother_handle)
|
||||||
fsn = father.get_primary_name().get_surname()
|
fsn = father.get_primary_name().get_surname()
|
||||||
msn = mother.get_primary_name().get_surname()
|
msn = mother.get_primary_name().get_surname()
|
||||||
if not father or not mother:
|
if not father or not mother:
|
||||||
@ -522,8 +519,6 @@ class EditFamily(EditPrimary):
|
|||||||
self.obj.set_mother_handle(None)
|
self.obj.set_mother_handle(None)
|
||||||
self.update_mother(None)
|
self.update_mother(None)
|
||||||
else:
|
else:
|
||||||
from SelectPerson import SelectPerson
|
|
||||||
|
|
||||||
data_filter = FastFemaleFilter(self.dbstate.db)
|
data_filter = FastFemaleFilter(self.dbstate.db)
|
||||||
sel = SelectPerson(self.dbstate.db, "Select Mother",
|
sel = SelectPerson(self.dbstate.db, "Select Mother",
|
||||||
filter=data_filter,
|
filter=data_filter,
|
||||||
@ -593,8 +588,6 @@ class EditFamily(EditPrimary):
|
|||||||
self.obj.set_father_handle(None)
|
self.obj.set_father_handle(None)
|
||||||
self.update_father(None)
|
self.update_father(None)
|
||||||
else:
|
else:
|
||||||
from SelectPerson import SelectPerson
|
|
||||||
|
|
||||||
data_filter = FastMaleFilter(self.dbstate.db)
|
data_filter = FastMaleFilter(self.dbstate.db)
|
||||||
sel = SelectPerson(self.dbstate.db, "Select Father",
|
sel = SelectPerson(self.dbstate.db, "Select Father",
|
||||||
filter=data_filter,
|
filter=data_filter,
|
||||||
|
@ -46,7 +46,6 @@ import Utils
|
|||||||
import RelLib
|
import RelLib
|
||||||
import Mime
|
import Mime
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import GrampsDisplay
|
|
||||||
|
|
||||||
from DisplayTabs import *
|
from DisplayTabs import *
|
||||||
from GrampsWidgets import *
|
from GrampsWidgets import *
|
||||||
|
@ -96,12 +96,11 @@ class EditRepoRef(EditReference):
|
|||||||
self.source.get_name,
|
self.source.get_name,
|
||||||
False)
|
False)
|
||||||
|
|
||||||
self.type_selector = MonitoredType(
|
self.type_selector = MonitoredDataType(
|
||||||
self.top.get_widget("media_type"),
|
self.top.get_widget("media_type"),
|
||||||
self.source_ref.set_media_type,
|
self.source_ref.set_media_type,
|
||||||
self.source_ref.get_media_type,
|
self.source_ref.get_media_type
|
||||||
dict(Utils.source_media_types),
|
)
|
||||||
RelLib.RepoRef.CUSTOM)
|
|
||||||
|
|
||||||
self.media_type_selector = MonitoredDataType(
|
self.media_type_selector = MonitoredDataType(
|
||||||
self.top.get_widget("repo_type"),
|
self.top.get_widget("repo_type"),
|
||||||
|
@ -48,7 +48,6 @@ import gtk.glade
|
|||||||
import const
|
import const
|
||||||
import Utils
|
import Utils
|
||||||
import RelLib
|
import RelLib
|
||||||
import DisplayState
|
|
||||||
|
|
||||||
from DisplayTabs import *
|
from DisplayTabs import *
|
||||||
from GrampsWidgets import *
|
from GrampsWidgets import *
|
||||||
|
@ -52,7 +52,7 @@ import PeopleModel
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class SelectPerson:
|
class SelectPerson:
|
||||||
|
|
||||||
def __init__(self, db, title, filter=None, skip=[], parent_window=None):
|
def __init__(self, db, title, filter=None, skip=[]):
|
||||||
|
|
||||||
self.renderer = gtk.CellRendererText()
|
self.renderer = gtk.CellRendererText()
|
||||||
self.renderer.set_property('ellipsize',pango.ELLIPSIZE_END)
|
self.renderer.set_property('ellipsize',pango.ELLIPSIZE_END)
|
||||||
@ -84,9 +84,6 @@ class SelectPerson:
|
|||||||
self.plist.set_model(self.model)
|
self.plist.set_model(self.model)
|
||||||
self.top.show()
|
self.top.show()
|
||||||
|
|
||||||
if parent_window:
|
|
||||||
self.top.set_transient_for(parent_window)
|
|
||||||
|
|
||||||
def foo(self):
|
def foo(self):
|
||||||
PeopleModel.PeopleModel(self.db)
|
PeopleModel.PeopleModel(self.db)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user