mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
Prevent crash with older bindings
This commit is contained in:
parent
0784883ebf
commit
a7a0ea0fa2
1 changed files with 7 additions and 2 deletions
|
@ -961,15 +961,20 @@ class MessageColumn (TextColumn):
|
||||||
highlighters = self.highlighters
|
highlighters = self.highlighters
|
||||||
id_ = self.id
|
id_ = self.id
|
||||||
|
|
||||||
|
# FIXME: This should be none; need to investigate
|
||||||
|
# `cellrenderertext.props.attributes = None' failure (param conversion
|
||||||
|
# error like `treeview.props.model = None').
|
||||||
|
no_attrs = AttrList ()
|
||||||
|
|
||||||
def message_data_func (props, row):
|
def message_data_func (props, row):
|
||||||
|
|
||||||
props.text = row[id_]
|
props.text = row[id_]
|
||||||
if not highlighters:
|
if not highlighters:
|
||||||
props.attributes = None
|
props.attributes = no_attrs
|
||||||
for highlighter in highlighters.values ():
|
for highlighter in highlighters.values ():
|
||||||
ranges = highlighter (row)
|
ranges = highlighter (row)
|
||||||
if not ranges:
|
if not ranges:
|
||||||
props.attributes = None
|
props.attributes = no_attrs
|
||||||
else:
|
else:
|
||||||
attrlist = AttrList ()
|
attrlist = AttrList ()
|
||||||
for start, end in ranges:
|
for start, end in ranges:
|
||||||
|
|
Loading…
Reference in a new issue