* src/AddMedia.py: use new find_mime_type_pixbuf instead of

find_icon
* src/ImageSelect.py: remove internal media widgets, use new
find_mime_type_pixbuf instead of find_icon
* src/ImgManip.py: catch pixbuf_new_from_file exception
* src/MediaView.py: use new find_mime_type_pixbuf instead of
find_icon
* src/SelectObject.py: use new find_mime_type_pixbuf instead of
find_icon
* various: replace the deprecated gtk.TRUE/gtk.FALSE with
True/False


svn: r4085
This commit is contained in:
Don Allingham 2005-02-24 00:25:34 +00:00
parent 827ba0d85b
commit 55a416f422
44 changed files with 217 additions and 223 deletions

View File

@ -1,3 +1,16 @@
2005-02-23 Don Allingham <dallingham@users.sourceforge.net>
* src/AddMedia.py: use new find_mime_type_pixbuf instead of
find_icon
* src/ImageSelect.py: remove internal media widgets, use new
find_mime_type_pixbuf instead of find_icon
* src/ImgManip.py: catch pixbuf_new_from_file exception
* src/MediaView.py: use new find_mime_type_pixbuf instead of
find_icon
* src/SelectObject.py: use new find_mime_type_pixbuf instead of
find_icon
* various: replace the deprecated gtk.TRUE/gtk.FALSE with
True/False
2005-02-22 Don Allingham <dallingham@users.sourceforge.net>
* src/gramps.glade: use ComboBox instead of ComboBoxEntry
for temple

View File

@ -169,7 +169,7 @@ class AddMediaObject:
if mtype[0:5] == "image":
image = RelImage.scale_image(filename,const.thumbScale)
else:
image = gtk.gdk.pixbuf_new_from_file(Utils.find_icon(mtype))
image = Utils.find_mime_type_pixbuf(mtype)
self.image.set_from_pixbuf(image)
def run(self):

View File

@ -145,18 +145,18 @@ class AddSpouse:
def add_columns(self,tree):
column = gtk.TreeViewColumn(_('Name'), self.renderer,text=0)
column.set_resizable(gtk.TRUE)
#column.set_clickable(gtk.TRUE)
column.set_resizable(True)
#column.set_clickable(True)
column.set_min_width(225)
tree.append_column(column)
column = gtk.TreeViewColumn(_('ID'), self.renderer,text=1)
column.set_resizable(gtk.TRUE)
#column.set_clickable(gtk.TRUE)
column.set_resizable(True)
#column.set_clickable(True)
column.set_min_width(75)
tree.append_column(column)
column = gtk.TreeViewColumn(_('Birth date'), self.renderer,text=3)
#column.set_resizable(gtk.TRUE)
column.set_clickable(gtk.TRUE)
#column.set_resizable(True)
column.set_clickable(True)
tree.append_column(column)
def on_spouse_help_clicked(self,obj):

View File

@ -205,7 +205,7 @@ class AddressEditor:
phone = unicode(self.phone.get_text())
postal = unicode(self.postal.get_text())
b = self.note_field.get_buffer()
note = unicode(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(),False))
format = self.preform.get_active()
priv = self.priv.get_active()
@ -244,7 +244,7 @@ class AddressEditor:
def on_switch_page(self,obj,a,page):
buf = self.note_field.get_buffer()
text = unicode(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(),False))
if text:
Utils.bold_label(self.notes_label)
else:

View File

@ -200,7 +200,7 @@ class AttributeEditor:
value = unicode(self.value_field.get_text())
buf = self.note_field.get_buffer()
note = unicode(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(),False))
format = self.preform.get_active()
priv = self.priv.get_active()
@ -238,7 +238,7 @@ class AttributeEditor:
def on_switch_page(self,obj,a,page):
buf = self.note_field.get_buffer()
text = unicode(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(),False))
if text:
Utils.bold_label(self.notes_label)
else:

View File

@ -96,10 +96,10 @@ class Bookmarks :
title = "%s - GRAMPS" % _("Edit Bookmarks")
self.top = gtk.Dialog(title)
self.top.set_default_size(400,350)
self.top.set_has_separator(gtk.FALSE)
self.top.set_has_separator(False)
self.top.vbox.set_spacing(5)
label = gtk.Label('<span size="larger" weight="bold">%s</span>' % _("Edit Bookmarks"))
label.set_use_markup(gtk.TRUE)
label.set_use_markup(True)
self.top.vbox.pack_start(label,0,0,5)
box = gtk.HBox()
self.top.vbox.pack_start(box,1,1,5)

View File

@ -185,20 +185,20 @@ class ChooseParents:
def add_columns(self,tree):
column = gtk.TreeViewColumn(_('Name'), self.renderer,text=0)
column.set_resizable(gtk.TRUE)
column.set_clickable(gtk.TRUE)
column.set_resizable(True)
column.set_clickable(True)
column.set_sort_column_id(0)
column.set_min_width(225)
tree.append_column(column)
column = gtk.TreeViewColumn(_('ID'), self.renderer,text=1)
column.set_resizable(gtk.TRUE)
column.set_clickable(gtk.TRUE)
column.set_resizable(True)
column.set_clickable(True)
column.set_sort_column_id(1)
column.set_min_width(75)
tree.append_column(column)
column = gtk.TreeViewColumn(_('Birth date'), self.renderer,text=3)
#column.set_resizable(gtk.TRUE)
column.set_clickable(gtk.TRUE)
#column.set_resizable(True)
column.set_clickable(True)
tree.append_column(column)
def on_delete_event(self,obj,b):
@ -668,7 +668,7 @@ class ModifyParents:
"on_parents_help_clicked" : self.on_help_clicked,
})
self.title.set_use_markup(gtk.TRUE)
self.title.set_use_markup(True)
if self.family.get_relationship() == RelLib.Family.CIVIL_UNION:
self.mlabel.set_label("<b>%s</b>" % _("Pa_rent"))

View File

