image and screen updates
svn: r6352
This commit is contained in:
parent
6aa2d3e50f
commit
3ae608af89
@ -1,4 +1,8 @@
|
||||
2006-04-17 Don Allingham <don@gramps-project.org>
|
||||
* src/DataViews/_FamilyView.py: handle the dirty flag for updates
|
||||
* src/DataViews/_PersonView.py: goto active person properly
|
||||
* src/SelectObject.py: scale thumbnails to 1/2 size
|
||||
* src/ListModel.py: reduce size of thumbnails
|
||||
* src/GrampsDb/_ReadGedcom.py: set author properly for GEDCOM name
|
||||
on default source
|
||||
|
||||
|
@ -98,6 +98,13 @@ class FamilyView(PageView.PersonNavView):
|
||||
self.redrawing = False
|
||||
self.child = None
|
||||
|
||||
def build_tree(self):
|
||||
if self.active:
|
||||
self.redraw()
|
||||
self.dirty = False
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def connect_to_db(self, db):
|
||||
db.connect('person-update', self.person_update)
|
||||
db.connect('person-rebuild', self.person_rebuild)
|
||||
@ -110,31 +117,49 @@ class FamilyView(PageView.PersonNavView):
|
||||
if self.dbstate.active:
|
||||
while not self.change_person(self.dbstate.active.handle):
|
||||
pass
|
||||
self.dirty = False
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def person_rebuild(self):
|
||||
if self.dbstate.active:
|
||||
while not self.change_person(self.dbstate.active.handle):
|
||||
pass
|
||||
self.dirty = False
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def family_update(self, handle_list):
|
||||
if self.dbstate.active:
|
||||
while not self.change_person(self.dbstate.active.handle):
|
||||
pass
|
||||
self.dirty = False
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def family_add(self, handle_list):
|
||||
if self.dbstate.active:
|
||||
while not self.change_person(self.dbstate.active.handle):
|
||||
pass
|
||||
self.dirty = False
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def family_delete(self, handle_list):
|
||||
if self.dbstate.active:
|
||||
while not self.change_person(self.dbstate.active.handle):
|
||||
pass
|
||||
self.dirty = False
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def family_rebuild(self):
|
||||
if self.dbstate.active:
|
||||
while not self.change_person(self.dbstate.active.handle):
|
||||
pass
|
||||
self.dirty = False
|
||||
else:
|
||||
self.dirty = True
|
||||
|
||||
def get_stock(self):
|
||||
"""
|
||||
|
@ -88,7 +88,8 @@ class PersonView(PageView.PersonNavView):
|
||||
self.handle_col = PeopleModel.COLUMN_INT_ID
|
||||
|
||||
def change_page(self):
|
||||
self.generic_filter_widget.on_filter_name_changed(None)
|
||||
pass
|
||||
#self.generic_filter_widget.on_filter_name_changed(None)
|
||||
|
||||
def define_actions(self):
|
||||
"""
|
||||
@ -259,6 +260,8 @@ class PersonView(PageView.PersonNavView):
|
||||
db.connect('person-delete', self.person_removed)
|
||||
db.connect('person-rebuild', self.build_tree)
|
||||
self.generic_filter_widget.apply_filter()
|
||||
self.goto_active_person()
|
||||
|
||||
|
||||
def goto_active_person(self,obj=None):
|
||||
"""
|
||||
@ -495,7 +498,8 @@ class PersonView(PageView.PersonNavView):
|
||||
person = self.dbstate.db.get_person_from_handle(selected_ids[0])
|
||||
self.dbstate.change_active_person(person)
|
||||
except:
|
||||
self.dbstate.change_active_person(None)
|
||||
pass
|
||||
#self.dbstate.change_active_person(None)
|
||||
|
||||
if len(selected_ids) == 1:
|
||||
self.tree.drag_source_set(BUTTON1_MASK,
|
||||
|
@ -83,7 +83,7 @@ class ListModel:
|
||||
renderer = gtk.CellRendererPixbuf()
|
||||
column = gtk.TreeViewColumn(name[0],renderer)
|
||||
column.add_attribute(renderer,'pixbuf',cnum)
|
||||
renderer.set_property('height',const.thumbScale)
|
||||
renderer.set_property('height',const.thumbScale/2)
|
||||
elif gtk26 and name[3] == COMBO:
|
||||
store = gtk.ListStore(str)
|
||||
model = gtk.ListStore(str, object)
|
||||
|
@ -77,9 +77,13 @@ class SelectObject:
|
||||
|
||||
Utils.set_titles(self.top,title_label,title)
|
||||
|
||||
titles = [(_('Preview'),0,100,ListModel.IMAGE),
|
||||
(_('Title'),1,150), (_('ID'),2,50),
|
||||
(_('Type'),3,70), ('',4,0) ]
|
||||
titles = [
|
||||
(_('Preview'),0,50,ListModel.IMAGE),
|
||||
(_('Title'),1,150),
|
||||
(_('ID'),2,50),
|
||||
(_('Type'),3,70),
|
||||
('',4,0)
|
||||
]
|
||||
|
||||
self.ncols = len(titles)
|
||||
|
||||
@ -98,6 +102,9 @@ class SelectObject:
|
||||
title = obj.get_description()
|
||||
the_type = Mime.get_description(obj.get_mime_type())
|
||||
pixbuf = ImgManip.get_thumb_from_obj(obj)
|
||||
pixbuf = pixbuf.scale_simple(pixbuf.get_width()/2,
|
||||
pixbuf.get_height()/2,
|
||||
gtk.gdk.INTERP_BILINEAR)
|
||||
self.object_model.add([pixbuf,title,obj.get_gramps_id(),the_type],key)
|
||||
self.object_model.connect_model()
|
||||
|
||||
@ -111,7 +118,7 @@ class SelectObject:
|
||||
the_type = obj.get_mime_type()
|
||||
path = obj.get_path()
|
||||
|
||||
if the_type and the_type[0:5] == "image":
|
||||
if the_type and the_type.startswith("image/"):
|
||||
image = ImgManip.get_thumbnail_image(path,the_type)
|
||||
else:
|
||||
image = Mime.find_mime_type_pixbuf(the_type)
|
||||
|
@ -835,7 +835,6 @@ class ViewManager:
|
||||
# Undo/Redo always start with standard labels and insensitive state
|
||||
#self.undo_callback(None)
|
||||
#self.redo_callback(None)
|
||||
#self.goto_active_person()
|
||||
self.file_loaded = True
|
||||
self.actiongroup.set_visible(True)
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user