Message for place displays

svn: r1374
This commit is contained in:
Don Allingham 2003-03-21 04:42:12 +00:00
parent dd1d9acbde
commit cf24217bdb
5 changed files with 797 additions and 715 deletions

View File

@ -144,7 +144,7 @@ class GedcomInfoDB:
try: try:
file = "%s/gedcom.xml" % const.dataDir file = "%s/gedcom.xml" % const.dataDir
f = open(file,"r") f = open(file.encode('iso8859-1'),"r")
except: except:
return return

View File

@ -789,7 +789,7 @@ class GenericFilterList:
# except: # except:
# return # return
f = open(self.file,'w') f = open(self.file.encode('iso8859-1'),'w')
f.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n") f.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
f.write('<filters>\n') f.write('<filters>\n')

View File

@ -329,7 +329,7 @@ class MediaView:
try: try:
tfile,headers = u.retrieve(d) tfile,headers = u.retrieve(d)
except IOError, msg: except IOError, msg:
ErrorDialog(t,str(msg)) ErrorDialog(_('Image import failed'),str(msg))
return return
mime = Utils.get_mime_type(tfile) mime = Utils.get_mime_type(tfile)
photo = RelLib.Photo() photo = RelLib.Photo()

View File

@ -649,7 +649,12 @@ class Gramps:
elif page == 3: elif page == 3:
self.source_view.load_sources() self.source_view.load_sources()
elif page == 4: elif page == 4:
if len(self.db.getPlaceKeys()) > 2000:
self.status_text(_('Updating display - this may take a few seconds...'))
else:
self.status_text(_('Updating display...'))
self.place_view.load_places() self.place_view.load_places()
self.modify_statusbar()
self.place_loaded = 1 self.place_loaded = 1
elif page == 5: elif page == 5:
self.media_view.load_media() self.media_view.load_media()
@ -671,7 +676,12 @@ class Gramps:
elif page == 3: elif page == 3:
self.source_view.load_sources() self.source_view.load_sources()
elif page == 4: elif page == 4:
if len(self.db.getPlaceKeys()) > 2000:
self.status_text(_('Updating display - this may take a few seconds...'))
else:
self.status_text(_('Updating display...'))
self.place_view.load_places() self.place_view.load_places()
self.modify_statusbar()
self.place_loaded = 1 self.place_loaded = 1
else: else:
self.media_view.load_media() self.media_view.load_media()
@ -1117,9 +1127,14 @@ class Gramps:
def on_places_activate(self,obj): def on_places_activate(self,obj):
"""Switches to the places view""" """Switches to the places view"""
if len(self.db.getPlaceKeys()) > 2000:
self.status_text(_('Updating display - this may take a few seconds...'))
else:
self.status_text(_('Updating display...'))
if self.place_loaded == 0: if self.place_loaded == 0:
self.place_view.load_places() self.place_view.load_places()
self.place_loaded = 1 self.place_loaded = 1
self.modify_statusbar()
self.notebook.set_current_page(4) self.notebook.set_current_page(4)
def on_media_activate(self,obj): def on_media_activate(self,obj):

File diff suppressed because it is too large Load Diff