Swap description and main participants columns

Change column order introduced in #7342 due to adverse comments
on mailing list.
This commit is contained in:
Nick Hall 2015-02-10 17:26:14 +00:00
parent dadb588d83
commit bef5ed6386
3 changed files with 10 additions and 9 deletions

View File

@ -72,7 +72,8 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
#index = column in model. Value =
# (name, sortcol in model, width, markup/text, weigth_col
_column_names = [
(_('Description'), EventRefModel.COL_DESCR[0], 150, TEXT_COL, -1, None),
(_('Description'), EventRefModel.COL_DESCR[0], 240, TEXT_COL,
EventRefModel.COL_FONTWEIGHT[0], None),
(_('Type'), EventRefModel.COL_TYPE[0], 120, TEXT_COL,
EventRefModel.COL_FONTWEIGHT[0], None),
(_('ID'), EventRefModel.COL_GID[0], 60, TEXT_COL, -1, None),
@ -80,7 +81,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
(_('Place'), EventRefModel.COL_PLACE[0], 240, 0, -1, None),
(_('Role'), EventRefModel.COL_ROLE[0], 80, TEXT_COL, -1, None),
(_('Main Participants'), EventRefModel.COL_PARTIC[0], 240, TEXT_COL,
EventRefModel.COL_FONTWEIGHT[0], None),
-1, None),
None,
None,
None,
@ -191,10 +192,10 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
tuples (show/noshow, model column)
"""
return ((1, 1), # type
(1, 6), # main participants
(1, 0), # description
(1, 3), # date
(1, 4), # place
(1, 0), # description
(1, 6), # main participants
(1, 12), # private
(1, 5), # role
(1, 2), # gramps id

View File

@ -112,7 +112,7 @@ class EventRefModel(Gtk.TreeStore):
def row_group(self, index, group):
name = self.namegroup(index, len(group))
spouse = self.groups[index][2]
return ['', name, '', '', '', '', spouse, '', (index, None),
return [spouse, name, '', '', '', '', '', '', (index, None),
WEIGHT_BOLD, '', '', None]
def namegroup(self, groupindex, length):

View File

@ -73,13 +73,13 @@ class Events(Gramplet, DbGUIElement):
top = Gtk.TreeView()
titles = [('', NOSORT, 50,),
(_('Type'), 1, 100),
(_('Main Participants'), 2, 200),
(_('Description'), 2, 150),
(_('Date'), 3, 100),
('', NOSORT, 50),
(_('Age'), 4, 100),
('', NOSORT, 50),
(_('Place'), 5, 400),
(_('Description'), 6, 150),
(_('Main Participants'), 6, 200),
(_('Role'), 7, 100)]
self.model = ListModel(top, titles, event_func=self.edit_event)
return top
@ -101,13 +101,13 @@ class Events(Gramplet, DbGUIElement):
self.model.add((event.get_handle(),
str(event.get_type()),
participants,
event.get_description(),
event_date,
event_sort,
person_age,
person_age_sort,
place,
event.get_description(),
participants,
str(event_ref.get_role())))
def column_age(self, event):