@ -139,7 +139,7 @@ class ExistingDbPrompter:
gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN,
gtk.RESPONSE_OK))
choose.set_local_only(gtk.FALSE)
choose.set_local_only(False)
# Always add automatic (macth all files) filter
mime_filter = gtk.FileFilter()
mime_filter.set_name(_('All files'))
@ -246,7 +246,7 @@ class ImportDbPrompter:
gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN,
gtk.RESPONSE_OK))
choose.set_local_only(gtk.FALSE)
choose.set_local_only(False)
# Always add automatic (macth all files) filter
mime_filter = gtk.FileFilter()
mime_filter.set_name(_('All files'))
@ -408,7 +408,7 @@ class NewSaveasDbPrompter:
gtk.RESPONSE_CANCEL,
gtk.STOCK_SAVE,
gtk.RESPONSE_OK))
choose.set_local_only(gtk.FALSE)
choose.set_local_only(False)
# Always add automatic (macth all files) filter
mime_filter = gtk.FileFilter()

View File

@ -838,7 +838,7 @@ class EditPerson:
t = self.etree.tree
(x,y) = icon.get_size()
mask = gtk.gdk.Pixmap(self.window.window,x,y,1)
mask.draw_rectangle(t.get_style().white_gc, gtk.TRUE, 0,0,x,y)
mask.draw_rectangle(t.get_style().white_gc, True, 0,0,x,y)
t.drag_source_set_icon(t.get_colormap(),icon,mask)
def url_drag_data_received(self,widget,context,x,y,sel_data,info,time):
@ -1255,7 +1255,7 @@ class EditPerson:
female = self.is_female.get_active()
unknown = self.is_unknown.get_active()
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(),False))
format = self.preform.get_active()
idval = unicode(self.gid.get_text())
if idval == "":
@ -1503,7 +1503,7 @@ class EditPerson:
female = self.is_female.get_active()
unknown = self.is_unknown.get_active()
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(),False))
format = self.preform.get_active()
idval = unicode(self.gid.get_text())
if idval == "":
@ -1998,7 +1998,7 @@ class EditPerson:
ErrorDialog(msg)
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(),False))
if text != self.person.get_note():
self.person.set_note(text)
@ -2155,7 +2155,7 @@ class EditPerson:
self.draw_lds()
note_buf = self.notes_buffer
text = unicode(note_buf.get_text(note_buf.get_start_iter(),
note_buf.get_end_iter(),gtk.FALSE))
note_buf.get_end_iter(),False))
if text:
Utils.bold_label(self.notes_label)
else:
@ -2186,7 +2186,7 @@ class EditPerson:
# initial values
name = '<span size="larger" weight="bold">%s</span>' % self.name_display.display(self.person)
self.get_widget("activepersonTitle").set_text(name)
self.get_widget("activepersonTitle").set_use_markup(gtk.TRUE)
self.get_widget("activepersonTitle").set_use_markup(True)
self.suffix.set_text(self.pname.get_suffix())
if self.use_patronymic:
self.prefix.set_text(self.pname.get_patronymic())

View File

@ -363,7 +363,7 @@ class EditPlace:
def on_place_apply_clicked(self,obj):
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(),False))
format = self.preform.get_active()
mloc = self.place.get_main_location()
@ -411,7 +411,7 @@ class EditPlace:
self.ref_not_loaded = 0
self.display_references()
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(),False))
if text:
Utils.bold_label(self.notes_label)
else:

View File

@ -393,7 +393,7 @@ class EditSource:
pubinfo = unicode(self.pubinfo.get_text())
abbrev = unicode(self.abbrev.get_text())
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(),False))
format = self.preform.get_active()
if author != self.source.get_author():
@ -445,7 +445,7 @@ class EditSource:
self.ref_not_loaded = 0
self.display_references()
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(),False))
if text:
Utils.bold_label(self.notes_label)
else:

View File

@ -391,7 +391,7 @@ class EventEditor:
def on_switch_page(self,obj,a,page):
buf = self.note_field.get_buffer()
text = unicode(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(),False))
if text:
Utils.bold_label(self.notes_label)
else:

View File

