Improvements to media view and parent selection

svn: r1151
This commit is contained in:
Don Allingham 2002-10-27 03:43:12 +00:00
parent 0753b631a6
commit 0f3501ae86
5 changed files with 104 additions and 26 deletions

View File

@ -397,7 +397,7 @@ class ModifyParents:
self.glade.signal_autoconnect({
"on_save_parents_clicked" : self.save_parents_clicked,
"destroy_passed_object" : Utils.destroy_passed_object
"destroy_passed_object" : self.quit,
})
text = _("<b>Modify the Parents of %s</b>") % GrampsCfg.nameof(self.person)
@ -413,15 +413,19 @@ class ModifyParents:
if self.father:
self.glade.get_widget("fname").set_text(self.father.getPrimaryName().getName())
fname = self.father.getPrimaryName().getName()
self.glade.get_widget("fname").set_text(fname)
else:
self.father_rel.set_senstive(0)
if self.father:
self.glade.get_widget("mname").set_text(self.mother.getPrimaryName().getName())
if self.mother:
mname = self.mother.getPrimaryName().getName()
self.glade.get_widget("mname").set_text(mname)
else:
self.mother_rel.set_senstive(0)
def quit(self,obj):
self.top.destroy()
def save_parents_clicked(self,obj):
"""

View File

@ -550,7 +550,9 @@ class LocalMediaProperties:
def on_apply_clicked(self, obj):
priv = self.change_dialog.get_widget("private").get_active()
text = self.change_dialog.get_widget("notes").get_chars(0,-1)
t = self.change_dialog.get_widget("notes").get_buffer()
text = t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE)
note = self.photo.getNote()
if text != note or priv != self.photo.getPrivacy():
self.photo.setNote(text)
@ -730,7 +732,8 @@ class GlobalMediaProperties:
self.display_refs()
def on_apply_clicked(self, obj):
text = self.notes.get_chars(0,-1)
t = self.notes.get_buffer()
text = t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE)
desc = self.descr_window.get_text()
note = self.object.getNote()
if text != note or desc != self.object.getDescription():

View File

@ -122,6 +122,9 @@ class MediaView:
fexists = 1
store,iter = self.selection.get_selected()
if not iter:
return
id = store.get_value(iter,1)
mobj = self.db.findObjectNoMap(id)

View File

@ -1825,7 +1825,7 @@
<child>
<widget class="GtkVBox" id="vbox65">
<property name="visible">True</property>
<property name="homogeneous">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
@ -1833,28 +1833,93 @@
</child>
<child>
<widget class="GtkButton" id="fam_back">
<widget class="GtkVBox" id="vbox65">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Make the selected child the active family</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkImage" id="image93">
<widget class="GtkButton" id="fam_back">
<property name="visible">True</property>
<property name="stock">gtk-go-back</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="tooltip" translatable="yes">Make the selected child the active family</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<child>
<widget class="GtkImage" id="image93">
<property name="visible">True</property>
<property name="stock">gtk-go-back</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">10</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button155">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Adds a new child to the selected family</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<child>
<widget class="GtkImage" id="image94">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button156">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Deletes the selected child from the selected family</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<child>
<widget class="GtkImage" id="image95">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="padding">30</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="fill">True</property>
</packing>
</child>
@ -1865,7 +1930,7 @@
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="fill">False</property>
</packing>
</child>
</widget>

View File

@ -482,7 +482,8 @@ class Gramps:
p2 = self.person_list.get_row_data(self.person_list.selection[1])
p1 = self.db.getPerson(p1)
p2 = self.db.getPerson(p2)
MergeData.MergePeople(self.db,p1,p2,self.merge_update,self.update_after_edit)
MergeData.MergePeople(self.db,p1,p2,self.merge_update,
self.update_after_edit)
elif page == 4:
self.place_view.merge()
@ -592,7 +593,8 @@ class Gramps:
else:
try:
AddSpouse.AddSpouse(self.db,self.active_person,
self.family_view.load_family,self.redisplay_person_list)
self.family_view.load_family,
self.redisplay_person_list)
except:
DisplayTrace.DisplayTrace()
@ -600,7 +602,8 @@ class Gramps:
Utils.destroy_passed_object(self.addornew)
try:
AddSpouse.SetSpouse(self.db,self.active_person,self.active_family,
self.family_view.load_family, self.redisplay_person_list)
self.family_view.load_family,
self.redisplay_person_list)
except:
DisplayTrace.DisplayTrace()
@ -1283,7 +1286,7 @@ class Gramps:
self.merge_button.set_sensitive(0)
self.family_view.load_family()
elif page == 2:
self.enable_buttons(1)
self.enable_buttons(0)
self.merge_button.set_sensitive(0)
self.pedigree_view.load_canvas(self.active_person)
elif page == 3: