diff --git a/gramps2/src/MediaView.py b/gramps2/src/MediaView.py index 672950651..612196760 100644 --- a/gramps2/src/MediaView.py +++ b/gramps2/src/MediaView.py @@ -56,9 +56,6 @@ from QuestionDialog import QuestionDialog, ErrorDialog #------------------------------------------------------------------------- from intl import gettext as _ -_column_headers = [(_('Title'),4,350), (_('ID'),1,50), (_('Type'),2,70), - ('Path',3,150), ('',4,0) ] - #------------------------------------------------------------------------- # # MediaView @@ -75,11 +72,14 @@ class MediaView: self.mdetails = glade.get_widget("mdetails") self.preview = glade.get_widget("preview") + self.column_headers = [(_('Title'),4,350), (_('ID'),1,50), + (_('Type'),2,70), ('Path',3,150), ('',4,0) ] + self.id2col = {} self.selection = self.list.get_selection() colno = 0 - for title in _column_headers: + for title in self.column_headers: renderer = gtk.CellRendererText () column = gtk.TreeViewColumn (title[0], renderer, text=colno) colno = colno + 1 diff --git a/gramps2/src/PlaceView.py b/gramps2/src/PlaceView.py index 811f35ece..bbe571400 100644 --- a/gramps2/src/PlaceView.py +++ b/gramps2/src/PlaceView.py @@ -43,21 +43,6 @@ import Utils from QuestionDialog import QuestionDialog, ErrorDialog from intl import gettext as _ -_column_headers = [ - (_('Place Name'),7,200), - (_('ID'),1,50), - (_('Church Parish'),8,75), - (_('City'),9,75), - (_('County'),10,75), - (_('State'),11,75), - (_('Country'),12,75), - ('',7,0), - ('',8,0), - ('',9,0), - ('',10,0), - ('',11,0), - ('',12,0)] - #------------------------------------------------------------------------- # # PlaceView class @@ -71,13 +56,19 @@ class PlaceView: self.list = glade.get_widget("place_list") self.update = update + self.column_headers = [ + (_('Place Name'),7,200), (_('ID'),1,50), (_('Church Parish'),8,75), + (_('City'),9,75), (_('County'),10,75), (_('State'),11,75), + (_('Country'),12,75), ('',7,0), ('',8,0), ('',9,0), ('',10,0), + ('',11,0), ('',12,0)] + self.active = None self.id2col = {} self.selection = self.list.get_selection() self.selection.set_mode(gtk.SELECTION_MULTIPLE) colno = 0 - for title in _column_headers: + for title in self.column_headers: renderer = gtk.CellRendererText () column = gtk.TreeViewColumn (title[0], renderer, text=colno) colno = colno + 1 diff --git a/gramps2/src/SourceView.py b/gramps2/src/SourceView.py index ca6148499..91a22efca 100644 --- a/gramps2/src/SourceView.py +++ b/gramps2/src/SourceView.py @@ -51,8 +51,6 @@ from QuestionDialog import QuestionDialog #------------------------------------------------------------------------- from intl import gettext as _ -_column_headers = [(_('Title'),3,350),(_('ID'),1,50),(_('Author'),4,70),('',3,0),('',4,0) ] - #------------------------------------------------------------------------- # # SouceView @@ -66,7 +64,11 @@ class SourceView: self.list = glade.get_widget("source_list") self.selection = self.list.get_selection() colno = 0 - for title in _column_headers: + + self.column_headers = [(_('Title'),3,350),(_('ID'),1,50), + (_('Author'),4,70),('',3,0),('',4,0) ] + + for title in self.column_headers: renderer = gtk.CellRendererText () column = gtk.TreeViewColumn (title[0], renderer, text=colno) colno = colno + 1 diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index c3ffd5e9c..8fe16bf9f 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -90,10 +90,6 @@ _HOMEPAGE = "http://gramps.sourceforge.net" _MAILLIST = "http://sourceforge.net/mail/?group_id=25770" _BUGREPORT = "http://sourceforge.net/tracker/?group_id=25770&atid=385137" -pl_titles = [ (_('Name'),5,250), (_('ID'),1,50),(_('Gender'),2,70), - (_('Birth date'),6,150),(_('Death date'),7,150), ('',5,0), - ('',6,0), ('',7,0) ] - _sel_mode = gtk.SELECTION_MULTIPLE #------------------------------------------------------------------------- @@ -105,6 +101,10 @@ class Gramps: def __init__(self,arg): + self.pl_titles = [ (_('Name'),5,250), (_('ID'),1,50),(_('Gender'),2,70), + (_('Birth date'),6,150),(_('Death date'),7,150), ('',5,0), + ('',6,0), ('',7,0) ] + self.program = gnome.program_init("gramps",const.version) self.DataFilter = Filter.Filter("") @@ -189,8 +189,9 @@ class Gramps: self.pl_other = self.gtop.get_widget("pl_other") self.ptabs.set_show_tabs(0) + self.pl_page = [ - ListModel.ListModel(self.pl_other, pl_titles, self.row_changed, + ListModel.ListModel(self.pl_other, self.pl_titles, self.row_changed, self.alpha_event, _sel_mode), ] @@ -1445,7 +1446,7 @@ class Gramps: tree.show() display.add(tree) display.show() - model = ListModel.ListModel(tree,pl_titles,self.row_changed, + model = ListModel.ListModel(tree,self.pl_titles,self.row_changed, self.alpha_event,_sel_mode) self.alpha_page[pg] = model for index in range(0,len(self.tab_list)):