* src/DisplayModels.py: fix place and source lists
* src/PlaceView.py: fix place lists * src/SourceView.py: fix source lists svn: r3515
This commit is contained in:
parent
1dc536fd60
commit
2be6aaa660
@ -1,4 +1,7 @@
|
||||
2004-08-26 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/DisplayModels.py: fix place and source lists
|
||||
* src/PlaceView.py: fix place lists
|
||||
* src/SourceView.py: fix source lists
|
||||
* src/Sort.py: use locale.strcoll for sorting
|
||||
* src/RelLib.py: don't use accent for sort name
|
||||
* src/EditPerson.py: compare edited ID value properly
|
||||
|
@ -64,7 +64,7 @@ class BaseModel(gtk.GenericTreeModel):
|
||||
return gtk.TREE_MODEL_LIST_ONLY | gtk.TREE_MODEL_ITERS_PERSIST
|
||||
|
||||
def on_get_n_columns(self):
|
||||
return 10
|
||||
return 1
|
||||
|
||||
def on_get_path(self, node):
|
||||
'''returns the tree path (a tuple of indices at the various
|
||||
@ -136,12 +136,19 @@ class SourceModel(BaseModel):
|
||||
self.column_abbrev,
|
||||
self.column_pubinfo,
|
||||
self.column_change,
|
||||
self.column_handle,
|
||||
]
|
||||
BaseModel.__init__(self,db)
|
||||
|
||||
def on_get_n_columns(self):
|
||||
return len(self.fmap)+1
|
||||
|
||||
def column_title(self,data):
|
||||
return unicode(data[2])
|
||||
|
||||
def column_handle(self,data):
|
||||
return unicode(data[0])
|
||||
|
||||
def column_author(self,data):
|
||||
return unicode(data[3])
|
||||
|
||||
@ -182,6 +189,9 @@ class PlaceModel(BaseModel):
|
||||
]
|
||||
BaseModel.__init__(self,db)
|
||||
|
||||
def on_get_n_columns(self):
|
||||
return len(self.fmap)+1
|
||||
|
||||
def column_handle(self,data):
|
||||
return unicode(data[0])
|
||||
|
||||
@ -251,6 +261,9 @@ class MediaModel(BaseModel):
|
||||
]
|
||||
BaseModel.__init__(self,db)
|
||||
|
||||
def on_get_n_columns(self):
|
||||
return len(self.fmap)+1
|
||||
|
||||
def column_description(self,data):
|
||||
return unicode(data[4])
|
||||
|
||||
|
@ -127,7 +127,9 @@ class PlaceView:
|
||||
mlist = []
|
||||
self.selection.selected_foreach(self.blist,mlist)
|
||||
if mlist:
|
||||
EditPlace.EditPlace(self.parent,mlist[0],self.update_display,self.topWindow)
|
||||
place = self.parent.db.get_place_from_handle(mlist[0])
|
||||
EditPlace.EditPlace(self.parent,place,self.update_display,
|
||||
self.topWindow)
|
||||
return 1
|
||||
elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
||||
self.build_context_menu(event)
|
||||
@ -238,8 +240,7 @@ class PlaceView:
|
||||
EditPlace.EditPlace(self.parent, place, self.update_display)
|
||||
|
||||
def blist(self,store,path,iter,list):
|
||||
print iter, _HANDLE_COL
|
||||
handle = self.parent.db.get_place_from_handle(store.get_value(iter,_HANDLE_COL))
|
||||
handle = store.get_value(iter,_HANDLE_COL)
|
||||
list.append(handle)
|
||||
|
||||
def merge(self):
|
||||
|
@ -42,7 +42,7 @@ import const
|
||||
|
||||
from QuestionDialog import QuestionDialog
|
||||
|
||||
_HANDLE_COL = 5
|
||||
_HANDLE_COL = 7
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -241,6 +241,7 @@ class SourceView:
|
||||
list_store, node = self.selection.get_selected()
|
||||
if node:
|
||||
handle = list_store.get_value(node,_HANDLE_COL)
|
||||
print handle
|
||||
source = self.parent.db.get_source_from_handle(handle)
|
||||
EditSource.EditSource(source, self.parent.db, self.parent,
|
||||
self.topWindow, self.update_display)
|
||||
|
Loading…
Reference in New Issue
Block a user