update
svn: r3117
This commit is contained in:
parent
3783102bcc
commit
3cb7c304ed
@ -42,6 +42,7 @@ import string
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gtk
|
||||
import gobject
|
||||
|
||||
_t = type(u'')
|
||||
|
||||
@ -289,3 +290,4 @@ class AutoEntry(AutoCompBase):
|
||||
gtk.Editable.select_region(entry,self.l, -1)
|
||||
return
|
||||
|
||||
|
||||
|
@ -35,6 +35,7 @@ import pickle
|
||||
#-------------------------------------------------------------------------
|
||||
import gtk
|
||||
import gtk.glade
|
||||
import gobject
|
||||
import gnome
|
||||
|
||||
from gtk.gdk import ACTION_COPY, BUTTON1_MASK, INTERP_BILINEAR, pixbuf_new_from_file
|
||||
@ -165,7 +166,6 @@ class EditPerson:
|
||||
self.alt_suffix_field = self.get_widget("alt_suffix")
|
||||
self.alt_prefix_field = self.get_widget("alt_prefix")
|
||||
self.name_type_field = self.get_widget("name_type")
|
||||
self.surname_field = self.get_widget("surname")
|
||||
self.ntype_field = self.get_widget("ntype")
|
||||
self.suffix = self.get_widget("suffix")
|
||||
self.prefix = self.get_widget("prefix")
|
||||
@ -173,12 +173,10 @@ class EditPerson:
|
||||
self.nick = self.get_widget("nickname")
|
||||
self.title = self.get_widget("title")
|
||||
self.bdate = self.get_widget("birthDate")
|
||||
self.bplace = self.get_widget("birthPlace")
|
||||
self.bpcombo = self.get_widget("bpcombo")
|
||||
self.dpcombo = self.get_widget("dpcombo")
|
||||
self.sncombo = self.get_widget("sncombo")
|
||||
self.bplace = self.get_widget("birth_place")
|
||||
self.surname = self.get_widget("surname")
|
||||
self.ddate = self.get_widget("deathDate")
|
||||
self.dplace = self.get_widget("deathPlace")
|
||||
self.dplace = self.get_widget("death_place")
|
||||
self.is_male = self.get_widget("genderMale")
|
||||
self.is_female = self.get_widget("genderFemale")
|
||||
self.is_unknown = self.get_widget("genderUnknown")
|
||||
@ -267,11 +265,12 @@ class EditPerson:
|
||||
self.on_web_select_row,
|
||||
self.on_update_url_clicked)
|
||||
|
||||
place_list = self.pdmap.keys()
|
||||
place_list.sort()
|
||||
self.autoplace = AutoComp.AutoCombo(self.bpcombo, place_list)
|
||||
self.autodeath = AutoComp.AutoCombo(self.dpcombo, place_list, self.autoplace)
|
||||
self.comp = AutoComp.AutoCombo(self.sncombo,self.db.get_surnames())
|
||||
self.place_list = self.pdmap.keys()
|
||||
self.place_list.sort()
|
||||
|
||||
build_dropdown(self.bplace,self.place_list)
|
||||
build_dropdown(self.dplace,self.place_list)
|
||||
build_dropdown(self.surname,self.db.get_surnames())
|
||||
|
||||
self.gid.set_text(person.get_id())
|
||||
self.gid.set_editable(GrampsCfg.id_edit)
|
||||
@ -474,7 +473,7 @@ class EditPerson:
|
||||
stat = 0
|
||||
combo.entry.set_text("")
|
||||
|
||||
AutoComp.AutoEntry(place,None,self.autoplace)
|
||||
build_dropdown(place,self.place_list)
|
||||
if ord and ord.get_place_id():
|
||||
ord_place = self.db.find_place_from_id(ord.get_place_id())
|
||||
place.set_text(ord_place.get_title())
|
||||
@ -1047,7 +1046,7 @@ class EditPerson:
|
||||
"""Check to see if any of the data has changed from the
|
||||
orig record"""
|
||||
|
||||
surname = unicode(self.surname_field.get_text())
|
||||
surname = unicode(self.surname.get_text())
|
||||
self.birth.set_date(unicode(self.bdate.get_text()))
|
||||
self.death.set_date(unicode(self.ddate.get_text()))
|
||||
|
||||
@ -1412,7 +1411,7 @@ class EditPerson:
|
||||
|
||||
trans = self.db.start_transaction()
|
||||
|
||||
surname = unicode(self.surname_field.get_text())
|
||||
surname = unicode(self.surname.get_text())
|
||||
suffix = unicode(self.suffix.get_text())
|
||||
prefix = unicode(self.prefix.get_text())
|
||||
ntype = unicode(self.ntype_field.entry.get_text())
|
||||
@ -1722,7 +1721,7 @@ class EditPerson:
|
||||
self.suffix.set_text(self.pname.get_suffix())
|
||||
self.prefix.set_text(self.pname.get_surname_prefix())
|
||||
|
||||
self.surname_field.set_text(self.pname.get_surname())
|
||||
self.surname.set_text(self.pname.get_surname())
|
||||
self.given.set_text(self.pname.get_first_name())
|
||||
|
||||
self.ntype_field.entry.set_text(_(self.pname.get_type()))
|
||||
@ -1814,3 +1813,13 @@ def place_title(db,event):
|
||||
return db.find_place_from_id(pid).get_title()
|
||||
else:
|
||||
return u''
|
||||
|
||||
def build_dropdown(entry,strings):
|
||||
store = gtk.ListStore(gobject.TYPE_STRING)
|
||||
for value in strings:
|
||||
iter = store.append()
|
||||
store.set(iter,0,value)
|
||||
completion = gtk.EntryCompletion()
|
||||
completion.set_text_column(0)
|
||||
completion.set_model(store)
|
||||
entry.set_completion(completion)
|
||||
|
@ -331,7 +331,7 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
|
||||
def column_birth_place(self,data):
|
||||
if data[6]:
|
||||
event = self.db.find_event_from_id(data[5])
|
||||
event = self.db.find_event_from_id(data[6])
|
||||
if event:
|
||||
place_id = event.get_place_id()
|
||||
if place_id:
|
||||
|
@ -47,7 +47,6 @@ _sel_mode = gtk.SELECTION_SINGLE
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import PeopleModel
|
||||
import Filter
|
||||
import GenericFilter
|
||||
import const
|
||||
|
||||
@ -115,7 +114,7 @@ class PeopleView:
|
||||
name = column_names[pair[1]]
|
||||
column = gtk.TreeViewColumn(name, self.renderer, text=pair[1])
|
||||
column.set_resizable(gtk.TRUE)
|
||||
#column.set_clickable(gtk.TRUE)
|
||||
column.set_clickable(gtk.TRUE)
|
||||
column.set_min_width(60)
|
||||
column.set_sizing(gtk.TREE_VIEW_COLUMN_GROW_ONLY)
|
||||
column.set_sort_column_id(index)
|
||||
@ -167,9 +166,6 @@ class PeopleView:
|
||||
self.sort_model.set_visible_column(PeopleModel.COLUMN_VIEW)
|
||||
self.person_tree.set_model(self.sort_model)
|
||||
|
||||
def clear(self):
|
||||
pass
|
||||
|
||||
def remove_from_person_list(self,person,old_id=None):
|
||||
"""Remove the selected person from the list. A person object is expected,
|
||||
not an ID"""
|
||||
|
160
src/gramps.glade
160
src/gramps.glade
@ -8868,46 +8868,6 @@
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCombo" id="sncombo">
|
||||
<property name="visible">True</property>
|
||||
<property name="value_in_list">False</property>
|
||||
<property name="allow_empty">True</property>
|
||||
<property name="case_sensitive">False</property>
|
||||
<property name="enable_arrow_keys">True</property>
|
||||
<property name="enable_arrows_always">False</property>
|
||||
|
||||
<child internal-child="entry">
|
||||
<widget class="GtkEntry" id="surname">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">The surname or last name</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child internal-child="list">
|
||||
<widget class="GtkList" id="combo-list1">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="prefix">
|
||||
<property name="visible">True</property>
|
||||
@ -9358,10 +9318,7 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">birthPlace</property>
|
||||
<accessibility>
|
||||
<atkrelation target="bpcombo" type="label-for"/>
|
||||
</accessibility>
|
||||
<property name="mnemonic_widget">birth_place</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -9373,45 +9330,6 @@
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCombo" id="bpcombo">
|
||||
<property name="visible">True</property>
|
||||
<property name="value_in_list">False</property>
|
||||
<property name="allow_empty">True</property>
|
||||
<property name="case_sensitive">False</property>
|
||||
<property name="enable_arrow_keys">True</property>
|
||||
<property name="enable_arrows_always">False</property>
|
||||
|
||||
<child internal-child="entry">
|
||||
<widget class="GtkEntry" id="birthPlace">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child internal-child="list">
|
||||
<widget class="GtkList" id="combo-list2">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">14</property>
|
||||
<property name="bottom_attach">15</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label300">
|
||||
<property name="visible">True</property>
|
||||
@ -9477,7 +9395,7 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">deathPlace</property>
|
||||
<property name="mnemonic_widget">death_place</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">8</property>
|
||||
@ -9551,34 +9469,58 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCombo" id="dpcombo">
|
||||
<widget class="GtkEntry" id="surname">
|
||||
<property name="visible">True</property>
|
||||
<property name="value_in_list">False</property>
|
||||
<property name="allow_empty">True</property>
|
||||
<property name="case_sensitive">False</property>
|
||||
<property name="enable_arrow_keys">True</property>
|
||||
<property name="enable_arrows_always">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child internal-child="entry">
|
||||
<widget class="GtkEntry" id="deathPlace">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="birth_place">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">14</property>
|
||||
<property name="bottom_attach">15</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child internal-child="list">
|
||||
<widget class="GtkList" id="combo-list3">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="death_place">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">9</property>
|
||||
|
@ -961,20 +961,11 @@ class Gramps:
|
||||
"""Incremental display update, update only the displayed page"""
|
||||
page = self.views.get_current_page()
|
||||
if page == PERSON_VIEW:
|
||||
if changed:
|
||||
self.people_view.apply_filter()
|
||||
else:
|
||||
self.goto_active_person()
|
||||
self.people_view.apply_filter()
|
||||
elif page == FAMILY_VIEW1 or page == FAMILY_VIEW2:
|
||||
self.family_view.load_family()
|
||||
elif page == PEDIGREE_VIEW:
|
||||
self.pedigree_view.load_canvas(self.active_person)
|
||||
elif page == PLACE_VIEW:
|
||||
if len(self.db.get_place_id_keys()) > 2000:
|
||||
self.status_text(_('Updating display - this may take a few seconds...'))
|
||||
else:
|
||||
self.status_text(_('Updating display...'))
|
||||
self.modify_statusbar()
|
||||
|
||||
def on_tools_clicked(self,obj):
|
||||
if self.active_person:
|
||||
|
Loading…
Reference in New Issue
Block a user