@ -102,7 +102,7 @@ class Exporter:
self.last_page = self.build_last_page()
self.d.add(self.last_page)
self.d.set_show_help(gtk.TRUE)
self.d.set_show_help(True)
self.d.connect('cancel',self.close)
self.d.connect('help',self.help)
self.w.connect("destroy_event",self.close)
@ -195,7 +195,7 @@ class Exporter:
'Format:\t%s\nName:\t%s\nFolder:\t%s\n\n'
'Press Forward to proceed, Cancel to abort, or Back to '
'revisit your options.') % (format, name, folder))
self.confirm_label.set_line_wrap(gtk.TRUE)
self.confirm_label.set_line_wrap(True)
def save(self,obj,obj2):
"""
@ -258,7 +258,7 @@ class Exporter:
self.format_buttons.append(button)
table.attach(button,0,2,2*ix,2*ix+1)
label = gtk.Label(description)
label.set_line_wrap(gtk.TRUE)
label.set_line_wrap(True)
label.set_alignment(0,0.5)
table.attach(label,1,2,2*ix+1,2*ix+2,xpadding=24)
@ -315,7 +315,7 @@ class Exporter:
p.set_logo(self.logo)
self.chooser = gtk.FileChooserWidget(gtk.FILE_CHOOSER_ACTION_SAVE)
self.chooser.set_local_only(gtk.FALSE)
self.chooser.set_local_only(False)
p.append_item("",self.chooser,"")
# Dirty hack to enable proper EXPAND and FILL properties of the chooser
parent = self.chooser.get_parent()

View File

@ -274,7 +274,7 @@ class FamilyView:
name = column_names[pair[1]][0]
column = gtk.TreeViewColumn(name, gtk.CellRendererText(),
text=pair[1])
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
column.set_min_width(40)
column.set_sort_column_id(column_names[pair[1]][1])
self.columns.append(column)

View File

@ -34,6 +34,7 @@ from gettext import gettext as _
# GTK/Gnome modules
#
#-------------------------------------------------------------------------
import gobject
import gtk
import gnome
import gnome.ui
@ -112,9 +113,7 @@ class ImageSelect:
self.fname = self.glade.get_widget("fname")
self.image = self.glade.get_widget("image")
self.description = self.glade.get_widget("photoDescription")
self.internal = self.glade.get_widget('internal')
self.temp_name = ""
self.internal.hide()
Utils.set_titles(self.window,self.glade.get_widget('title'),
_('Select a media object'))
@ -124,8 +123,6 @@ class ImageSelect:
"on_help_imagesel_clicked" : self.on_help_imagesel_clicked,
})
self.internal.connect('toggled',self.internal_toggled)
if os.path.isdir(_last_path):
self.fname.set_current_folder(_last_path)
@ -160,7 +157,7 @@ class ImageSelect:
image = RelImage.scale_image(filename,const.thumbScale)
self.image.set_from_pixbuf(image)
else:
i = gtk.gdk.pixbuf_new_from_file(Utils.find_icon(mtype))
i = Utils.find_mime_type_pixbuf(mtype)
self.image.set_from_pixbuf(i)
def on_savephoto_clicked(self):
@ -300,7 +297,7 @@ class Gallery(ImageSelect):
self.button, event)
self.in_event = 0
return gtk.TRUE
return True
style = self.iconlist.get_style()
@ -324,7 +321,7 @@ class Gallery(ImageSelect):
self.remember_y = event.y
self.button = event.button
self.in_event = 0
return gtk.TRUE
return True
elif event.button == 3:
item = widget.get_item_at(event.x,event.y)
@ -332,7 +329,7 @@ class Gallery(ImageSelect):
(i,t,b,self.photo,oid) = self.p_map[item]
self.show_popup(self.photo,event)
self.in_event = 0
return gtk.TRUE
return True
elif event.type == gtk.gdk.BUTTON_RELEASE:
self.button = 0
# elif event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
@ -341,7 +338,7 @@ class Gallery(ImageSelect):
# (i,t,b,self.photo,oid) = self.p_map[item]
# LocalMediaProperties(self.photo,self.path,self,self.parent_window)
# self.in_event = 0
# return gtk.TRUE
# return True
elif event.type == gtk.gdk.MOTION_NOTIFY:
if event.state & gtk.gdk.BUTTON1_MASK:
# Get the new position and move by the difference
@ -352,13 +349,13 @@ class Gallery(ImageSelect):
self.remember_y = new_y
self.in_event = 0
return gtk.TRUE
return True
if event.type == gtk.gdk.EXPOSE:
self.load_images()
self.in_event = 0
return gtk.FALSE
return False
def savephoto(self, photo):
"""Save the photo in the dataobj object. (Required function)"""
@ -376,15 +373,17 @@ class Gallery(ImageSelect):
if x != self.cx or y != self.cy:
grp.move(self.cx-x,self.cy-y)
else:
import gobject
description = obj.get_description()
if len(description) > 20:
description = "%s..." % description[0:20]
try:
media_obj = self.db.get_object_from_handle(oid)
mtype = media_obj.get_mime_type()
if mtype[0:5] == "image":
image = ImgManip.get_thumbnail_image(media_obj.get_path())
else:
image = Utils.find_mime_type_pixbuf(mtype)
except gobject.GError,msg:
ErrorDialog(str(msg))
image = gtk.gdk.pixbuf_new_from_file(const.icon)
@ -789,7 +788,7 @@ class LocalMediaProperties:
def on_notebook_switch_page(self,obj,junk,page):
t = self.notes.get_buffer()
text = unicode(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(),False))
if text:
Utils.bold_label(self.notes_label)
else:
@ -799,7 +798,7 @@ class LocalMediaProperties:
priv = self.change_dialog.get_widget("private").get_active()
t = self.notes.get_buffer()
text = unicode(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(),False))
note = self.photo.get_note()
format = self.preform.get_active()
if text != note or priv != self.photo.get_privacy():
@ -1167,7 +1166,7 @@ class GlobalMediaProperties:
if page == 3:
self.display_refs()
t = self.notes.get_buffer()
text = unicode(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(),False))
if text:
Utils.bold_label(self.notes_label)
else:
@ -1194,7 +1193,7 @@ class GlobalMediaProperties:
def on_apply_clicked(self, obj):
t = self.notes.get_buffer()
text = unicode(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(),False))
desc = unicode(self.descr_window.get_text())
note = self.obj.get_note()

View File

@ -23,6 +23,7 @@ import const
import signal
import md5
import gtk
import gobject
class ImgManip:
def __init__(self,source):
@ -109,10 +110,16 @@ def set_thumbnail_image(path):
pixbuf = pixbuf.scale_simple(pw,ph,gtk.gdk.INTERP_BILINEAR)
pixbuf.save(_build_thumb_path(path),"jpeg")
except:
import traceback
traceback.print_stack()
print "Could not create thumbnail for",path
def get_thumbnail_image(path):
filename = _build_thumb_path(path)
if not os.path.isfile(filename):
set_thumbnail_image(path)
try:
return gtk.gdk.pixbuf_new_from_file(filename)
except gobject.GError:
return None

View File

@ -33,7 +33,7 @@ class ListModel:
l = len(dlist)
self.mylist = [TYPE_STRING]*l + [TYPE_PYOBJECT]
self.tree.set_rules_hint(gtk.TRUE)
self.tree.set_rules_hint(True)
self.model = None
self.selection = None
self.mode = mode
@ -49,17 +49,17 @@ class ListModel:
renderer = gtk.CellRendererText()
renderer.set_fixed_height_from_font(1)
column = gtk.TreeViewColumn(name[0],renderer,text=cnum)
column.set_reorderable(gtk.TRUE)
column.set_reorderable(True)
column.set_min_width(name[2])
if name[0] == '':
column.set_visible(gtk.FALSE)
column.set_visible(False)
else:
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
if name[1] == -1:
column.set_clickable(gtk.FALSE)
column.set_clickable(False)
else:
column.set_clickable(gtk.TRUE)
column.set_clickable(True)
column.set_sort_column_id(name[1])
cnum = cnum + 1
@ -243,7 +243,7 @@ class ListModel:
model,node = self.selection.get_selected()
if node:
path = model.get_path(node)
self.tree.scroll_to_cell(path,None,gtk.TRUE,0.5,0.5)
self.tree.scroll_to_cell(path,None,True,0.5,0.5)
def button_press(self,obj,event):
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:

View File

@ -533,7 +533,7 @@ class Marriage:
changed = 1
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(),False))
format = self.preform.get_active()
if text != self.family.get_note():
@ -616,7 +616,7 @@ class Marriage:
self.family.set_relationship(relation)
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(),False))
if text != self.family.get_note():
self.family.set_note(text)
@ -796,7 +796,7 @@ class Marriage:
def on_switch_page(self,obj,a,page):
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(),False))
if text:
Utils.bold_label(self.notes_label)
else:

View File

@ -141,7 +141,7 @@ class MediaView:
self.list.remove_column(column)
column = gtk.TreeViewColumn(_('Title'), self.renderer,text=0)
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
column.set_min_width(225)
self.list.append_column(column)
@ -153,7 +153,7 @@ class MediaView:
continue
name = column_names[pair[1]]
column = gtk.TreeViewColumn(name, self.renderer, text=pair[1])
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
column.set_min_width(75)
self.columns.append(column)
self.list.append_column(column)
@ -183,16 +183,14 @@ class MediaView:
path = mobj.get_path()
if mtype:
type_name = Utils.get_mime_description(mtype)
if mtype[0:5] == "image":
image = ImgManip.get_thumbnail_image(path)
if image != None:
self.preview.set_from_pixbuf(image)
else:
icon = Utils.find_icon(mtype)
icon_image = gtk.gdk.pixbuf_new_from_file(icon)
icon_image = Utils.find_mime_type_pixbuf(mtype)
self.preview.set_from_pixbuf(icon_image)
else:
icon = Utils.find_icon('text/plain')
icon_image = gtk.gdk.pixbuf_new_from_file(icon)
icon_image = Utils.find_mime_type_pixbuf('text/plain')
self.preview.set_from_pixbuf(icon_image)
type_name = _('Note')

View File

@ -169,12 +169,12 @@ class NameEditor:
def on_group_over_toggled(self,obj):
if obj.get_active():
self.group_as.set_sensitive(gtk.TRUE)
self.group_as.set_editable(gtk.TRUE)
self.group_as.set_sensitive(True)
self.group_as.set_editable(True)
else:
self.group_as.set_text(self.db.get_name_group_mapping(self.surname_field.get_text()))
self.group_as.set_sensitive(gtk.FALSE)
self.group_as.set_editable(gtk.FALSE)
self.group_as.set_sensitive(False)
self.group_as.set_editable(False)
def on_delete_event(self,*obj):
self.close_child_windows()
@ -230,7 +230,7 @@ class NameEditor:
suffix = unicode(self.suffix_field.get_text())
patronymic = unicode(self.patronymic_field.get_text())
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(),False))
format = self.preform.get_active()
priv = self.priv.get_active()
@ -263,7 +263,7 @@ class NameEditor:
self.name.set_sort_as(self.sort_as.get_active())
self.parent.lists_changed = 1
if self.group_over.get_active() == gtk.FALSE:
if self.group_over.get_active() == False:
self.name.set_group_as("")
self.parent.lists_changed = 1
elif self.name.get_group_as() != grp_as:
@ -329,7 +329,7 @@ class NameEditor:
def on_switch_page(self,obj,a,page):
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(),False))
if text:
Utils.bold_label(self.notes_label)
else:

View File

@ -118,7 +118,7 @@ class NoteEditor:
"""Saves the note and closes the window"""
tbuffer = self.entry.get_buffer()
text = unicode(tbuffer.get_text(tbuffer.get_start_iter(),
tbuffer.get_end_iter(),gtk.FALSE))
tbuffer.get_end_iter(),False))
if text != self.data.get_note():
self.data.set_note(text)
if self.callback:

View File

@ -149,7 +149,7 @@ class DispBox:
return 0
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
self.build_menu(event,self.person)
return gtk.TRUE
return True
return 0
def expand(self):
@ -393,7 +393,7 @@ class PedigreeView:
label = gtk.Label('<b><i>%s</i></b>' % cname)
else:
label = gtk.Label(cname)
label.set_use_markup(gtk.TRUE)
label.set_use_markup(True)
label.show()
label.set_alignment(0,0)
menuitem.add(label)
@ -528,8 +528,8 @@ class PedigreeView:
def on_canvas_press(self,obj,event):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
self.build_nav_menu(event)
return gtk.TRUE
return gtk.FALSE
return True
return False
def add_nav_portion_to_menu(self,menu):
"""
@ -661,7 +661,7 @@ class PedigreeView:
label = gtk.Label(NameDisplay.displayer.display(child))
child_item = gtk.MenuItem(None)
label.set_use_markup(gtk.TRUE)
label.set_use_markup(True)
label.show()
label.set_alignment(0,0)
child_item.add(label)
@ -695,7 +695,7 @@ class PedigreeView:
label = gtk.Label(NameDisplay.displayer.display(par))
par_item = gtk.MenuItem(None)
label.set_use_markup(gtk.TRUE)
label.set_use_markup(True)
label.show()
label.set_alignment(0,0)
par_item.add(label)

