* src/ImageSelect (__init__,on_switch_page): Call
display_references using idle_add; (display_references): set cursor when done. svn: r4772
This commit is contained in:
parent
7115f24e54
commit
aa1fb05e26
@ -7,6 +7,9 @@
|
||||
* src/EditPlace (__init__,on_switch_page): Call
|
||||
display_references using idle_add; (display_references): set
|
||||
cursor when done.
|
||||
* src/ImageSelect (__init__,on_switch_page): Call
|
||||
display_references using idle_add; (display_references): set
|
||||
cursor when done.
|
||||
|
||||
2005-06-03 Jens Arvidsson <jya@sverige.nu>
|
||||
* src/po/sv.po: Minor fixes found via pochkpyvar.pl.
|
||||
|
@ -61,7 +61,7 @@ class EditPlace:
|
||||
|
||||
def __init__(self,parent,place,parent_window=None):
|
||||
self.parent = parent
|
||||
if place.get_handle():
|
||||
if place and place.get_handle():
|
||||
if self.parent.child_windows.has_key(place.get_handle()):
|
||||
self.parent.child_windows[place.get_handle()].present(None)
|
||||
return
|
||||
@ -75,12 +75,13 @@ class EditPlace:
|
||||
self.child_windows = {}
|
||||
self.path = parent.db.get_save_path()
|
||||
self.not_loaded = 1
|
||||
self.ref_not_loaded = 1
|
||||
self.lists_changed = 0
|
||||
if place:
|
||||
self.srcreflist = place.get_source_references()
|
||||
self.ref_not_loaded = 1
|
||||
else:
|
||||
self.srcreflist = []
|
||||
self.ref_not_loaded = 0
|
||||
|
||||
self.top_window = gtk.glade.XML(const.placesFile,"placeEditor","gramps")
|
||||
self.top = self.top_window.get_widget("placeEditor")
|
||||
@ -241,9 +242,11 @@ class EditPlace:
|
||||
self.top.set_transient_for(parent_window)
|
||||
self.add_itself_to_menu()
|
||||
self.top_window.get_widget('ok').set_sensitive(not self.db.readonly)
|
||||
Utils.temp_label(self.refs_label,self.top)
|
||||
self.top.show()
|
||||
gobject.idle_add(self.display_references)
|
||||
if self.ref_not_loaded:
|
||||
Utils.temp_label(self.refs_label,self.top)
|
||||
gobject.idle_add(self.display_references)
|
||||
self.ref_not_loaded = 0
|
||||
|
||||
def on_delete_event(self,obj,b):
|
||||
self.glry.close()
|
||||
@ -550,8 +553,6 @@ class EditPlace:
|
||||
else:
|
||||
Utils.unbold_label(self.refs_label,self.top)
|
||||
|
||||
self.ref_not_loaded = 0
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# disp_url
|
||||
|
@ -59,8 +59,10 @@ class EditSource:
|
||||
def __init__(self,source,db,parent,parent_window=None,readonly=False):
|
||||
if source:
|
||||
self.source = source
|
||||
self.ref_not_loaded = 1
|
||||
else:
|
||||
self.source = RelLib.Source()
|
||||
self.ref_not_loaded = 0
|
||||
self.db = db
|
||||
self.parent = parent
|
||||
self.name_display = NameDisplay.displayer.display
|
||||
@ -75,7 +77,6 @@ class EditSource:
|
||||
self.child_windows = {}
|
||||
self.path = db.get_save_path()
|
||||
self.not_loaded = 1
|
||||
self.ref_not_loaded = 1
|
||||
self.lists_changed = 0
|
||||
self.gallery_ok = 0
|
||||
mode = not self.db.readonly
|
||||
@ -185,8 +186,10 @@ class EditSource:
|
||||
self.top.set_transient_for(parent_window)
|
||||
self.add_itself_to_menu()
|
||||
self.top.show()
|
||||
Utils.temp_label(self.refs_label,self.top)
|
||||
gobject.idle_add(self.display_references)
|
||||
if self.ref_not_loaded:
|
||||
self.ref_not_loaded = 0
|
||||
Utils.temp_label(self.refs_label,self.top)
|
||||
gobject.idle_add(self.display_references)
|
||||
self.data_sel = self.datalist.get_selection()
|
||||
|
||||
def on_add_data_clicked(self,widget):
|
||||
|
@ -892,14 +892,16 @@ class GlobalMediaProperties:
|
||||
self.win_key = self
|
||||
self.child_windows = {}
|
||||
self.obj = obj
|
||||
self.alist = self.obj.get_attribute_list()[:]
|
||||
self.lists_changed = 0
|
||||
self.db = db
|
||||
self.refs = 0
|
||||
if obj:
|
||||
self.date_object = Date.Date(self.obj.get_date_object())
|
||||
self.alist = self.obj.get_attribute_list()[:]
|
||||
self.refs = 0
|
||||
else:
|
||||
self.date_object = Date.Date()
|
||||
self.alist = []
|
||||
self.refs = 1
|
||||
|
||||
self.path = self.db.get_save_path()
|
||||
self.change_dialog = gtk.glade.XML(const.imageselFile,
|
||||
@ -1012,11 +1014,13 @@ class GlobalMediaProperties:
|
||||
self.change_dialog.get_widget(name).set_sensitive(mode)
|
||||
|
||||
self.redraw_attr_list()
|
||||
self.display_refs()
|
||||
if parent_window:
|
||||
self.window.set_transient_for(parent_window)
|
||||
self.add_itself_to_menu()
|
||||
self.window.show()
|
||||
if not self.refs:
|
||||
Utils.temp_label(self.refs_label,self.window)
|
||||
gobject.idle_add(self.display_refs)
|
||||
|
||||
def on_delete_event(self,obj,b):
|
||||
self.close_child_windows()
|
||||
@ -1090,8 +1094,6 @@ class GlobalMediaProperties:
|
||||
return
|
||||
|
||||
def display_refs(self):
|
||||
if self.refs == 1:
|
||||
return
|
||||
self.refs = 1
|
||||
|
||||
(person_list,family_list,event_list,place_list,source_list
|
||||
@ -1135,13 +1137,14 @@ class GlobalMediaProperties:
|
||||
self.refmodel.add([_("Source"),gramps_id,name])
|
||||
|
||||
if any:
|
||||
Utils.bold_label(self.refs_label)
|
||||
Utils.bold_label(self.refs_label,self.window)
|
||||
else:
|
||||
Utils.unbold_label(self.refs_label)
|
||||
Utils.unbold_label(self.refs_label,self.window)
|
||||
|
||||
def on_notebook_switch_page(self,obj,junk,page):
|
||||
if page == 3:
|
||||
self.display_refs()
|
||||
if page == 3 and not self.refs:
|
||||
Utils.temp_label(self.refs_label,self.window)
|
||||
gobject.idle_add(self.display_refs)
|
||||
t = self.notes.get_buffer()
|
||||
text = unicode(t.get_text(t.get_start_iter(),t.get_end_iter(),False))
|
||||
if text:
|
||||
|
Loading…
Reference in New Issue
Block a user