* src/DataViews/_FamilyList.py: Add column editor.
svn: r7254
This commit is contained in:
parent
cf0f126731
commit
bcc9235ac8
@ -1,4 +1,5 @@
|
|||||||
2006-08-24 Alex Roitman <shura@gramps-project.org>
|
2006-08-24 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/DataViews/_FamilyList.py: Add column editor.
|
||||||
* src/plugins/ChangeTypes.py (run_tool): Properly set the new type.
|
* src/plugins/ChangeTypes.py (run_tool): Properly set the new type.
|
||||||
(on_apply_clicked): Properly save entered types, including custom.
|
(on_apply_clicked): Properly save entered types, including custom.
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ from Filters.SideBar import FamilySidebarFilter
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
import gtk
|
||||||
|
|
||||||
column_names = [
|
column_names = [
|
||||||
_('ID'),
|
_('ID'),
|
||||||
@ -83,6 +84,8 @@ class FamilyListView(PageView.ListView):
|
|||||||
# add the Forward action group to handle the Forward button
|
# add the Forward action group to handle the Forward button
|
||||||
|
|
||||||
PageView.ListView.define_actions(self)
|
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'),
|
self.add_action('FilterEdit', None, _('Family Filter Editor'),
|
||||||
callback=self.filter_editor,)
|
callback=self.filter_editor,)
|
||||||
@ -125,6 +128,20 @@ class FamilyListView(PageView.ListView):
|
|||||||
def column_order(self):
|
def column_order(self):
|
||||||
return self.dbstate.db.get_family_list_column_order()
|
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):
|
def get_stock(self):
|
||||||
return 'gramps-family-list'
|
return 'gramps-family-list'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user