View File

@ -75,7 +75,7 @@ class PeopleView:
self.DataFilter = None
self.pscroll = self.parent.gtop.get_widget("pscroll")
self.person_tree = self.parent.gtop.get_widget("person_tree")
self.person_tree.set_rules_hint(gtk.TRUE)
self.person_tree.set_rules_hint(True)
self.renderer = gtk.CellRendererText()
self.columns = []
@ -105,7 +105,7 @@ class PeopleView:
self.person_tree.remove_column(column)
column = gtk.TreeViewColumn(_('Name'), self.renderer,text=0)
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
#column.set_clickable(True)
#column.connect('clicked',self.sort_clicked)
column.set_min_width(225)
@ -119,7 +119,7 @@ class PeopleView:
continue
name = column_names[pair[1]]
column = gtk.TreeViewColumn(name, self.renderer, text=pair[1])
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
#column.set_clickable(True)
#column.connect('clicked',self.sort_clicked)
column.set_min_width(60)

View File

@ -91,7 +91,7 @@ class PlaceView:
self.list.remove_column(column)
column = gtk.TreeViewColumn(_('Place Name'), self.renderer,text=0)
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
column.set_min_width(225)
self.list.append_column(column)
@ -102,7 +102,7 @@ class PlaceView:
continue
name = column_names[pair[1]]
column = gtk.TreeViewColumn(name, self.renderer, text=pair[1])
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
column.set_min_width(75)
self.columns.append(column)
self.list.append_column(column)

