Minor fixes to place view, better resolution for OpenOffice

svn: r755
This commit is contained in:
Don Allingham 2002-02-06 00:48:49 +00:00
parent fa508db0f2
commit b49d06af25
4 changed files with 47 additions and 23 deletions

View File

@ -18,11 +18,31 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
"""
Handles the place view for GRAMPS.
"""
#-------------------------------------------------------------------------
#
# GTK modules
#
#-------------------------------------------------------------------------
import GTK import GTK
import GDK import GDK
import gnome.ui import gnome.ui
#-------------------------------------------------------------------------
#
# Standard python modules
#
#-------------------------------------------------------------------------
import string import string
#-------------------------------------------------------------------------
#
# Gramps modules
#
#-------------------------------------------------------------------------
from RelLib import * from RelLib import *
import EditPlace import EditPlace
import utils import utils
@ -31,7 +51,13 @@ import Config
from intl import gettext from intl import gettext
_ = gettext _ = gettext
#-------------------------------------------------------------------------
#
# PlaceView class
#
#-------------------------------------------------------------------------
class PlaceView: class PlaceView:
def __init__(self,db,glade,update): def __init__(self,db,glade,update):
self.db = db self.db = db
self.glade = glade self.glade = glade
@ -50,12 +76,9 @@ class PlaceView:
self.county_arrow, self.state_arrow, self.county_arrow, self.state_arrow,
self.country_arrow ] self.country_arrow ]
self.place_list.set_column_visibility(7,0) for i in range(7,13):
self.place_list.set_column_visibility(8,0) self.place_list.set_column_visibility(i,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)
self.place_list.connect('button-press-event',self.on_button_press_event) self.place_list.connect('button-press-event',self.on_button_press_event)
self.place_list.connect('select-row',self.select_row) self.place_list.connect('select-row',self.select_row)
self.active = None self.active = None
@ -69,6 +92,10 @@ class PlaceView:
self.place_list.set_sort_type(self.sort_dir) self.place_list.set_sort_type(self.sort_dir)
def load_places(self): 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: if len(self.place_list.selection) == 0:
current_row = 0 current_row = 0
else: else:
@ -96,15 +123,14 @@ class PlaceView:
self.place_list.set_row_data(index,src) self.place_list.set_row_data(index,src)
index = index + 1 index = index + 1
self.place_list.sort()
if index > 0: if index > 0:
self.place_list.select_row(current_row,0) self.place_list.select_row(current_row,0)
self.place_list.moveto(current_row) self.place_list.moveto(current_row)
self.active = self.place_list.get_row_data(current_row) self.active = self.place_list.get_row_data(current_row)
else: else:
self.active = None self.active = None
self.place_list.sort()
self.place_list.thaw() self.place_list.thaw()
def select_row(self,obj,row,b,c): def select_row(self,obj,row,b,c):

View File

@ -46,13 +46,10 @@
<text>Welcome to GRAMPS, the Genealogical Research <text>Welcome to GRAMPS, the Genealogical Research
and Analysis Management Programming System. and Analysis Management Programming System.
Since this is the first time you have run the program, Several options and information needs to be gathered
some information about you needs to be gathered. before GRAMPS is ready to be used. Any of this
information can be changed in the future in the
This information is used to establish your ownership Preferences dialog under the Settings menu.</text>
and copyright of the data you record. You may
choose not to provide some or all of the requested
information.</text>
<title_color>125,104,74</title_color> <title_color>125,104,74</title_color>
<text_color>0,0,0</text_color> <text_color>0,0,0</text_color>
<background_color>225,219,197</background_color> <background_color>225,219,197</background_color>
@ -97,8 +94,9 @@ information.</text>
<widget> <widget>
<class>GtkLabel</class> <class>GtkLabel</class>
<name>label141</name> <name>label141</name>
<label>Please enter the following information. You can change it at <label>In order to create valid GEDCOM files, the following information
anytime in the program's preference settings</label> needs to be entered. If you do not plan to generate GEDCOM
files, you may leave it blank.</label>
<justify>GTK_JUSTIFY_LEFT</justify> <justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap> <wrap>False</wrap>
<xalign>0.5</xalign> <xalign>0.5</xalign>

View File

@ -491,6 +491,7 @@ class OpenOfficeDoc(TextDoc):
self.f.write(latin_to_utf8(text)) self.f.write(latin_to_utf8(text))
def _write_photos(self): def _write_photos(self):
import shutil
for file_tuple in self.photo_list: for file_tuple in self.photo_list:
file = file_tuple[0] file = file_tuple[0]
@ -500,10 +501,9 @@ class OpenOfficeDoc(TextDoc):
image_name = self.tempdir + os.sep + "Pictures" + os.sep + base image_name = self.tempdir + os.sep + "Pictures" + os.sep + base
try: try:
img = ImgManip.ImgManip(file) shutil.copy(file,image_name)
img.jpg_thumbnail(image_name) except IOError,msg:
except: GnomeErrorDialog(_("Error copying %s") + "\n" + msg)
pass
def _write_manifest(self): def _write_manifest(self):
file = self.tempdir + os.sep + "META-INF" + os.sep + "manifest.xml" file = self.tempdir + os.sep + "META-INF" + os.sep + "manifest.xml"

View File

@ -916,7 +916,7 @@
<object>propertybox</object> <object>propertybox</object>
<last_modification_time>Sun, 30 Dec 2001 00:13:47 GMT</last_modification_time> <last_modification_time>Sun, 30 Dec 2001 00:13:47 GMT</last_modification_time>
</signal> </signal>
<label>Enable LDS tab on Edit Person form</label> <label>Always display the LDS ordinance tabs</label>
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>