column editing

svn: r6085
This commit is contained in:
Don Allingham
2006-03-05 23:39:20 +00:00
parent 5ca9930d30
commit 9ffa6613a7
17 changed files with 131 additions and 293 deletions

View File

@@ -95,6 +95,7 @@ class EventView(PageView.ListView):
<menuitem action="Edit"/>
<menuitem action="Remove"/>
</placeholder>
<menuitem action="ColumnEdit"/>
</menu>
</menubar>
<toolbar name="ToolBar">
@@ -111,6 +112,21 @@ class EventView(PageView.ListView):
</popup>
</ui>'''
def define_actions(self):
PageView.ListView.define_actions(self)
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
'_Column Editor', callback=self.column_editor),
def column_editor(self,obj):
import ColumnOrder
ColumnOrder.ColumnOrder(self.dbstate.db.get_event_column_order(),
column_names, self.set_column_order)
def set_column_order(self,list):
self.dbstate.db.set_event_column_order(list)
self.build_columns()
def on_double_click(self,obj,event):
handle = self.first_selected()
the_event = self.dbstate.db.get_event_from_handle(handle)