* src/Sources.py: Unicode conversion from gtk.TextView.

* src/Witness.py: Unicode conversion from gtk.TextView.
* src/Report.py: Unicode conversion from gtk.TextView.
* src/NameEdit.py: Unicode conversion from gtk.TextView.
* src/Marriage.py: Unicode conversion from gtk.TextView.
* src/ImageSelect.py: Unicode conversion from gtk.TextView.
* src/EventEdit.py: Unicode conversion from gtk.TextView.
* src/EditSource.py: Unicode conversion from gtk.TextView.
* src/EditPlace.py: Unicode conversion from gtk.TextView.
* src/EditPerson.py: Unicode conversion from gtk.TextView.
* src/AutoComp.py: Unicode conversion from gtk.TextView.
* src/AttrEdit.py: Unicode conversion from gtk.TextView.
* src/AddrEdit.py: Unicode conversion from gtk.TextView.
* src/plugins/BookReport.py: Unicode conversion from gtk.Entry
and gtk.TextView.
* src/plugins/ChangeTypes.py: Unicode conversion.
* src/plugins/EventCmp.py: Unicode conversion.
* src/plugins/FilterEditor.py: Unicode conversion.
* src/plugins/SimpleBookTitle.py: Unicode conversion.
* src/plugins/TimeLine.py: Unicode conversion.
* src/plugins/WebPage.py: Unicode conversion.
* src/plugins/WriteGedcom.py: Unicode conversion.
* src/plugins/WritePkg.py: Unicode conversion.
* src/plugins/eval.py: Unicode conversion.
* src/plugins/soundgen.py: Unicode conversion.


svn: r2536
This commit is contained in:
Alex Roitman 2003-12-17 16:06:36 +00:00
parent d4bdb508d0
commit 112addeef6
25 changed files with 118 additions and 76 deletions

View File

@ -1,3 +1,30 @@
2003-12-17 Alex Roitman <shura@alex.neuro.umn.edu>
* src/Sources.py: Unicode conversion from gtk.TextView.
* src/Witness.py: Unicode conversion from gtk.TextView.
* src/Report.py: Unicode conversion from gtk.TextView.
* src/NameEdit.py: Unicode conversion from gtk.TextView.
* src/Marriage.py: Unicode conversion from gtk.TextView.
* src/ImageSelect.py: Unicode conversion from gtk.TextView.
* src/EventEdit.py: Unicode conversion from gtk.TextView.
* src/EditSource.py: Unicode conversion from gtk.TextView.
* src/EditPlace.py: Unicode conversion from gtk.TextView.
* src/EditPerson.py: Unicode conversion from gtk.TextView.
* src/AutoComp.py: Unicode conversion from gtk.TextView.
* src/AttrEdit.py: Unicode conversion from gtk.TextView.
* src/AddrEdit.py: Unicode conversion from gtk.TextView.
* src/plugins/BookReport.py: Unicode conversion from gtk.Entry
and gtk.TextView.
* src/plugins/ChangeTypes.py: Unicode conversion.
* src/plugins/EventCmp.py: Unicode conversion.
* src/plugins/FilterEditor.py: Unicode conversion.
* src/plugins/SimpleBookTitle.py: Unicode conversion.
* src/plugins/TimeLine.py: Unicode conversion.
* src/plugins/WebPage.py: Unicode conversion.
* src/plugins/WriteGedcom.py: Unicode conversion.
* src/plugins/WritePkg.py: Unicode conversion.
* src/plugins/eval.py: Unicode conversion.
* src/plugins/soundgen.py: Unicode conversion.
2003-12-17 Tim Waugh <twaugh@redhat.com> 2003-12-17 Tim Waugh <twaugh@redhat.com>
* src/plugins/Ancestors.py * src/plugins/Ancestors.py
(ComprehensiveAncestorsReport.write_report): No need for separate (ComprehensiveAncestorsReport.write_report): No need for separate

View File

