* 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:
parent
8d4a8ee95c
commit
8189febf02
@ -48,7 +48,6 @@ import gnome.ui
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import RelLib
|
import RelLib
|
||||||
#from Date import *
|
|
||||||
|
|
||||||
import const
|
import const
|
||||||
import Utils
|
import Utils
|
||||||
@ -528,6 +527,7 @@ class GrampsPreferences:
|
|||||||
self.build()
|
self.build()
|
||||||
self.build_ext()
|
self.build_ext()
|
||||||
self.apply.set_sensitive(0)
|
self.apply.set_sensitive(0)
|
||||||
|
self.window.show()
|
||||||
|
|
||||||
def build_tree(self):
|
def build_tree(self):
|
||||||
prev = None
|
prev = None
|
||||||
@ -967,7 +967,7 @@ class GrampsPreferences:
|
|||||||
# update the config file
|
# update the config file
|
||||||
|
|
||||||
sync()
|
sync()
|
||||||
_callback()
|
_callback(1)
|
||||||
|
|
||||||
def on_object_toggled(self,obj):
|
def on_object_toggled(self,obj):
|
||||||
"""Called by the elements on the property box to set the changed flag,
|
"""Called by the elements on the property box to set the changed flag,
|
||||||
|
@ -137,7 +137,7 @@ class Gramps:
|
|||||||
self.db.set_sprefix(GrampsCfg.sprefix)
|
self.db.set_sprefix(GrampsCfg.sprefix)
|
||||||
self.db.set_pprefix(GrampsCfg.pprefix)
|
self.db.set_pprefix(GrampsCfg.pprefix)
|
||||||
|
|
||||||
GrampsCfg.loadConfig(self.full_update)
|
GrampsCfg.loadConfig(self.update_display)
|
||||||
self.relationship = Plugins.relationship_function()
|
self.relationship = Plugins.relationship_function()
|
||||||
self.init_interface()
|
self.init_interface()
|
||||||
|
|
||||||
@ -807,26 +807,7 @@ class Gramps:
|
|||||||
|
|
||||||
def full_update(self):
|
def full_update(self):
|
||||||
"""Brute force display update, updating all the pages"""
|
"""Brute force display update, updating all the pages"""
|
||||||
|
self.update_display(1)
|
||||||
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.toolbar.set_style(GrampsCfg.toolbar)
|
self.toolbar.set_style(GrampsCfg.toolbar)
|
||||||
|
|
||||||
def update_display(self,changed):
|
def update_display(self,changed):
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<requires lib="gnome"/>
|
<requires lib="gnome"/>
|
||||||
|
|
||||||
<widget class="GtkDialog" id="preferences">
|
<widget class="GtkDialog" id="preferences">
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="title" translatable="yes">GRAMPS Preferences</property>
|
<property name="title" translatable="yes">GRAMPS Preferences</property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
@ -136,8 +135,6 @@
|
|||||||
<property name="show_border">False</property>
|
<property name="show_border">False</property>
|
||||||
<property name="tab_pos">GTK_POS_TOP</property>
|
<property name="tab_pos">GTK_POS_TOP</property>
|
||||||
<property name="scrollable">False</property>
|
<property name="scrollable">False</property>
|
||||||
<property name="tab_hborder">2</property>
|
|
||||||
<property name="tab_vborder">2</property>
|
|
||||||
<property name="enable_popup">False</property>
|
<property name="enable_popup">False</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
|
Loading…
Reference in New Issue
Block a user