From bcc9235ac8d0b91097ed5b90403176986d9e03a9 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 24 Aug 2006 20:11:23 +0000 Subject: [PATCH] * src/DataViews/_FamilyList.py: Add column editor. svn: r7254 --- ChangeLog | 1 + src/DataViews/_FamilyList.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 997aea11e..bb9fd5180 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 2006-08-24 Alex Roitman + * src/DataViews/_FamilyList.py: Add column editor. * src/plugins/ChangeTypes.py (run_tool): Properly set the new type. (on_apply_clicked): Properly save entered types, including custom. diff --git a/src/DataViews/_FamilyList.py b/src/DataViews/_FamilyList.py index 4f33311c6..bb8464628 100644 --- a/src/DataViews/_FamilyList.py +++ b/src/DataViews/_FamilyList.py @@ -39,6 +39,7 @@ from Filters.SideBar import FamilySidebarFilter # #------------------------------------------------------------------------- from gettext import gettext as _ +import gtk column_names = [ _('ID'), @@ -83,6 +84,8 @@ class FamilyListView(PageView.ListView): # add the Forward action group to handle the Forward button PageView.ListView.define_actions(self) + self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES, + _('_Column Editor'), callback=self.column_editor) self.add_action('FilterEdit', None, _('Family Filter Editor'), callback=self.filter_editor,) @@ -125,6 +128,20 @@ class FamilyListView(PageView.ListView): def column_order(self): return self.dbstate.db.get_family_list_column_order() + def column_editor(self,obj): + import ColumnOrder + + ColumnOrder.ColumnOrder( + _('Select Family List Columns'), + self.uistate, + self.dbstate.db.get_family_list_column_order(), + column_names, + self.set_column_order) + + def set_column_order(self,list): + self.dbstate.db.set_family_list_column_order(list) + self.build_columns() + def get_stock(self): return 'gramps-family-list'