@ -155,7 +155,7 @@ class AddressEditor:
phone = unicode(self.phone.get_text()) phone = unicode(self.phone.get_text())
postal = unicode(self.postal.get_text()) postal = unicode(self.postal.get_text())
b = self.note_field.get_buffer() b = self.note_field.get_buffer()
note = b.get_text(b.get_start_iter(),b.get_end_iter(),gtk.FALSE) note = unicode(b.get_text(b.get_start_iter(),b.get_end_iter(),gtk.FALSE))
format = self.preform.get_active() format = self.preform.get_active()
priv = self.priv.get_active() priv = self.priv.get_active()
@ -195,7 +195,7 @@ class AddressEditor:
def on_switch_page(self,obj,a,page): def on_switch_page(self,obj,a,page):
buf = self.note_field.get_buffer() buf = self.note_field.get_buffer()
text = buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE) text = unicode(buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:

View File

@ -156,7 +156,7 @@ class AttributeEditor:
value = unicode(self.value_field.get_text()) value = unicode(self.value_field.get_text())
buf = self.note_field.get_buffer() buf = self.note_field.get_buffer()
note = buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE) note = unicode(buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE))
format = self.preform.get_active() format = self.preform.get_active()
priv = self.priv.get_active() priv = self.priv.get_active()
@ -193,7 +193,7 @@ class AttributeEditor:
def on_switch_page(self,obj,a,page): def on_switch_page(self,obj,a,page):
buf = self.note_field.get_buffer() buf = self.note_field.get_buffer()
text = buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE) text = unicode(buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:

View File

@ -18,6 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
""" """
Adds autocompletion to a GtkEntry box, using the passed list of Adds autocompletion to a GtkEntry box, using the passed list of
strings as the possible completions. This work was adapted from code strings as the possible completions. This work was adapted from code
@ -193,7 +195,7 @@ class AutoCombo(AutoCompBase):
return return
# Get the user's text # Get the user's text
typed = entry.get_text() typed = unicode(entry.get_text())
if (not typed): if (not typed):
return return
if type(typed) != self.t: if type(typed) != self.t:
@ -259,7 +261,7 @@ class AutoEntry(AutoCompBase):
gtk.timeout_remove(timer) gtk.timeout_remove(timer)
# Get the user's text # Get the user's text
typed = entry.get_text() typed = unicode(entry.get_text())
if type(typed) != self.t: if type(typed) != self.t:
typed = unicode(typed) typed = unicode(typed)

View File

@ -822,7 +822,6 @@ class EditPerson:
# Remember old combo list input # Remember old combo list input
bplace_text = unicode(self.bplace.get_text()) bplace_text = unicode(self.bplace.get_text())
dplace_text = unicode(self.dplace.get_text()) dplace_text = unicode(self.dplace.get_text())
prev_btext = Utils.strip_id(bplace_text) prev_btext = Utils.strip_id(bplace_text)
@ -1013,8 +1012,8 @@ class EditPerson:
male = self.is_male.get_active() male = self.is_male.get_active()
female = self.is_female.get_active() female = self.is_female.get_active()
unknown = self.is_unknown.get_active() unknown = self.is_unknown.get_active()
text = 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(),gtk.FALSE) self.notes_buffer.get_end_iter(),gtk.FALSE))
format = self.preform.get_active() format = self.preform.get_active()
idval = unicode(self.gid.get_text()) idval = unicode(self.gid.get_text())
@ -1491,8 +1490,8 @@ class EditPerson:
"the person's marriages.") "the person's marriages.")
ErrorDialog(msg) ErrorDialog(msg)
text = 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(),gtk.FALSE) self.notes_buffer.get_end_iter(),gtk.FALSE))
if text != self.person.getNote(): if text != self.person.getNote():
self.person.setNote(text) self.person.setNote(text)
@ -1632,8 +1631,8 @@ class EditPerson:
elif page == 9 and self.lds_not_loaded: elif page == 9 and self.lds_not_loaded:
self.lds_not_loaded = 0 self.lds_not_loaded = 0
self.draw_lds() self.draw_lds()
text = 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(),gtk.FALSE) self.notes_buffer.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:

View File

