* src/Utils.py (bold_label,unbold_label,temp_label): optionally
set cursor. * src/EditSource.py (__init__,on_switch_page): Call display_references using idle_add; (display_references): set cursor when done. svn: r4770
This commit is contained in:
parent
cd8579654a
commit
97900a087d
@ -1,3 +1,10 @@
|
||||
2005-06-03 Alexander Roitman <shura@gramps-project.org>
|
||||
* src/Utils.py (bold_label,unbold_label,temp_label): optionally
|
||||
set cursor.
|
||||
* src/EditSource.py (__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.
|
||||
|
||||
|
@ -32,6 +32,7 @@ from gettext import gettext as _
|
||||
# GTK/Gnome modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gobject
|
||||
import gtk.glade
|
||||
import gnome
|
||||
|
||||
@ -180,11 +181,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()
|
||||
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):
|
||||
@ -343,9 +345,9 @@ class EditSource:
|
||||
self.model.add([_("Media"),gramps_id,name],(5,handle))
|
||||
|
||||
if any:
|
||||
Utils.bold_label(self.refs_label)
|
||||
Utils.bold_label(self.refs_label,self.top)
|
||||
else:
|
||||
Utils.unbold_label(self.refs_label)
|
||||
Utils.unbold_label(self.refs_label,self.top)
|
||||
|
||||
self.ref_not_loaded = 0
|
||||
|
||||
@ -403,7 +405,8 @@ class EditSource:
|
||||
self.gallery.load_images()
|
||||
elif page == 3 and self.ref_not_loaded:
|
||||
self.ref_not_loaded = 0
|
||||
self.display_references()
|
||||
Utils.temp_label(self.refs_label,self.top)
|
||||
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:
|
||||
|
@ -34,6 +34,7 @@ import locale
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gtk
|
||||
import gtk.gdk
|
||||
import gnome
|
||||
|
||||
try:
|
||||
@ -402,17 +403,34 @@ def search_for(name):
|
||||
# Change label apperance
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def bold_label(label):
|
||||
def bold_label(label,widget=None):
|
||||
text = unicode(label.get_text())
|
||||
text = text.replace('<i>','')
|
||||
text = text.replace('</i>','')
|
||||
label.set_text("<b>%s</b>" % text )
|
||||
label.set_use_markup(1)
|
||||
label.set_use_markup(True)
|
||||
if widget:
|
||||
widget.window.set_cursor(None)
|
||||
|
||||
def unbold_label(label):
|
||||
def unbold_label(label,widget=None):
|
||||
text = unicode(label.get_text())
|
||||
text = text.replace('<b>','')
|
||||
text = text.replace('</b>','')
|
||||
text = text.replace('<i>','')
|
||||
text = text.replace('</i>','')
|
||||
label.set_text(text)
|
||||
label.set_use_markup(0)
|
||||
label.set_use_markup(False)
|
||||
if widget:
|
||||
widget.window.set_cursor(None)
|
||||
|
||||
def temp_label(label,widget=None):
|
||||
text = unicode(label.get_text())
|
||||
text = text.replace('<b>','')
|
||||
text = text.replace('</b>','')
|
||||
label.set_text("<i>%s</i>" % text )
|
||||
label.set_use_markup(True)
|
||||
if widget:
|
||||
widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user