diff --git a/ChangeLog b/ChangeLog index 00d6966d5..b78531de2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ 2005-04-23 Don Allingham + * src/ListModel.py: keep track of data index + * src/EventEdit.py: use new label scheme for tabs that uses an + icon to indicate used tabs * src/AddrEdit.py: use new label scheme for tabs that uses an icon to indicate used tabs * src/AttrEdit.py: use new label scheme for tabs that uses an diff --git a/src/EditPerson.py b/src/EditPerson.py index 5773d8f34..8125550a2 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -307,21 +307,39 @@ class EditPerson: self.on_event_update_clicked) # attribute display - atitles = [(_('Attribute'),-1,150),(_('Value'),-1,150)] + atitles = [ + (_('Attribute'),-1,200), + (_('Value'),-1,350), + (_(':Source'),-1,50), + (_(':Note'),-1,50), + ] self.atree = ListModel.ListModel(self.attr_list,atitles, self.on_attr_select_row, self.on_update_attr_clicked) # address display - ptitles = [(_('Date'),-1,150),(_('Address'),-1,150)] + ptitles = [ + (_('Date'),-1,175), + (_('Address'),-1,150), + (_('City'),-1,100), + (_('State/Province'),-1,75), + (_('Country'),-1,100), + (_(':Source'),-1,50), + (_(':Note'),-1,50), + ] self.ptree = ListModel.ListModel(self.addr_list, ptitles, self.on_addr_select_row, self.on_update_addr_clicked) # name display - ntitles = [(_('Family Name'),-1,250),(_('Prefix'),-1,50), - (_('Given Name'),-1,200),(_('Suffix'),-1,50), - (_('Type'),-1,100)] + ntitles = [ + (_('Family Name'),-1,225), + (_('Prefix'),-1,50), + (_('Given Name'),-1,200), + (_('Suffix'),-1,50), + (_('Type'),-1,100), + (_(':Source'),-1,50), (_(':Note'),-1,50), + ] self.ntree = ListModel.ListModel(self.name_list,ntitles, self.on_name_select_row) self.ntree.tree.connect('event',self.aka_double_click) @@ -969,10 +987,12 @@ class EditPerson: self.ntree.clear() self.nmap = {} for name in self.nlist: + has_note = name.get_note() + has_source = len(name.get_source_references())> 0 node = self.ntree.add([ name.get_surname(),name.get_surname_prefix(), name.get_first_name(), name.get_suffix(), - _(name.get_type())],name) + _(name.get_type()),has_source,has_note],name) self.nmap[str(name)] = node if self.nlist: self.ntree.select_row(0) @@ -1002,9 +1022,14 @@ class EditPerson: self.ptree.clear() self.pmap = {} for addr in self.plist: + has_note = addr.get_note() + has_source = len(addr.get_source_references())> 0 location = "%s %s %s %s" % (addr.get_street(),addr.get_city(), addr.get_state(),addr.get_country()) - node = self.ptree.add([addr.get_date(),location],addr) + node = self.ptree.add([addr.get_date(),addr.get_street(), + addr.get_city(),addr_get_state(), + addr_get_country(),has_source,has_note], + addr) self.pmap[str(addr)] = node if self.plist: self.ptree.select_row(0) @@ -1017,7 +1042,12 @@ class EditPerson: self.atree.clear() self.amap = {} for attr in self.alist: - node = self.atree.add([const.display_pattr(attr.get_type()),attr.get_value()],attr) + has_note = attr.get_note() + has_source = len(attr.get_source_references())> 0 + node = self.atree.add([ + const.display_pattr(attr.get_type()), attr.get_value(), + has_source, has_note, + ],attr) self.amap[str(attr)] = node if self.alist: self.atree.select_row(0) diff --git a/src/EventEdit.py b/src/EventEdit.py index b8ba293cb..b6b2ecd83 100644 --- a/src/EventEdit.py +++ b/src/EventEdit.py @@ -144,14 +144,15 @@ class EventEditor: self.event_menu = self.top.get_widget("personal_events") self.priv = self.top.get_widget("priv") self.priv.set_sensitive(not noedit) - self.sources_label = self.top.get_widget("sourcesEvent") - self.notes_label = self.top.get_widget("notesEvent") + self.sources_label = self.top.get_widget("sources_tab") + self.notes_label = self.top.get_widget("note_tab") + self.general_label = self.top.get_widget("general_tab") + self.gallery_label = self.top.get_widget("gallery_tab") + self.witnesses_label = self.top.get_widget("witness_tab") self.flowed = self.top.get_widget("eventflowed") self.flowed.set_sensitive(not noedit) self.preform = self.top.get_widget("eventpreform") self.preform.set_sensitive(not noedit) - self.gallery_label = self.top.get_widget("galleryEvent") - self.witnesses_label = self.top.get_widget("witnessesEvent") self.ok = self.top.get_widget('ok') self.ok.set_sensitive(not noedit) @@ -219,7 +220,6 @@ class EventEditor: self.date_field, self.top.get_widget("date_stat"), self.window) - if not event: event = RelLib.Event() self.icon_list = self.top.get_widget("iconlist") diff --git a/src/ListModel.py b/src/ListModel.py index 4a29697af..114f571f5 100644 --- a/src/ListModel.py +++ b/src/ListModel.py @@ -34,11 +34,13 @@ class ListModel: event_func=None,mode=gtk.SELECTION_SINGLE): self.tree = tree self.mylist = [] + self.data_index = 0 for l in dlist: if l[0] and l[0][0] == ':': self.mylist.append(TYPE_BOOLEAN) else: self.mylist.append(TYPE_STRING) + self.data_index += 1 self.mylist.append(TYPE_PYOBJECT) self.tree.set_rules_hint(True) @@ -46,7 +48,6 @@ class ListModel: self.selection = None self.mode = mode self.new_model() - self.data_index = l self.count = 0 self.cid = None self.cids = [] diff --git a/src/gramps.glade b/src/gramps.glade index 421becfd1..99caf8758 100644 --- a/src/gramps.glade +++ b/src/gramps.glade @@ -27416,22 +27416,51 @@ Very High - + True - <b>General</b> - False - True - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False + 0 + + + + 4 + gtk-file + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + General + False + True + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + tab @@ -27601,22 +27630,51 @@ Very High - + True - Sources - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False + 0 + + + + 4 + gtk-file + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + Sources + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + tab @@ -27766,22 +27824,51 @@ Very High - + True - Note - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False + 0 + + + + 4 + gtk-file + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + Note + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + tab @@ -27952,22 +28039,51 @@ Very High - + True - Witnesses - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False + 0 + + + + 4 + gtk-file + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + Witnesses + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + tab @@ -28167,22 +28283,51 @@ Very High - + True - Gallery - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False + 0 + + + + 4 + gtk-file + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + Gallery + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + tab