@ -289,8 +289,8 @@ class EditPlace:
def on_place_apply_clicked(self): def on_place_apply_clicked(self):
note = self.note_buffer.get_text(self.note_buffer.get_start_iter(), note = unicode(self.note_buffer.get_text(self.note_buffer.get_start_iter(),
self.note_buffer.get_end_iter(),gtk.FALSE) self.note_buffer.get_end_iter(),gtk.FALSE))
format = self.preform.get_active() format = self.preform.get_active()
mloc = self.place.get_main_location() mloc = self.place.get_main_location()
@ -331,8 +331,8 @@ class EditPlace:
elif page == 6 and self.ref_not_loaded: elif page == 6 and self.ref_not_loaded:
self.ref_not_loaded = 0 self.ref_not_loaded = 0
self.display_references() self.display_references()
text = self.note_buffer.get_text(self.note_buffer.get_start_iter(), text = unicode(self.note_buffer.get_text(self.note_buffer.get_start_iter(),
self.note_buffer.get_end_iter(),gtk.FALSE) self.note_buffer.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:

View File

@ -238,8 +238,8 @@ class EditSource:
author = unicode(self.author.get_text()) author = unicode(self.author.get_text())
pubinfo = unicode(self.pubinfo.get_text()) pubinfo = unicode(self.pubinfo.get_text())
abbrev = unicode(self.abbrev.get_text()) abbrev = unicode(self.abbrev.get_text())
note = self.notes_buffer.get_text(self.notes_buffer.get_start_iter(), note = unicode(self.notes_buffer.get_text(self.notes_buffer.get_start_iter(),
self.notes_buffer.get_end_iter(),gtk.FALSE) self.notes_buffer.get_end_iter(),gtk.FALSE))
format = self.preform.get_active() format = self.preform.get_active()
if author != self.source.getAuthor(): if author != self.source.getAuthor():
@ -278,8 +278,8 @@ class EditSource:
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.display_references()
text = 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(),gtk.FALSE) self.notes_buffer.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:

View File

@ -218,7 +218,7 @@ class EventEditor:
self.date_check.set_calendar(cobj()) self.date_check.set_calendar(cobj())
def get_place(self,field,makenew=0): def get_place(self,field,makenew=0):
text = unicode(strip(field.get_text())) text = strip(unicode(field.get_text()))
if text: if text:
if self.pmap.has_key(text): if self.pmap.has_key(text):
return self.parent.db.getPlaceMap()[self.pmap[text]] return self.parent.db.getPlaceMap()[self.pmap[text]]
@ -243,7 +243,7 @@ class EventEditor:
eplace_obj = self.get_place(self.place_field,1) eplace_obj = self.get_place(self.place_field,1)
buf = self.note_field.get_buffer() buf = self.note_field.get_buffer()
enote = buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE) enote = unicode(buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE))
eformat = self.preform.get_active() eformat = self.preform.get_active()
edesc = unicode(self.descr_field.get_text()) edesc = unicode(self.descr_field.get_text())
epriv = self.priv.get_active() epriv = self.priv.get_active()
@ -305,7 +305,7 @@ class EventEditor:
def on_switch_page(self,obj,a,page): def on_switch_page(self,obj,a,page):
buf = self.note_field.get_buffer() buf = self.note_field.get_buffer()
text = buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE) text = unicode(buf.get_text(buf.get_start_iter(),buf.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:

View File

@ -736,7 +736,7 @@ class LocalMediaProperties:
def on_notebook_switch_page(self,obj,junk,page): def on_notebook_switch_page(self,obj,junk,page):
t = self.notes.get_buffer() t = self.notes.get_buffer()
text = t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE) text = unicode(t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:
@ -746,7 +746,7 @@ class LocalMediaProperties:
priv = self.change_dialog.get_widget("private").get_active() priv = self.change_dialog.get_widget("private").get_active()
t = self.notes.get_buffer() t = self.notes.get_buffer()
text = t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE) text = unicode(t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE))
note = self.photo.getNote() note = self.photo.getNote()
format = self.preform.get_active() format = self.preform.get_active()
if text != note or priv != self.photo.getPrivacy(): if text != note or priv != self.photo.getPrivacy():
@ -976,7 +976,7 @@ class GlobalMediaProperties:
if page == 3: if page == 3:
self.display_refs() self.display_refs()
t = self.notes.get_buffer() t = self.notes.get_buffer()
text = t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE) text = unicode(t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:
@ -984,7 +984,7 @@ class GlobalMediaProperties:
def on_apply_clicked(self, obj): def on_apply_clicked(self, obj):
t = self.notes.get_buffer() t = self.notes.get_buffer()
text = t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE) text = unicode(t.get_text(t.get_start_iter(),t.get_end_iter(),gtk.FALSE))
desc = unicode(self.descr_window.get_text()) desc = unicode(self.descr_window.get_text())
note = self.object.getNote() note = self.object.getNote()
format = self.preform.get_active() format = self.preform.get_active()

