Minor fixes to place view, better resolution for OpenOffice
svn: r755
This commit is contained in:
		| @@ -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): | ||||
|   | ||||
| @@ -46,13 +46,10 @@ | ||||
|       <text>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.</text> | ||||
| 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.</text> | ||||
|       <title_color>125,104,74</title_color> | ||||
|       <text_color>0,0,0</text_color> | ||||
|       <background_color>225,219,197</background_color> | ||||
| @@ -97,8 +94,9 @@ information.</text> | ||||
| 	  <widget> | ||||
| 	    <class>GtkLabel</class> | ||||
| 	    <name>label141</name> | ||||
| 	    <label>Please enter the following information. You can change it at  | ||||
| anytime in the program's preference settings</label> | ||||
| 	    <label>In order to create valid GEDCOM files, the following information | ||||
| needs to be entered. If you do not plan to generate GEDCOM  | ||||
| files, you may leave it blank.</label> | ||||
| 	    <justify>GTK_JUSTIFY_LEFT</justify> | ||||
| 	    <wrap>False</wrap> | ||||
| 	    <xalign>0.5</xalign> | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -916,7 +916,7 @@ | ||||
| 		      <object>propertybox</object> | ||||
| 		      <last_modification_time>Sun, 30 Dec 2001 00:13:47 GMT</last_modification_time> | ||||
| 		    </signal> | ||||
| 		    <label>Enable LDS tab on Edit Person form</label> | ||||
| 		    <label>Always display the LDS ordinance tabs</label> | ||||
| 		    <active>False</active> | ||||
| 		    <draw_indicator>True</draw_indicator> | ||||
| 		    <child> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user