From 274bf75fd119fd4698638358aaa842b480349743 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Tue, 10 Feb 2015 17:26:14 +0000 Subject: [PATCH] Swap description and main participants columns Change column order introduced in #7342 due to adverse comments on mailing list. --- gramps/gui/editors/displaytabs/eventembedlist.py | 9 +++++---- gramps/gui/editors/displaytabs/eventrefmodel.py | 2 +- gramps/plugins/gramplet/events.py | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gramps/gui/editors/displaytabs/eventembedlist.py b/gramps/gui/editors/displaytabs/eventembedlist.py index 1a2d2adbc..61997d209 100644 --- a/gramps/gui/editors/displaytabs/eventembedlist.py +++ b/gramps/gui/editors/displaytabs/eventembedlist.py @@ -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 diff --git a/gramps/gui/editors/displaytabs/eventrefmodel.py b/gramps/gui/editors/displaytabs/eventrefmodel.py index 7ee68c56b..16eb72fc0 100644 --- a/gramps/gui/editors/displaytabs/eventrefmodel.py +++ b/gramps/gui/editors/displaytabs/eventrefmodel.py @@ -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): diff --git a/gramps/plugins/gramplet/events.py b/gramps/plugins/gramplet/events.py index 59a31f4f1..86ad250d8 100644 --- a/gramps/plugins/gramplet/events.py +++ b/gramps/plugins/gramplet/events.py @@ -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):