View File

@ -430,8 +430,8 @@ class Marriage:
if self.complete.get_active() != self.family.getComplete(): if self.complete.get_active() != self.family.getComplete():
changed = 1 changed = 1
text = 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(),gtk.FALSE) self.notes_buffer.get_end_iter(),gtk.FALSE))
format = self.preform.get_active() format = self.preform.get_active()
if text != self.family.getNote(): if text != self.family.getNote():
@ -526,8 +526,8 @@ class Marriage:
self.family.setRelationship(val) self.family.setRelationship(val)
Utils.modified() Utils.modified()
text = 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(),gtk.FALSE) self.notes_buffer.get_end_iter(),gtk.FALSE))
if text != self.family.getNote(): if text != self.family.getNote():
self.family.setNote(text) self.family.setNote(text)
Utils.modified() Utils.modified()
@ -699,8 +699,8 @@ class Marriage:
list.insert(dest,obj) list.insert(dest,obj)
def on_switch_page(self,obj,a,page): def on_switch_page(self,obj,a,page):
text = 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(),gtk.FALSE) self.notes_buffer.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:
@ -721,7 +721,7 @@ class Marriage:
def get_place(self,makenew=0): def get_place(self,makenew=0):
field = self.lds_place.entry field = self.lds_place.entry
text = unicode(string.strip(field.get_text())) text = string.strip(unicode(field.get_text()))
if text: if text:
if self.pmap.has_key(text): if self.pmap.has_key(text):
return self.db.getPlaceMap()[self.pmap[text]] return self.db.getPlaceMap()[self.pmap[text]]

View File

@ -136,8 +136,8 @@ class NameEditor:
last = unicode(self.surname_field.get_text()) last = unicode(self.surname_field.get_text())
title = unicode(self.title_field.get_text()) title = unicode(self.title_field.get_text())
suffix = unicode(self.suffix_field.get_text()) suffix = unicode(self.suffix_field.get_text())
note = self.note_buffer.get_text(self.note_buffer.get_start_iter(), note = unicode(self.note_buffer.get_text(self.note_buffer.get_start_iter(),
self.note_buffer.get_end_iter(),gtk.FALSE) self.note_buffer.get_end_iter(),gtk.FALSE))
format = self.preform.get_active() format = self.preform.get_active()
priv = self.priv.get_active() priv = self.priv.get_active()
@ -195,8 +195,8 @@ class NameEditor:
self.parent.lists_changed = 1 self.parent.lists_changed = 1
def on_switch_page(self,obj,a,page): def on_switch_page(self,obj,a,page):
text = self.note_buffer.get_text(self.note_buffer.get_start_iter(), text = unicode(self.note_buffer.get_text(self.note_buffer.get_start_iter(),
self.note_buffer.get_end_iter(),gtk.FALSE) self.note_buffer.get_end_iter(),gtk.FALSE))
if text: if text:
Utils.bold_label(self.notes_label) Utils.bold_label(self.notes_label)
else: else:

View File

@ -19,6 +19,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
"Report Generation Framework" "Report Generation Framework"
__author__ = "David R. Hampton, Donald N. Allingham" __author__ = "David R. Hampton, Donald N. Allingham"
@ -694,7 +696,7 @@ class BareReportDialog:
if self.extra_textbox: if self.extra_textbox:
b = self.extra_textbox.get_buffer() b = self.extra_textbox.get_buffer()
text_val = b.get_text(b.get_start_iter(),b.get_end_iter(),gtk.FALSE) text_val = unicode(b.get_text(b.get_start_iter(),b.get_end_iter(),gtk.FALSE))
self.report_text = text_val.split('\n') self.report_text = text_val.split('\n')
else: else:
self.report_text = "" self.report_text = ""

View File

