* src/preferences.glade: Don't immediately show preferences dialog

* src/GrampsCfg.py: Handle new callback for preferences dialog
* src/gramps_main.py: Pass update_display instead of full_update to
loadConfig to prevent the displaying of multiple entries on the display.


svn: r1738
This commit is contained in:
Don Allingham 2003-06-14 14:47:41 +00:00
parent 8d4a8ee95c
commit 8189febf02
3 changed files with 4 additions and 26 deletions

View File

@ -48,7 +48,6 @@ import gnome.ui
#
#-------------------------------------------------------------------------
import RelLib
#from Date import *
import const
import Utils
@ -528,6 +527,7 @@ class GrampsPreferences:
self.build()
self.build_ext()
self.apply.set_sensitive(0)
self.window.show()
def build_tree(self):
prev = None
@ -967,7 +967,7 @@ class GrampsPreferences:
# update the config file
sync()
_callback()
_callback(1)
def on_object_toggled(self,obj):
"""Called by the elements on the property box to set the changed flag,

View File

@ -137,7 +137,7 @@ class Gramps:
self.db.set_sprefix(GrampsCfg.sprefix)
self.db.set_pprefix(GrampsCfg.pprefix)
GrampsCfg.loadConfig(self.full_update)
GrampsCfg.loadConfig(self.update_display)
self.relationship = Plugins.relationship_function()
self.init_interface()
@ -807,26 +807,7 @@ class Gramps:
def full_update(self):
"""Brute force display update, updating all the pages"""
self.complete_rebuild()
page = self.views.get_current_page()
if page == 1:
self.family_view.load_family()
elif page == 2:
self.pedigree_view.load_canvas(self.active_person)
elif page == 3:
self.source_view.load_sources()
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.modify_statusbar()
self.place_loaded = 1
elif page == 5:
self.media_view.load_media()
self.update_display(1)
self.toolbar.set_style(GrampsCfg.toolbar)
def update_display(self,changed):

View File

@ -5,7 +5,6 @@
<requires lib="gnome"/>
<widget class="GtkDialog" id="preferences">
<property name="visible">True</property>
<property name="title" translatable="yes">GRAMPS Preferences</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
@ -136,8 +135,6 @@
<property name="show_border">False</property>
<property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">False</property>
<property name="tab_hborder">2</property>
<property name="tab_vborder">2</property>
<property name="enable_popup">False</property>
<child>