2006-12-14 Alex Roitman <shura@gramps-project.org>
* src/plugins/ChangeNames.py (toggled): Add method; (display): Connect renderer to the handling method. svn: r7803
This commit is contained in:
parent
4b0f76bfcf
commit
1e3441f4a6
@ -1,3 +1,7 @@
|
|||||||
|
2006-12-14 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/plugins/ChangeNames.py (toggled): Add method;
|
||||||
|
(display): Connect renderer to the handling method.
|
||||||
|
|
||||||
2006-12-14 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2006-12-14 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/Selectors/_SelectPerson.py: Enable markup for bith date column
|
* src/Selectors/_SelectPerson.py: Enable markup for bith date column
|
||||||
to enable birth fallback in italics (closes #763)
|
to enable birth fallback in italics (closes #763)
|
||||||
|
@ -108,6 +108,7 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
|||||||
self.model = gtk.ListStore(bool, str, str)
|
self.model = gtk.ListStore(bool, str, str)
|
||||||
|
|
||||||
r = gtk.CellRendererToggle()
|
r = gtk.CellRendererToggle()
|
||||||
|
r.connect('toggled',self.toggled)
|
||||||
c = gtk.TreeViewColumn(_('Select'),r,active=0)
|
c = gtk.TreeViewColumn(_('Select'),r,active=0)
|
||||||
self.list.append_column(c)
|
self.list.append_column(c)
|
||||||
|
|
||||||
@ -125,7 +126,7 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
|||||||
self.progress.set_pass(_('Building display'),len(self.name_list))
|
self.progress.set_pass(_('Building display'),len(self.name_list))
|
||||||
for name in self.name_list:
|
for name in self.name_list:
|
||||||
handle = self.model.append()
|
handle = self.model.append()
|
||||||
self.model.set_value(handle,0,1)
|
self.model.set_value(handle,0,True)
|
||||||
self.model.set_value(handle,1,name)
|
self.model.set_value(handle,1,name)
|
||||||
self.model.set_value(handle,2,name.capitalize())
|
self.model.set_value(handle,2,name.capitalize())
|
||||||
self.iter_list.append(handle)
|
self.iter_list.append(handle)
|
||||||
@ -134,6 +135,11 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
|||||||
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
|
def toggled(self,cell,path_string):
|
||||||
|
path = tuple([int (i) for i in path_string.split(':')])
|
||||||
|
row = self.model[path]
|
||||||
|
row[0] = not row[0]
|
||||||
|
|
||||||
def build_menu_names(self,obj):
|
def build_menu_names(self,obj):
|
||||||
return (self.label,None)
|
return (self.label,None)
|
||||||
|
|
||||||
@ -144,10 +150,9 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
|||||||
def on_ok_clicked(self,obj):
|
def on_ok_clicked(self,obj):
|
||||||
self.trans = self.db.transaction_begin("",batch=True)
|
self.trans = self.db.transaction_begin("",batch=True)
|
||||||
self.db.disable_signals()
|
self.db.disable_signals()
|
||||||
changelist = []
|
changelist = [self.model.get_value(node,1)
|
||||||
for node in self.iter_list:
|
for node in self.iter_list
|
||||||
if self.model.get_value(node,0):
|
if self.model.get_value(node,0)]
|
||||||
changelist.append(self.model.get_value(node,1))
|
|
||||||
|
|
||||||
anychange = False
|
anychange = False
|
||||||
for handle in self.db.get_person_handles():
|
for handle in self.db.get_person_handles():
|
||||||
|
Loading…
Reference in New Issue
Block a user