@ -359,16 +359,16 @@ class SourceEditor:
conf = self.get_widget("conf").get_menu().get_active().get_data('a') conf = self.get_widget("conf").get_menu().get_active().get_data('a')
buffer = self.get_widget("scomment").get_buffer() buffer = self.get_widget("scomment").get_buffer()
comments = buffer.get_text(buffer.get_start_iter(), comments = unicode(buffer.get_text(buffer.get_start_iter(),
buffer.get_end_iter(),gtk.FALSE) buffer.get_end_iter(),gtk.FALSE))
buffer = self.get_widget("stext").get_buffer() buffer = self.get_widget("stext").get_buffer()
text = buffer.get_text(buffer.get_start_iter(), text = unicode(buffer.get_text(buffer.get_start_iter(),
buffer.get_end_iter(),gtk.FALSE) buffer.get_end_iter(),gtk.FALSE))
buffer = self.get_widget('spage').get_buffer() buffer = self.get_widget('spage').get_buffer()
page = buffer.get_text(buffer.get_start_iter(), page = unicode(buffer.get_text(buffer.get_start_iter(),
buffer.get_end_iter(),gtk.FALSE) buffer.get_end_iter(),gtk.FALSE))
self.source_ref.setPage(page) self.source_ref.setPage(page)
self.source_ref.getDate().set(date) self.source_ref.getDate().set(date)

View File

@ -190,6 +190,6 @@ class WitnessEditor:
self.ref.set_value(unicode(self.name.get_text())) self.ref.set_value(unicode(self.name.get_text()))
c = self.comment.get_buffer() c = self.comment.get_buffer()
self.ref.set_comment(c.get_text(c.get_start_iter(),c.get_end_iter(),gtk.FALSE)) self.ref.set_comment(unicode(c.get_text(c.get_start_iter(),c.get_end_iter(),gtk.FALSE)))
if self.update: if self.update:
self.update() self.update()

View File

@ -863,7 +863,7 @@ class BookReportSelector:
Save the current book in the xml booklist file. Save the current book in the xml booklist file.
""" """
self.book_list = BookList(self.file) self.book_list = BookList(self.file)
name = self.name_entry.get_text() name = unicode(self.name_entry.get_text())
self.book.set_name(name) self.book.set_name(name)
self.book.set_dbname(self.db.getSavePath()) self.book.set_dbname(self.db.getSavePath())
self.book_list.set_book(name,self.book) self.book_list.set_book(name,self.book)

View File

@ -18,6 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
"Database Processing/Rename personal event types" "Database Processing/Rename personal event types"
import os import os
@ -73,8 +75,8 @@ class ChangeTypes:
def on_apply_clicked(self,obj): def on_apply_clicked(self,obj):
modified = 0 modified = 0
original = self.glade.get_widget("original_text").get_text() original = unicode(self.glade.get_widget("original_text").get_text())
new = self.glade.get_widget("new_text").get_text() new = unicode(self.glade.get_widget("new_text").get_text())
for person in self.db.getPersonMap().values(): for person in self.db.getPersonMap().values():
for event in person.getEventList(): for event in person.getEventList():

View File

@ -18,6 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
"Analysis and Exploration/Compare individual events" "Analysis and Exploration/Compare individual events"
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -321,7 +323,7 @@ class DisplayChart:
def on_save_clicked(self,obj): def on_save_clicked(self,obj):
name = self.form.get_widget("filename").get_text() name = unicode(self.form.get_widget("filename").get_text())
pstyle = BaseDoc.PaperStyle("junk",10,10) pstyle = BaseDoc.PaperStyle("junk",10,10)
doc = OpenSpreadSheet.OpenSpreadSheet(pstyle,BaseDoc.PAPER_PORTRAIT) doc = OpenSpreadSheet.OpenSpreadSheet(pstyle,BaseDoc.PAPER_PORTRAIT)

View File

