* src/ColumnOrder.py: use ManagedWindow
* src/DataViews/_MediaView.py: ColumnOrder update * src/DataViews/_RepositoryView.py: ColumnOrder update * src/DataViews/_SourceView.py: ColumnOrder update * src/DataViews/_EventView.py: ColumnOrder update * src/DataViews/_PlaceView.py: ColumnOrder update * src/DataViews/_PersonView.py: ColumnOrder update svn: r6424
This commit is contained in:
parent
5f759817c4
commit
3274d3dad9
@ -1,4 +1,11 @@
|
||||
2006-04-23 Don Allingham <don@gramps-project.org>
|
||||
* src/ColumnOrder.py: use ManagedWindow
|
||||
* src/DataViews/_MediaView.py: ColumnOrder update
|
||||
* src/DataViews/_RepositoryView.py: ColumnOrder update
|
||||
* src/DataViews/_SourceView.py: ColumnOrder update
|
||||
* src/DataViews/_EventView.py: ColumnOrder update
|
||||
* src/DataViews/_PlaceView.py: ColumnOrder update
|
||||
* src/DataViews/_PersonView.py: ColumnOrder update
|
||||
* src/ColumnOrder.py: preserved column width
|
||||
* src/GrampsCfg.py: remove familyview stuff
|
||||
* src/plugins/TestcaseGenerator.py: fix BIRTH, DEATH constants
|
||||
|
@ -23,12 +23,13 @@
|
||||
# GTK/Gnome modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gobject
|
||||
import gtk.glade
|
||||
|
||||
import const
|
||||
from gettext import gettext as _
|
||||
|
||||
import ManagedWindow
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# set up logging
|
||||
@ -37,16 +38,21 @@ from gettext import gettext as _
|
||||
import logging
|
||||
log = logging.getLogger(".ColumnOrder")
|
||||
|
||||
class ColumnOrder:
|
||||
class ColumnOrder(ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, uistate, arglist, column_names, callback):
|
||||
|
||||
ManagedWindow.ManagedWindow.__init__(self, uistate, [], self)
|
||||
|
||||
def __init__(self,arglist,column_names,callback):
|
||||
self.glade = gtk.glade.XML(const.gladeFile,"columns","gramps")
|
||||
self.top = self.glade.get_widget('columns')
|
||||
|
||||
self.set_window(self.glade.get_widget('columns'))
|
||||
|
||||
self.tree = self.glade.get_widget('list')
|
||||
self.arglist = arglist
|
||||
self.callback = callback
|
||||
|
||||
self.top.set_title("%s - GRAMPS" % _('Select Columns'))
|
||||
self.window.set_title("%s - GRAMPS" % _('Select Columns'))
|
||||
|
||||
self.model = gtk.ListStore( bool , str , int , object )
|
||||
|
||||
@ -77,6 +83,9 @@ class ColumnOrder:
|
||||
2, item[1],
|
||||
3, item)
|
||||
|
||||
def build_menu_names(self,obj):
|
||||
return (_('Column Editor'), _('Column Editor'))
|
||||
|
||||
def ok_clicked(self,obj):
|
||||
newlist = []
|
||||
for i in range(0,len(self.arglist)):
|
||||
@ -87,10 +96,10 @@ class ColumnOrder:
|
||||
newlist.append((enable, index, value[2]))
|
||||
|
||||
self.callback(newlist)
|
||||
self.top.destroy()
|
||||
self.close()
|
||||
|
||||
def cancel_clicked(self,obj):
|
||||
self.top.destroy()
|
||||
self.close()
|
||||
|
||||
def toggled(self, cell, path, model):
|
||||
node = model.get_iter((int(path),))
|
||||
|
@ -126,8 +126,11 @@ class EventView(PageView.ListView):
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
||||
ColumnOrder.ColumnOrder(self.dbstate.db.get_event_column_order(),
|
||||
column_names, self.set_column_order)
|
||||
ColumnOrder.ColumnOrder(
|
||||
self.uistate,
|
||||
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)
|
||||
|
@ -83,8 +83,11 @@ class MediaView(PageView.ListView):
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
||||
ColumnOrder.ColumnOrder(self.dbstate.db.get_media_column_order(),
|
||||
column_names, self.set_column_order)
|
||||
ColumnOrder.ColumnOrder(
|
||||
self.uistate,
|
||||
self.dbstate.db.get_media_column_order(),
|
||||
column_names,
|
||||
self.set_column_order)
|
||||
|
||||
def set_column_order(self,list):
|
||||
self.dbstate.db.set_media_column_order(list)
|
||||
|
@ -125,8 +125,11 @@ class PersonView(PageView.PersonNavView):
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
||||
ColumnOrder.ColumnOrder(self.dbstate.db.get_person_column_order(),
|
||||
column_names, self.set_column_order)
|
||||
ColumnOrder.ColumnOrder(
|
||||
self.uistate,
|
||||
self.dbstate.db.get_person_column_order(),
|
||||
column_names,
|
||||
self.set_column_order)
|
||||
|
||||
def set_column_order(self, column_list):
|
||||
self.dbstate.db.set_person_column_order(column_list)
|
||||
|
@ -89,8 +89,11 @@ class PlaceView(PageView.ListView):
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
||||
ColumnOrder.ColumnOrder(self.dbstate.db.get_place_column_order(),
|
||||
column_names, self.set_column_order)
|
||||
ColumnOrder.ColumnOrder(
|
||||
self.uistate,
|
||||
self.dbstate.db.get_place_column_order(),
|
||||
column_names,
|
||||
self.set_column_order)
|
||||
|
||||
def set_column_order(self,list):
|
||||
self.dbstate.db.set_place_column_order(list)
|
||||
|
@ -95,8 +95,11 @@ class RepositoryView(PageView.ListView):
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
||||
ColumnOrder.ColumnOrder(self.dbstate.db.get_repository_column_order(),
|
||||
column_names, self.set_column_order)
|
||||
ColumnOrder.ColumnOrder(
|
||||
self.uistate,
|
||||
self.dbstate.db.get_repository_column_order(),
|
||||
column_names,
|
||||
self.set_column_order)
|
||||
|
||||
def set_column_order(self,list):
|
||||
self.dbstate.db.set_repository_column_order(list)
|
||||
|
@ -88,8 +88,11 @@ class SourceView(PageView.ListView):
|
||||
def column_editor(self,obj):
|
||||
import ColumnOrder
|
||||
|
||||
ColumnOrder.ColumnOrder(self.dbstate.db.get_source_column_order(),
|
||||
column_names, self.set_column_order)
|
||||
ColumnOrder.ColumnOrder(
|
||||
self.uistate,
|
||||
self.dbstate.db.get_source_column_order(),
|
||||
column_names,
|
||||
self.set_column_order)
|
||||
|
||||
def set_column_order(self,list):
|
||||
self.dbstate.db.set_source_column_order(list)
|
||||
|
Loading…
Reference in New Issue
Block a user