View File

@ -123,7 +123,7 @@ class PluginDialog:
self.apply_button.set_label(button_label)
else:
self.apply_button.set_label(_("_Apply"))
self.apply_button.set_use_underline(gtk.TRUE)
self.apply_button.set_use_underline(True)
if tool_tip:
try:
tt = gtk.tooltips_data_get(self.apply_button)

View File

@ -35,11 +35,11 @@ class SaveDialog:
label1 = self.xml.get_widget('label1')
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
label1.set_use_markup(gtk.TRUE)
label1.set_use_markup(True)
label2 = self.xml.get_widget('label2')
label2.set_text(msg2)
label2.set_use_markup(gtk.TRUE)
label2.set_use_markup(True)
self.top.show()
if parent:
@ -61,11 +61,11 @@ class QuestionDialog:
label1 = self.xml.get_widget('label1')
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
label1.set_use_markup(gtk.TRUE)
label1.set_use_markup(True)
label2 = self.xml.get_widget('label2')
label2.set_text(msg2)
label2.set_use_markup(gtk.TRUE)
label2.set_use_markup(True)
self.xml.get_widget('okbutton').set_label(label)
@ -85,11 +85,11 @@ class QuestionDialog2:
label1 = self.xml.get_widget('label1')
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
label1.set_use_markup(gtk.TRUE)
label1.set_use_markup(True)
label2 = self.xml.get_widget('label2')
label2.set_text(msg2)
label2.set_use_markup(gtk.TRUE)
label2.set_use_markup(True)
self.xml.get_widget('okbutton').set_label(label_msg1)
self.xml.get_widget('no').set_label(label_msg2)
@ -110,11 +110,11 @@ class OptionDialog:
label1 = self.xml.get_widget('label1')
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
label1.set_use_markup(gtk.TRUE)
label1.set_use_markup(True)
label2 = self.xml.get_widget('label2')
label2.set_text(msg2)
label2.set_use_markup(gtk.TRUE)
label2.set_use_markup(True)
self.xml.get_widget('option1').set_label(btnmsg1)
self.xml.get_widget('option2').set_label(btnmsg2)
@ -142,7 +142,7 @@ class ErrorDialog:
label1 = self.xml.get_widget('label1')
label2 = self.xml.get_widget('label2')
label1.set_text('<span weight="bold" size="larger">%s</span>' % str(msg1))
label1.set_use_markup(gtk.TRUE)
label1.set_use_markup(True)
label2.set_text(str(msg2))
self.top.show()
if parent:
@ -159,7 +159,7 @@ class WarningDialog:
label1 = self.xml.get_widget('label1')
label2 = self.xml.get_widget('label2')
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
label1.set_use_markup(gtk.TRUE)
label1.set_use_markup(True)
label2.set_text(msg2)
self.top.show()
if parent:
@ -176,7 +176,7 @@ class OkDialog:
label1 = self.xml.get_widget('label1')
label2 = self.xml.get_widget('label2')
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
label1.set_use_markup(gtk.TRUE)
label1.set_use_markup(True)
label2.set_text(msg2)
self.top.show()
if parent:
@ -194,11 +194,11 @@ class MissingMediaDialog:
label1 = self.xml.get_widget('label4')
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
label1.set_use_markup(gtk.TRUE)
label1.set_use_markup(True)
label2 = self.xml.get_widget('label3')
label2.set_text(msg2)
label2.set_use_markup(gtk.TRUE)
label2.set_use_markup(True)
check_button = self.xml.get_widget('use_always')

View File