@ -18,6 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
"""Generic Filtering Routines""" """Generic Filtering Routines"""
__author__ = "Don Allingham" __author__ = "Don Allingham"
@ -121,7 +123,7 @@ class MyFilters(gtk.Combo):
def get_text(self): def get_text(self):
if self.ok: if self.ok:
return self.entry.get_text() return unicode(self.entry.get_text())
else: else:
return "" return ""
@ -176,7 +178,7 @@ class MyID(gtk.HBox):
self.set_text(val.getId()) self.set_text(val.getId())
def get_text(self): def get_text(self):
return self.entry.get_text() return unicode(self.entry.get_text())
def set_text(self,val): def set_text(self,val):
try: try:
@ -203,7 +205,7 @@ class MySelect(gtk.Combo):
self.show() self.show()
def get_text(self): def get_text(self):
return self.entry.get_text() return unicode(self.entry.get_text())
def set_text(self,val): def set_text(self,val):
self.entry.set_text(val) self.entry.set_text(val)
@ -346,7 +348,7 @@ class FilterEditor:
self.draw_rules() self.draw_rules()
def filter_name_changed(self,obj): def filter_name_changed(self,obj):
name = self.fname.get_text() name = unicode(self.fname.get_text())
self.ok.set_sensitive(len(name) != 0) self.ok.set_sensitive(len(name) != 0)
def select_row(self,obj): def select_row(self,obj):
@ -367,11 +369,11 @@ class FilterEditor:
self.top.destroy() self.top.destroy()
def on_ok_clicked(self,obj): def on_ok_clicked(self,obj):
n = self.fname.get_text().strip() n = unicode(self.fname.get_text()).strip()
if n == '': if n == '':
return return
self.filter.set_name(n) self.filter.set_name(n)
self.filter.set_comment(self.comment.get_text().strip()) self.filter.set_comment(unicode(self.comment.get_text()).strip())
for f in self.filterdb.get_filters()[:]: for f in self.filterdb.get_filters()[:]:
if n == f.get_name(): if n == f.get_name():
self.filterdb.get_filters().remove(f) self.filterdb.get_filters().remove(f)
@ -556,13 +558,13 @@ class FilterEditor:
self.draw_rules() self.draw_rules()
def rule_ok(self,obj): def rule_ok(self,obj):
name = self.rule_name.get_text() name = unicode(self.rule_name.get_text())
try: try:
page = self.name2page[name] page = self.name2page[name]
(n,c,v,t) = self.page[page] (n,c,v,t) = self.page[page]
value_list = [] value_list = []
for x in t: for x in t:
value_list.append(x.get_text()) value_list.append(unicode(x.get_text()))
store,iter = self.rlist.get_selected() store,iter = self.rlist.get_selected()
new_rule = c(value_list) new_rule = c(value_list)
if self.active_rule: if self.active_rule:

View File

@ -17,6 +17,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
# python modules # python modules
@ -344,9 +346,9 @@ class SimpleBookTitleDialog(Report.BareReportDialog):
Report.BareReportDialog.parse_report_options_frame(self) Report.BareReportDialog.parse_report_options_frame(self)
# get values from the widgets # get values from the widgets
self.title_string = self.title_entry.get_text() self.title_string = unicode(self.title_entry.get_text())
self.subtitle_string = self.subtitle_entry.get_text() self.subtitle_string = unicode(self.subtitle_entry.get_text())
self.footer_string = self.footer_entry.get_text() self.footer_string = unicode(self.footer_entry.get_text())
self.size_index = self.size_menu.get_history() self.size_index = self.size_menu.get_history()
def on_cancel(self, obj): def on_cancel(self, obj):

View File

@ -18,6 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
""" """
Timeline report Timeline report
""" """
@ -446,7 +448,7 @@ class TimeLineDialog(Report.DrawReportDialog):
def make_report(self): def make_report(self):
title = self.title_box.get_text() title = unicode(self.title_box.get_text())
sort_func = self.sort_menu.get_active().get_data('sort') sort_func = self.sort_menu.get_active().get_data('sort')
try: try:
@ -600,7 +602,7 @@ class TimeLineBareDialog(Report.BareReportDialog):
self.person = self.new_person self.person = self.new_person
self.filter_num = self.filter_combo.get_history() self.filter_num = self.filter_combo.get_history()
self.sort_func_num = self.sort_style.get_history() self.sort_func_num = self.sort_style.get_history()
self.title_str = self.title_box.get_text() self.title_str = unicode(self.title_box.get_text())
self.options = ( self.person.getId(), self.filter_num, self.options = ( self.person.getId(), self.filter_num,
self.sort_func_num, self.title_str ) self.sort_func_num, self.title_str )

View File

