* src/PedView.py (rebuild_trees): Resize matching is now done later by idle callback; (add_table_to_notebook): Work with PyGtk < 2.4;(format_relation): Adapt format to availably space.
svn: r4685
This commit is contained in:
parent
107239fb4c
commit
63f788bad9
@ -1,6 +1,9 @@
|
|||||||
2005-05-26 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2005-05-26 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/plugins/TestcaseGenerator.py: Add place, media and source
|
* src/plugins/TestcaseGenerator.py: Add place, media and source
|
||||||
references.
|
references.
|
||||||
|
* src/PedView.py (rebuild_trees): Resize matching is now done later by
|
||||||
|
idle callback; (add_table_to_notebook): Work with PyGtk < 2.4;
|
||||||
|
(format_relation): Adapt format to availably space.
|
||||||
|
|
||||||
2005-05-25 Alex Roitman <shura@gramps-project.org>
|
2005-05-25 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/EditPlace.py: WATCH cursor and temp label for References tab.
|
* src/EditPlace.py: WATCH cursor and temp label for References tab.
|
||||||
|
@ -32,6 +32,7 @@ from gettext import gettext as _
|
|||||||
# GTK/Gnome modules
|
# GTK/Gnome modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.gdk
|
import gtk.gdk
|
||||||
|
|
||||||
@ -113,7 +114,11 @@ class PedigreeView:
|
|||||||
frame = gtk.ScrolledWindow(None,None)
|
frame = gtk.ScrolledWindow(None,None)
|
||||||
frame.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
|
frame.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
|
||||||
frame.add_with_viewport(table)
|
frame.add_with_viewport(table)
|
||||||
self.notebook.append_page(frame,None)
|
try:
|
||||||
|
self.notebook.append_page(frame,None)
|
||||||
|
except:
|
||||||
|
# for PyGtk < 2.4
|
||||||
|
self.notebook.append_page(frame,gtk.Label(""))
|
||||||
|
|
||||||
def change_db(self,db):
|
def change_db(self,db):
|
||||||
# Reconnect signals
|
# Reconnect signals
|
||||||
@ -138,6 +143,9 @@ class PedigreeView:
|
|||||||
else:
|
else:
|
||||||
self.rebuild_trees(None)
|
self.rebuild_trees(None)
|
||||||
|
|
||||||
|
def request_resize(self):
|
||||||
|
self.size_request_cb(self.parent_container,None,None)
|
||||||
|
|
||||||
def size_request_cb(self, widget, event, data=None):
|
def size_request_cb(self, widget, event, data=None):
|
||||||
if self.force_size == 0:
|
if self.force_size == 0:
|
||||||
v = widget.get_allocation()
|
v = widget.get_allocation()
|
||||||
@ -213,9 +221,7 @@ class PedigreeView:
|
|||||||
self.rebuild( self.table_4, pos_4, person)
|
self.rebuild( self.table_4, pos_4, person)
|
||||||
self.rebuild( self.table_5, pos_5, person)
|
self.rebuild( self.table_5, pos_5, person)
|
||||||
|
|
||||||
while gtk.events_pending(): # give gtk the chance to do the repainting
|
gobject.idle_add(self.request_resize)
|
||||||
gtk.main_iteration()
|
|
||||||
self.size_request_cb(self.parent_container,None) # switch to matching size
|
|
||||||
|
|
||||||
def rebuild( self, table_widget, positions, active_person):
|
def rebuild( self, table_widget, positions, active_person):
|
||||||
# Build ancestor tree
|
# Build ancestor tree
|
||||||
@ -395,6 +401,7 @@ class PedigreeView:
|
|||||||
|
|
||||||
person_handle = obj.get_data(_PERSON)
|
person_handle = obj.get_data(_PERSON)
|
||||||
if person_handle:
|
if person_handle:
|
||||||
|
print "PedView.on_childmenu_changed emits 'active-changed'"
|
||||||
self.parent.emit("active-changed", (person_handle,))
|
self.parent.emit("active-changed", (person_handle,))
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
@ -681,11 +688,15 @@ class PedigreeView:
|
|||||||
for event_handle in family.get_event_list():
|
for event_handle in family.get_event_list():
|
||||||
event = self.db.get_event_from_handle(event_handle)
|
event = self.db.get_event_from_handle(event_handle)
|
||||||
if event:
|
if event:
|
||||||
|
if line_count < 3:
|
||||||
|
return event.get_date()
|
||||||
text += _(event.get_name())
|
text += _(event.get_name())
|
||||||
text += "\n"
|
text += "\n"
|
||||||
text += event.get_date()
|
text += event.get_date()
|
||||||
text += "\n"
|
text += "\n"
|
||||||
text += self.get_place_name(event.get_place_handle())
|
text += self.get_place_name(event.get_place_handle())
|
||||||
|
if line_count < 5:
|
||||||
|
return text;
|
||||||
break
|
break
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user