* 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:
parent
6d002fb835
commit
8a2270ff07
@ -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>
|
2005-05-24 Don Allingham <don@gramps-project.org>
|
||||||
* various: CVS conflict resolution
|
* various: CVS conflict resolution
|
||||||
|
|
||||||
|
@ -32,7 +32,9 @@ from gettext import gettext as _
|
|||||||
# GTK/Gnome modules
|
# GTK/Gnome modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
import gobject
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
|
import gtk.gdk
|
||||||
import gnome
|
import gnome
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -180,11 +182,12 @@ class EditSource:
|
|||||||
|
|
||||||
self.top_window.get_widget('ok').set_sensitive(not self.db.readonly)
|
self.top_window.get_widget('ok').set_sensitive(not self.db.readonly)
|
||||||
|
|
||||||
self.display_references()
|
|
||||||
if parent_window:
|
if parent_window:
|
||||||
self.top.set_transient_for(parent_window)
|
self.top.set_transient_for(parent_window)
|
||||||
self.add_itself_to_menu()
|
self.add_itself_to_menu()
|
||||||
self.top.show()
|
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()
|
self.data_sel = self.datalist.get_selection()
|
||||||
|
|
||||||
def on_add_data_clicked(self,widget):
|
def on_add_data_clicked(self,widget):
|
||||||
@ -348,6 +351,7 @@ class EditSource:
|
|||||||
Utils.unbold_label(self.refs_label)
|
Utils.unbold_label(self.refs_label)
|
||||||
|
|
||||||
self.ref_not_loaded = 0
|
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):
|
def on_source_apply_clicked(self,obj):
|
||||||
|
|
||||||
@ -403,7 +407,8 @@ class EditSource:
|
|||||||
self.gallery.load_images()
|
self.gallery.load_images()
|
||||||
elif page == 3 and self.ref_not_loaded:
|
elif page == 3 and self.ref_not_loaded:
|
||||||
self.ref_not_loaded = 0
|
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(),
|
text = unicode(self.notes_buffer.get_text(self.notes_buffer.get_start_iter(),
|
||||||
self.notes_buffer.get_end_iter(),False))
|
self.notes_buffer.get_end_iter(),False))
|
||||||
if text:
|
if text:
|
||||||
|
@ -42,7 +42,7 @@ class ListModel:
|
|||||||
self.mylist = []
|
self.mylist = []
|
||||||
self.data_index = 0
|
self.data_index = 0
|
||||||
for l in dlist:
|
for l in dlist:
|
||||||
if l[3] == TOGGLE:
|
if l[0] == TOGGLE:
|
||||||
self.mylist.append(TYPE_BOOLEAN)
|
self.mylist.append(TYPE_BOOLEAN)
|
||||||
else:
|
else:
|
||||||
self.mylist.append(TYPE_STRING)
|
self.mylist.append(TYPE_STRING)
|
||||||
|
@ -403,13 +403,19 @@ def search_for(name):
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def bold_label(label):
|
def bold_label(label):
|
||||||
|
try:
|
||||||
clist = label.get_children()
|
clist = label.get_children()
|
||||||
text = unicode(clist[1].get_text())
|
text = unicode(clist[1].get_text())
|
||||||
clist[0].show()
|
clist[0].show()
|
||||||
clist[1].set_text("<b>%s</b>" % text )
|
clist[1].set_text("<b>%s</b>" % text )
|
||||||
clist[1].set_use_markup(True)
|
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):
|
def unbold_label(label):
|
||||||
|
try:
|
||||||
clist = label.get_children()
|
clist = label.get_children()
|
||||||
text = unicode(clist[1].get_text())
|
text = unicode(clist[1].get_text())
|
||||||
text = text.replace('<b>','')
|
text = text.replace('<b>','')
|
||||||
@ -417,6 +423,12 @@ def unbold_label(label):
|
|||||||
clist[0].hide()
|
clist[0].hide()
|
||||||
clist[1].set_text(text)
|
clist[1].set_text(text)
|
||||||
clist[1].set_use_markup(False)
|
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)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user