@ -1170,14 +1170,14 @@ class WebReportDialog(Report.ReportDialog):
user selected choices for later use.""" user selected choices for later use."""
self.restrict = self.restrict_living.get_active() self.restrict = self.restrict_living.get_active()
self.private = self.no_private.get_active() self.private = self.no_private.get_active()
self.img_dir_text = self.imgdir.get_text() self.img_dir_text = unicode(self.imgdir.get_text())
self.html_ext = string.strip(self.ext.entry.get_text()) self.html_ext = string.strip(unicode(self.ext.entry.get_text()))
if self.html_ext[0] == '.': if self.html_ext[0] == '.':
self.html_ext = self.html_ext[1:] self.html_ext = self.html_ext[1:]
self.use_id = self.include_id.get_active() self.use_id = self.include_id.get_active()
self.use_gendex = self.gendex.get_active() self.use_gendex = self.gendex.get_active()
self.id_link = string.strip(self.linkpath.get_text()) self.id_link = string.strip(unicode(self.linkpath.get_text()))
self.srccomments = self.no_comments.get_active() self.srccomments = self.no_comments.get_active()
if self.no_images.get_active() == 1: if self.no_images.get_active() == 1:
self.photos = 0 self.photos = 0

View File

@ -461,7 +461,7 @@ class GedcomWriter:
self.images = self.topDialog.get_widget ("images").get_active () self.images = self.topDialog.get_widget ("images").get_active ()
if self.images: if self.images:
images_path = self.topDialog.get_widget ("images_path") images_path = self.topDialog.get_widget ("images_path")
self.images_path = images_path.get_text () self.images_path = unicode(images_path.get_text ())
self.dest = self.target_ged.get_dest() self.dest = self.target_ged.get_dest()
self.adopt = self.target_ged.get_adopt() self.adopt = self.target_ged.get_adopt()
@ -481,7 +481,7 @@ class GedcomWriter:
self.cnvtxt = keep_utf8 self.cnvtxt = keep_utf8
self.nl = self.cnvtxt(self.target_ged.get_endl()) self.nl = self.cnvtxt(self.target_ged.get_endl())
name = self.topDialog.get_widget("filename").get_text() name = unicode(self.topDialog.get_widget("filename").get_text())
if cfilter == None: if cfilter == None:
for p in self.db.getPersonKeys(): for p in self.db.getPersonKeys():

View File

@ -95,7 +95,7 @@ class PackageWriter:
self.top.get_widget("packageExport").show() self.top.get_widget("packageExport").show()
def on_ok_clicked(self,obj): def on_ok_clicked(self,obj):
name = self.top.get_widget("filename").get_text() name = unicode(self.top.get_widget("filename").get_text())
Utils.destroy_passed_object(obj) Utils.destroy_passed_object(obj)
self.export(name) self.export(name)

View File

@ -18,6 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
""" """
Provides a python evaluation window Provides a python evaluation window
""" """
@ -53,8 +55,8 @@ class EvalWindow:
_("Python Evaluation Window")) _("Python Evaluation Window"))
def apply_clicked(self,obj): def apply_clicked(self,obj):
text = self.ebuf.get_text(self.ebuf.get_start_iter(), text = unicode(self.ebuf.get_text(self.ebuf.get_start_iter(),
self.ebuf.get_end_iter(),gtk.FALSE) self.ebuf.get_end_iter(),gtk.FALSE))
outtext = cStringIO.StringIO() outtext = cStringIO.StringIO()
errtext = cStringIO.StringIO() errtext = cStringIO.StringIO()

View File

@ -1,7 +1,7 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2000 Donald N. Allingham # Copyright (C) 2000-2003 Donald N. Allingham
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -18,6 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id$
"Utilities/Generate SoundEx codes" "Utilities/Generate SoundEx codes"
import os import os
@ -80,7 +82,7 @@ class SoundGen:
self.glade.get_widget("soundEx").show() self.glade.get_widget("soundEx").show()
def on_apply_clicked(self,obj): def on_apply_clicked(self,obj):
self.value.set_text(soundex.soundex(obj.get_text())) self.value.set_text(soundex.soundex(unicode(obj.get_text())))
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -95,5 +97,3 @@ register_tool(
category=_("Utilities"), category=_("Utilities"),
description=_("Generates SoundEx codes for names") description=_("Generates SoundEx codes for names")
) )