* src/DateEdit.py (DateEdit.invoke_date_editor):
Check the built date and display LED (closes # 1031065). * src/Sources.py (draw): Properly display date for sourceref; (on_sourceok_clicked): Properly parse date for sourceref (closes # 1031156). svn: r3560
This commit is contained in:
parent
e5b8384463
commit
1487014730
@ -1,3 +1,10 @@
|
||||
2004-09-20 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/DateEdit.py (DateEdit.invoke_date_editor):
|
||||
Check the built date and display LED (closes # 1031065).
|
||||
* src/Sources.py (draw): Properly display date for sourceref;
|
||||
(on_sourceok_clicked): Properly parse date for sourceref
|
||||
(closes # 1031156).
|
||||
|
||||
2004-09-19 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/Date.py (is_equal): Add method -- needed to compare dates
|
||||
for being identical, since __cmp__ only compares the sorting value
|
||||
|
@ -160,6 +160,7 @@ class DateEdit:
|
||||
if the_date:
|
||||
self.date_obj.copy(the_date)
|
||||
self.text_obj.set_text(self.dd.display(self.date_obj))
|
||||
self.check()
|
||||
print "The date was built as follows:", self.date_obj
|
||||
else:
|
||||
print "Cancel was pressed, date not changed."
|
||||
|
@ -38,6 +38,7 @@ import gnome
|
||||
import const
|
||||
import Utils
|
||||
import RelLib
|
||||
import DateHandler
|
||||
from gettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -339,6 +340,9 @@ class SourceEditor:
|
||||
else:
|
||||
self.active_source = None
|
||||
|
||||
self.dd = DateHandler.create_display()
|
||||
self.dp = DateHandler.create_parser()
|
||||
|
||||
self.draw(self.active_source)
|
||||
self.set_button()
|
||||
if self.parent:
|
||||
@ -409,7 +413,7 @@ class SourceEditor:
|
||||
spage.get_buffer().set_text(self.source_ref.get_page())
|
||||
date = self.source_ref.get_date()
|
||||
if date:
|
||||
self.get_widget("sdate").set_text(date.get_date())
|
||||
self.get_widget("sdate").set_text(self.dd.display(date))
|
||||
|
||||
text = self.get_widget("stext")
|
||||
text.get_buffer().set_text(self.source_ref.get_text())
|
||||
@ -473,7 +477,7 @@ class SourceEditor:
|
||||
buf.get_end_iter(),gtk.FALSE))
|
||||
|
||||
self.source_ref.set_page(page)
|
||||
self.source_ref.get_date().set(date)
|
||||
self.source_ref.get_date().copy(self.dp.parse(date))
|
||||
self.source_ref.set_text(text)
|
||||
self.source_ref.set_comments(comments)
|
||||
self.source_ref.set_confidence_level(conf)
|
||||
|
Loading…
Reference in New Issue
Block a user