* src/EditSource.py (__init__): set cursor to WATCH before displaying

references; call display_references when idle;
(display_references): set cursor to LEFT_PTR when done.
* src/ListModel.py (__init__): Typo.
* src/Utils.py (bold_label,unbold_label): make work with both
labels and their parent containers.


svn: r4669
This commit is contained in:
Alex Roitman 2005-05-25 05:09:11 +00:00
parent 956b65327a
commit f57b31016f
4 changed files with 40 additions and 15 deletions

View File

@ -1,3 +1,11 @@
2005-05-25 Alex Roitman <shura@gramps-project.org>
* src/EditSource.py (__init__): set cursor to WATCH before displaying
references; call display_references when idle;
(display_references): set cursor to LEFT_PTR when done.
* src/ListModel.py (__init__): Typo.
* src/Utils.py (bold_label,unbold_label): make work with both
labels and their parent containers.
2005-05-24 Don Allingham <don@gramps-project.org>
* various: CVS conflict resolution

View File

@ -32,7 +32,9 @@ from gettext import gettext as _
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gobject
import gtk.glade
import gtk.gdk
import gnome
#-------------------------------------------------------------------------
@ -180,11 +182,12 @@ class EditSource:
self.top_window.get_widget('ok').set_sensitive(not self.db.readonly)
self.display_references()
if parent_window:
self.top.set_transient_for(parent_window)
self.add_itself_to_menu()
self.top.show()
self.refs_label.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
gobject.idle_add(self.display_references)
self.data_sel = self.datalist.get_selection()
def on_add_data_clicked(self,widget):
@ -348,6 +351,7 @@ class EditSource:
Utils.unbold_label(self.refs_label)
self.ref_not_loaded = 0
self.refs_label.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
def on_source_apply_clicked(self,obj):
@ -403,7 +407,8 @@ class EditSource:
self.gallery.load_images()
elif page == 3 and self.ref_not_loaded:
self.ref_not_loaded = 0
self.display_references()
self.refs_label.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
gobject.idle_add(self.display_references)
text = unicode(self.notes_buffer.get_text(self.notes_buffer.get_start_iter(),
self.notes_buffer.get_end_iter(),False))
if text:

View File

@ -42,7 +42,7 @@ class ListModel:
self.mylist = []
self.data_index = 0
for l in dlist:
if l[3] == TOGGLE:
if l[0] == TOGGLE:
self.mylist.append(TYPE_BOOLEAN)
else:
self.mylist.append(TYPE_STRING)

View File

@ -403,20 +403,32 @@ def search_for(name):
#
#-------------------------------------------------------------------------
def bold_label(label):
clist = label.get_children()
text = unicode(clist[1].get_text())
clist[0].show()
clist[1].set_text("<b>%s</b>" % text )
clist[1].set_use_markup(True)
try:
clist = label.get_children()
text = unicode(clist[1].get_text())
clist[0].show()
clist[1].set_text("<b>%s</b>" % text )
clist[1].set_use_markup(True)
except AttributeError:
text = unicode(label.get_text())
label.set_text("<b>%s</b>" % text )
label.set_use_markup(1)
def unbold_label(label):
clist = label.get_children()
text = unicode(clist[1].get_text())
text = text.replace('<b>','')
text = text.replace('</b>','')
clist[0].hide()
clist[1].set_text(text)
clist[1].set_use_markup(False)
try:
clist = label.get_children()
text = unicode(clist[1].get_text())
text = text.replace('<b>','')
text = text.replace('</b>','')
clist[0].hide()
clist[1].set_text(text)
clist[1].set_use_markup(False)
except AttributeError:
text = unicode(label.get_text())
text = text.replace('<b>','')
text = text.replace('</b>','')
label.set_text(text)
label.set_use_markup(0)
#-------------------------------------------------------------------------
#