* src/plugins/BookReport.py: Added to CVS.

* src/plugins/book.glade: Likewise.
* src/ListModel.py: (insert, get_data): Added new methods.
* src/SelectPerson.py: Added to CVS.
* src/choose.glade: Likewise.


svn: r1627
This commit is contained in:
Alex Roitman
2003-06-02 13:34:18 +00:00
parent 1b709b4ae6
commit 7bc3f3bf1b
5 changed files with 1208 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
# Copyright (C) 2000-2003 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -177,6 +177,21 @@ class ListModel:
self.selection.select_iter(iter)
return iter
def insert(self,position,data,info=None,select=0):
self.count = self.count + 1
iter = self.model.insert(position)
col = 0
for object in data:
self.model.set_value(iter,col,object)
col = col + 1
self.model.set_value(iter,col,info)
if select:
self.selection.select_iter(iter)
return iter
def get_data(self,iter,cols):
return [ self.model.get_value(iter,c) for c in cols ]
def add_and_select(self,data,info=None):
self.count = self.count + 1
iter = self.model.append()