@ -261,7 +261,7 @@ class Report:
# Customize the dialog for this report
(title, header) = self.get_progressbar_data()
self.ptop = gtk.Dialog()
self.ptop.set_has_separator(gtk.FALSE)
self.ptop.set_has_separator(False)
self.ptop.set_title(title)
lbl = gtk.Label(header)
lbl.set_use_markup(True)
@ -341,7 +341,7 @@ class BareReportDialog:
self.local_filters = []
self.window = gtk.Dialog('GRAMPS')
self.window.set_has_separator(gtk.FALSE)
self.window.set_has_separator(False)
self.cancel = self.window.add_button(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL)
self.ok = self.window.add_button(gtk.STOCK_OK,gtk.RESPONSE_OK)
@ -356,7 +356,7 @@ class BareReportDialog:
self.setup_title()
self.setup_header()
self.tbl = gtk.Table(4,4,gtk.FALSE)
self.tbl = gtk.Table(4,4,False)
self.tbl.set_col_spacings(12)
self.tbl.set_row_spacings(6)
self.tbl.set_border_width(6)
@ -532,8 +532,8 @@ class BareReportDialog:
title = self.get_header(self.name)
label = gtk.Label('<span size="larger" weight="bold">%s</span>' % title)
label.set_use_markup(gtk.TRUE)
self.window.vbox.pack_start(label, gtk.TRUE, gtk.TRUE,
label.set_use_markup(True)
self.window.vbox.pack_start(label, True, True,
ReportDialog.border_pad)
def setup_target_frame(self):
@ -551,7 +551,7 @@ class BareReportDialog:
Should be overwritten by standalone report dialogs. """
center_label = gtk.Label("<b>%s</b>" % _("Center Person"))
center_label.set_use_markup(gtk.TRUE)
center_label.set_use_markup(True)
center_label.set_alignment(0.0,0.5)
self.tbl.set_border_width(12)
self.tbl.attach(center_label,0,4,self.col,self.col+1)
@ -637,7 +637,7 @@ class BareReportDialog:
label = gtk.Label("<b>%s</b>" % _("Report Options"))
label.set_alignment(0.0,0.5)
label.set_use_markup(gtk.TRUE)
label.set_use_markup(True)
if len(self.frame_names) == 0:
table.attach(label,0,3,0,1)
@ -737,7 +737,7 @@ class BareReportDialog:
table.set_row_spacings(6)
table.set_border_width(6)
l = gtk.Label("<b>%s</b>" % _(key))
l.set_use_markup(gtk.TRUE)
l.set_use_markup(True)
self.notebook.append_page(table,l)
row = 0
@ -821,7 +821,7 @@ class BareReportDialog:
if self.extra_textbox:
b = self.extra_textbox.get_buffer()
text_val = unicode(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(),False))
self.report_text = text_val.split('\n')
self.options.handler.set_display_format(self.report_text)
else:
@ -870,7 +870,7 @@ class BareReportDialog:
new_name = new_person.get_primary_name().get_regular_name()
if new_name:
self.person_label.set_text( "<i>%s</i>" % new_name )
self.person_label.set_use_markup(gtk.TRUE)
self.person_label.set_use_markup(True)
#------------------------------------------------------------------------
#
@ -1025,10 +1025,10 @@ class ReportDialog(BareReportDialog):
label = obj.get_printable()
if label:
self.print_report.set_label (label)
self.print_report.set_sensitive (gtk.TRUE)
self.print_report.set_sensitive (True)
else:
self.print_report.set_label (_("Print a copy"))
self.print_report.set_sensitive (gtk.FALSE)
self.print_report.set_sensitive (False)
# Is this to be a printed report or an electronic report
# (i.e. a set of web pages)
@ -1173,7 +1173,7 @@ class ReportDialog(BareReportDialog):
self.output_notebook.append_page(self.paper_table,gtk.Label(_("Paper Options")))
paper_label = gtk.Label("<b>%s</b>" % _("Paper Options"))
paper_label.set_use_markup(gtk.TRUE)
paper_label.set_use_markup(True)
paper_label.set_alignment(0.0,0.5)
self.paper_table.attach(paper_label,0,6,0,1,gtk.SHRINK|gtk.FILL)
@ -1251,7 +1251,7 @@ class ReportDialog(BareReportDialog):
self.html_table.set_border_width(0)
html_label = gtk.Label("<b>%s</b>" % _("HTML Options"))
html_label.set_alignment(0.0,0.5)
html_label.set_use_markup(gtk.TRUE)
html_label.set_use_markup(True)
self.html_table.attach(html_label,0,3,0,1)
label = gtk.Label(_("HTML Options"))

View File

@ -131,18 +131,18 @@ class SelectChild:
def add_columns(self,tree):
column = gtk.TreeViewColumn(_('Name'), self.renderer,text=0)
column.set_resizable(gtk.TRUE)
#column.set_clickable(gtk.TRUE)
column.set_resizable(True)
#column.set_clickable(True)
column.set_min_width(225)
tree.append_column(column)
column = gtk.TreeViewColumn(_('ID'), self.renderer,text=1)
column.set_resizable(gtk.TRUE)
#column.set_clickable(gtk.TRUE)
column.set_resizable(True)
#column.set_clickable(True)
column.set_min_width(75)
tree.append_column(column)
column = gtk.TreeViewColumn(_('Birth date'), self.renderer,text=3)
#column.set_resizable(gtk.TRUE)
column.set_clickable(gtk.TRUE)
#column.set_resizable(True)
column.set_clickable(True)
tree.append_column(column)
def on_delete_event(self,obj,b):
@ -445,8 +445,8 @@ class EditRel:
self.fentry.set_text(_(f[2]))
self.mentry.set_text(_(f[1]))
self.fdesc.set_use_markup(gtk.TRUE)
self.mdesc.set_use_markup(gtk.TRUE)
self.fdesc.set_use_markup(True)
self.mdesc.set_use_markup(True)
self.top.show()
def close(self,obj):

View File

@ -116,11 +116,11 @@ class SelectObject:
the_type = Utils.get_mime_description(obj.get_mime_type())
path = obj.get_path()
if the_type[0:5] == "image":
image = ImgManip.get_thumbnail_image(obj.get_path())
if image:
self.preview.set_from_pixbuf(image)
else:
icon_image = gtk.gdk.pixbuf_new_from_file(Utils.find_icon(the_type))
icon_image = Utils.find_mime_type_pixbuf(the_type)
self.preview.set_from_pixbuf(icon_image)
self.object_handle.set_text(obj.get_gramps_id())

View File

@ -76,19 +76,19 @@ class SelectPerson:
def add_columns(self,tree):
column = gtk.TreeViewColumn(_('Name'), self.renderer,text=0)
column.set_resizable(gtk.TRUE)
column.set_clickable(gtk.TRUE)
column.set_resizable(True)
column.set_clickable(True)
column.set_sort_column_id(0)
column.set_min_width(225)
tree.append_column(column)
column = gtk.TreeViewColumn(_('ID'), self.renderer,text=1)
column.set_resizable(gtk.TRUE)
column.set_clickable(gtk.TRUE)
column.set_resizable(True)
column.set_clickable(True)
column.set_sort_column_id(1)
column.set_min_width(75)
tree.append_column(column)
column = gtk.TreeViewColumn(_('Birth date'), self.renderer,text=3)
column.set_clickable(gtk.TRUE)
column.set_clickable(True)
tree.append_column(column)
def select_function(self,store,path,iter,id_list):

View File

@ -88,7 +88,7 @@ class SourceView:
self.list.remove_column(column)
column = gtk.TreeViewColumn(_('Title'), self.renderer,text=0)
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
column.set_min_width(225)
self.list.append_column(column)
self.columns = [column]
@ -98,7 +98,7 @@ class SourceView:
continue
name = column_names[pair[1]]
column = gtk.TreeViewColumn(name, self.renderer, text=pair[1])
column.set_resizable(gtk.TRUE)
column.set_resizable(True)
column.set_min_width(75)
self.columns.append(column)
self.list.append_column(column)

View File

@ -105,16 +105,16 @@ class SourceSelector:
renderer.set_fixed_height_from_font(1)
column = gtk.TreeViewColumn (title[0], renderer, text=colno)
colno = colno + 1
column.set_clickable (gtk.TRUE)
column.set_resizable(gtk.TRUE)
column.set_clickable (True)
column.set_resizable(True)
column.set_sort_column_id(title[1])
column.set_min_width(title[2])
self.slist.append_column (column)
self.selection.connect('changed',self.selection_changed)
self.delete.set_sensitive(gtk.FALSE)
self.edit.set_sensitive(gtk.FALSE)
self.delete.set_sensitive(False)
self.edit.set_sensitive(False)
self.redraw()
if self.parent:
self.window.set_transient_for(self.parent.window)
@ -164,11 +164,11 @@ class SourceSelector:
def selection_changed(self,obj):
(store,node) = self.selection.get_selected()
if node:
self.delete.set_sensitive(gtk.TRUE)
self.edit.set_sensitive(gtk.TRUE)
self.delete.set_sensitive(True)
self.edit.set_sensitive(True)
else:
self.delete.set_sensitive(gtk.FALSE)
self.edit.set_sensitive(gtk.FALSE)
self.delete.set_sensitive(False)
self.edit.set_sensitive(False)
def redraw(self):
self.model.clear()
@ -237,8 +237,8 @@ class SourceTab:
renderer = gtk.CellRendererText ()
column = gtk.TreeViewColumn (title[0], renderer, text=colno)
colno = colno + 1
column.set_clickable (gtk.TRUE)
column.set_resizable(gtk.TRUE)
column.set_clickable (True)
column.set_resizable(True)
column.set_sort_column_id(title[1])
column.set_min_width(title[2])
self.slist.append_column (column)
@ -487,15 +487,15 @@ class SourceEditor:
buf = self.get_widget("scomment").get_buffer()
comments = unicode(buf.get_text(buf.get_start_iter(),
buf.get_end_iter(),gtk.FALSE))
buf.get_end_iter(),False))
buf = self.get_widget("stext").get_buffer()
text = unicode(buf.get_text(buf.get_start_iter(),
buf.get_end_iter(),gtk.FALSE))
buf.get_end_iter(),False))
buf = self.get_widget('spage').get_buffer()
page = unicode(buf.get_text(buf.get_start_iter(),
buf.get_end_iter(),gtk.FALSE))
buf.get_end_iter(),False))
self.source_ref.set_page(page)
self.source_ref.set_date(self.date_obj)

View File

@ -124,7 +124,7 @@ class StartupDialog:
label = gtk.Label(_('In order to create valid GEDCOM files, the following information '
'needs to be entered. If you do not plan to generate GEDCOM files, '
'you may leave this empty.'))
label.set_line_wrap(gtk.TRUE)
label.set_line_wrap(True)
box.pack_start(label)

View File

@ -81,7 +81,7 @@ class StyleListDisplay:
title_label = self.top.get_widget('title')
title_label.set_text(Utils.title(_('Style Editor')))
title_label.set_use_markup(gtk.TRUE)
title_label.set_use_markup(True)
self.list = ListModel.ListModel(self.top.get_widget("list"),
[('Style',-1,10)],)
@ -202,7 +202,7 @@ class StyleEditor:
self.current_p = p
self.pname.set_text('<span size="larger" weight="bold">%s</span>' % name)
self.pname.set_use_markup(gtk.TRUE)
self.pname.set_use_markup(True)
descr = p.get_description()
if descr:

View File

@ -227,46 +227,23 @@ def view_photo(photo):
if os.fork() == 0:
os.execvp(args[0],args)
def nautilus_icon(icon,mime_type):
import GrampsKeys
_icon_theme = gtk.icon_theme_get_default()
theme = GrampsKeys.client.get_string("/desktop/gnome/file_views/icon_theme")
if icon :
newicon = "%s/%s/%s.png" % (const.nautdir,theme,icon)
if os.path.isfile(newicon):
return newicon
else:
newicon = "%s/document-icons/%s.png" % (const.pixdir,icon)
if os.path.isfile(newicon):
return newicon
return None
elif mime_type == "x-directory/":
if theme:
newicon = "%s/%s/i-directory.png" % (const.nautdir,theme)
else:
newicon = "%s/gnome-folder.png" % const.pixdir
if os.path.isfile(newicon):
return newicon
return None
else:
def find_mime_type_pixbuf(mime_type):
icontmp = mime_type.replace('/','-')
if theme:
newicon = "%s/%s/gnome-%s.png" % (const.nautdir,theme,icontmp)
if os.path.isfile(newicon):
return newicon
else:
newicon = "%s/document-icons/gnome-%s.png" % (const.nautdir,icontmp)
if os.path.isfile(newicon):
return newicon
return None
def find_icon(mtype):
n = nautilus_icon(None,mtype)
if n:
return n
else:
return const.icon
try:
newicon = "gnome-mime-%s" % icontmp
try:
return _icon_theme.load_icon(newicon,48,0)
except:
icontmp = mime_type.split('/')[0]
try:
newicon = "gnome-mime-%s" % icontmp
return _icon_theme.load_icon(newicon,48,0)
except:
return gtk.gdk.pixbuf_new_from_file(const.icon)
except:
return gtk.gdk.pixbuf_new_from_file(const.icon)
def get_mime_description(mime_type):
try:
@ -323,8 +300,8 @@ def build_columns(tree,list):
if name[2] >= 0:
column.set_sort_column_id(name[2])
if name[0] == '':
column.set_clickable(gtk.TRUE)
column.set_visible(gtk.FALSE)
column.set_clickable(True)
column.set_visible(False)
cnum = cnum + 1
tree.append_column(column)
@ -369,11 +346,11 @@ def title(n):
def set_title_label(xmlobj,t):
title_label = xmlobj.get_widget('title')
title_label.set_text('<span weight="bold" size="larger">%s</span>' % t)
title_label.set_use_markup(gtk.TRUE)
title_label.set_use_markup(True)
def set_titles(window,title,t,msg=None):
title.set_text('<span weight="bold" size="larger">%s</span>' % t)
title.set_use_markup(gtk.TRUE)
title.set_use_markup(True)
if msg:
window.set_title('%s - GRAMPS' % msg)
else:

View File

@ -243,7 +243,7 @@ class WitnessEditor:
self.ref.set_type(RelLib.Event.NAME)
c = self.comment.get_buffer()
self.ref.set_comment(unicode(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(),False)))
self.ref.set_privacy(self.private.get_active())
if self.update:

View File

@ -1074,7 +1074,7 @@ class Gramps:
self.import_tool_callback()
def read_file(self,filename,callback=None):
self.topWindow.set_resizable(gtk.FALSE)
self.topWindow.set_resizable(False)
mode = "w"
filename = os.path.normpath(os.path.abspath(filename))
@ -1115,7 +1115,7 @@ class Gramps:
return 0
self.topWindow.set_resizable(gtk.TRUE)
self.topWindow.set_resizable(True)
self.gtop.get_widget('import1').set_sensitive(not self.db.readonly)
self.gtop.get_widget('abandon').set_sensitive(not self.db.readonly)
self.gtop.get_widget('undolabel').set_sensitive(not self.db.readonly)

View File

@ -499,7 +499,7 @@ class BookListDisplay:
title_label = self.xml.get_widget('title')
title_label.set_text(Utils.title(_('Book List')))
title_label.set_use_markup(gtk.TRUE)
title_label.set_use_markup(True)
self.blist = ListModel.ListModel(self.xml.get_widget("list"),
[('Name',-1,10)],)
@ -621,12 +621,12 @@ class BookReportSelector:
avail_label = self.xml.get_widget('avail_label')
avail_label.set_text("<b>%s</b>" % _("_Available items"))
avail_label.set_use_markup(gtk.TRUE)
avail_label.set_use_underline(gtk.TRUE)
avail_label.set_use_markup(True)
avail_label.set_use_underline(True)
book_label = self.xml.get_widget('book_label')
book_label.set_text("<b>%s</b>" % _("Current _book"))
book_label.set_use_underline(gtk.TRUE)
book_label.set_use_markup(gtk.TRUE)
book_label.set_use_underline(True)
book_label.set_use_markup(True)
av_titles = [(_('Name'),0,150),(_('Type'),1,50),('',-1,0)]
bk_titles = [(_('Item name'),-1,150),(_('Type'),-1,50),('',-1,0),

View File

@ -156,7 +156,7 @@ class CustomTextOptions(ReportOptions.ReportOptions):
self.top_text_view.get_buffer().get_text(
self.top_text_view.get_buffer().get_start_iter(),
self.top_text_view.get_buffer().get_end_iter(),
gtk.FALSE
False
)
).replace('\n',' ')
@ -164,7 +164,7 @@ class CustomTextOptions(ReportOptions.ReportOptions):
self.middle_text_view.get_buffer().get_text(
self.middle_text_view.get_buffer().get_start_iter(),
self.middle_text_view.get_buffer().get_end_iter(),
gtk.FALSE
False
)
).replace('\n',' ')
@ -172,7 +172,7 @@ class CustomTextOptions(ReportOptions.ReportOptions):
self.bottom_text_view.get_buffer().get_text(
self.bottom_text_view.get_buffer().get_start_iter(),
self.bottom_text_view.get_buffer().get_end_iter(),
gtk.FALSE
False
)
).replace('\n',' ')

View File

@ -85,8 +85,8 @@ class DesBrowse:
self.tree.append_column(col)
self.model = gtk.TreeStore(gobject.TYPE_STRING,gobject.TYPE_PYOBJECT)
self.tree.set_model(self.model)
self.tree.set_rules_hint(gtk.TRUE)
self.tree.set_headers_visible(gtk.FALSE)
self.tree.set_rules_hint(True)
self.tree.set_headers_visible(False)
self.add_to_tree(None,None,self.active.get_handle())
self.tree.expand_all()

View File

@ -84,7 +84,7 @@ class EvalWindow:
def apply_clicked(self,obj):
text = unicode(self.ebuf.get_text(self.ebuf.get_start_iter(),
self.ebuf.get_end_iter(),gtk.FALSE))
self.ebuf.get_end_iter(),False))
outtext = cStringIO.StringIO()
errtext = cStringIO.StringIO()

View File

@ -154,7 +154,7 @@ class MyPlaces(gtk.Entry):
class MyID(gtk.HBox):
def __init__(self,db):
gtk.HBox.__init__(self,gtk.FALSE,6)
gtk.HBox.__init__(self,False,6)
self.db = db
self.entry = gtk.Entry()

View File

@ -202,7 +202,7 @@ class SimpleBookTitleOptions(ReportOptions.ReportOptions):
self.size.set_digits(2)
self.size.set_increments(1,2)
self.size.set_range(0,20)
self.size.set_numeric(gtk.TRUE)
self.size.set_numeric(True)
self.size.set_value(self.options_dict['imgsize'])
dialog.add_frame_option(_('Image'),_('Preview'),preview_table)
@ -230,8 +230,8 @@ class SimpleBookTitleOptions(ReportOptions.ReportOptions):
self.options_dict['imgid'] = ""
self.obj_title.set_text('')
self.preview.set_from_pixbuf(None)
self.remove_obj_button.set_sensitive(gtk.FALSE)
self.size.set_sensitive(gtk.FALSE)
self.remove_obj_button.set_sensitive(False)
self.size.set_sensitive(False)
def select_obj(self,obj,database):
s_o = SelectObject.SelectObject(database,_("Select an Object"))
@ -250,8 +250,8 @@ class SimpleBookTitleOptions(ReportOptions.ReportOptions):
self.obj_title.set_text(the_object.get_description())
icon_image = ImgManip.get_thumbnail_image(the_object.get_path())
self.preview.set_from_pixbuf(icon_image)
self.remove_obj_button.set_sensitive(gtk.TRUE)
self.size.set_sensitive(gtk.TRUE)
self.remove_obj_button.set_sensitive(True)
self.size.set_sensitive(True)
def make_default_style(self,default_style):
"""Make the default output style for the Simple Boot Title report."""

View File

@ -1304,7 +1304,7 @@ class WebReportOptions(ReportOptions.ReportOptions):
self.depth.set_digits(0)
self.depth.set_increments(1,2)
self.depth.set_range(1,10)
self.depth.set_numeric(gtk.TRUE)
self.depth.set_numeric(True)
self.depth.set_value(self.options_dict['HTMLtreed'])
self.use_link = gtk.CheckButton(lnk_msg)
@ -1371,7 +1371,7 @@ class WebReportOptions(ReportOptions.ReportOptions):
self.use_n_cols.set_digits(0)
self.use_n_cols.set_increments(1,2)
self.use_n_cols.set_range(1,5)
self.use_n_cols.set_numeric(gtk.TRUE)
self.use_n_cols.set_numeric(True)
self.use_n_cols.set_value(self.options_dict['HTMLidxcol'])
tlist = Report._template_map.keys()