diff --git a/gramps/src/PlaceView.py b/gramps/src/PlaceView.py index b1e2dc7ee..ae131ba19 100644 --- a/gramps/src/PlaceView.py +++ b/gramps/src/PlaceView.py @@ -18,11 +18,31 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +""" +Handles the place view for GRAMPS. +""" + +#------------------------------------------------------------------------- +# +# GTK modules +# +#------------------------------------------------------------------------- import GTK import GDK import gnome.ui + +#------------------------------------------------------------------------- +# +# Standard python modules +# +#------------------------------------------------------------------------- import string +#------------------------------------------------------------------------- +# +# Gramps modules +# +#------------------------------------------------------------------------- from RelLib import * import EditPlace import utils @@ -31,7 +51,13 @@ import Config from intl import gettext _ = gettext +#------------------------------------------------------------------------- +# +# PlaceView class +# +#------------------------------------------------------------------------- class PlaceView: + def __init__(self,db,glade,update): self.db = db self.glade = glade @@ -50,12 +76,9 @@ class PlaceView: self.county_arrow, self.state_arrow, self.country_arrow ] - self.place_list.set_column_visibility(7,0) - self.place_list.set_column_visibility(8,0) - self.place_list.set_column_visibility(9,0) - self.place_list.set_column_visibility(10,0) - self.place_list.set_column_visibility(11,0) - self.place_list.set_column_visibility(12,0) + for i in range(7,13): + self.place_list.set_column_visibility(i,0) + self.place_list.connect('button-press-event',self.on_button_press_event) self.place_list.connect('select-row',self.select_row) self.active = None @@ -69,6 +92,10 @@ class PlaceView: self.place_list.set_sort_type(self.sort_dir) def load_places(self): + """Rebuilds the entire place view. This can be very time consuming + on large databases, and should only be called when absolutely + necessary""" + if len(self.place_list.selection) == 0: current_row = 0 else: @@ -96,15 +123,14 @@ class PlaceView: self.place_list.set_row_data(index,src) index = index + 1 - self.place_list.sort() - if index > 0: self.place_list.select_row(current_row,0) self.place_list.moveto(current_row) self.active = self.place_list.get_row_data(current_row) else: self.active = None - + + self.place_list.sort() self.place_list.thaw() def select_row(self,obj,row,b,c): diff --git a/gramps/src/config.glade b/gramps/src/config.glade index 4643a2055..8a834016f 100644 --- a/gramps/src/config.glade +++ b/gramps/src/config.glade @@ -46,13 +46,10 @@ Welcome to GRAMPS, the Genealogical Research and Analysis Management Programming System. -Since this is the first time you have run the program, -some information about you needs to be gathered. - -This information is used to establish your ownership -and copyright of the data you record. You may -choose not to provide some or all of the requested -information. +Several options and information needs to be gathered +before GRAMPS is ready to be used. Any of this +information can be changed in the future in the +Preferences dialog under the Settings menu. 125,104,74 0,0,0 225,219,197 @@ -97,8 +94,9 @@ information. GtkLabel label141 - + GTK_JUSTIFY_LEFT False 0.5 diff --git a/gramps/src/docgen/OpenOfficeDoc.py b/gramps/src/docgen/OpenOfficeDoc.py index 5574a3188..4228d314b 100644 --- a/gramps/src/docgen/OpenOfficeDoc.py +++ b/gramps/src/docgen/OpenOfficeDoc.py @@ -491,6 +491,7 @@ class OpenOfficeDoc(TextDoc): self.f.write(latin_to_utf8(text)) def _write_photos(self): + import shutil for file_tuple in self.photo_list: file = file_tuple[0] @@ -500,10 +501,9 @@ class OpenOfficeDoc(TextDoc): image_name = self.tempdir + os.sep + "Pictures" + os.sep + base try: - img = ImgManip.ImgManip(file) - img.jpg_thumbnail(image_name) - except: - pass + shutil.copy(file,image_name) + except IOError,msg: + GnomeErrorDialog(_("Error copying %s") + "\n" + msg) def _write_manifest(self): file = self.tempdir + os.sep + "META-INF" + os.sep + "manifest.xml" diff --git a/gramps/src/preferences.glade b/gramps/src/preferences.glade index c4727a87d..de24b4b7c 100644 --- a/gramps/src/preferences.glade +++ b/gramps/src/preferences.glade @@ -916,7 +916,7 @@ propertybox Sun, 30 Dec 2001 00:13:47 GMT - + False True