mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
Replace model.get with model.get_value
This commit is contained in:
parent
4ec31e6aa0
commit
e92d613dec
2 changed files with 7 additions and 7 deletions
|
@ -365,7 +365,7 @@ class TextColumn (SizedColumn):
|
|||
data_func = self.get_data_func ()
|
||||
id_ = self.id
|
||||
def cell_data_func (column, cell, model, tree_iter):
|
||||
data_func (cell.props, model.get (tree_iter, id_)[0], model.get_path (tree_iter))
|
||||
data_func (cell.props, model.get_value (tree_iter, id_), model.get_path (tree_iter))
|
||||
column.set_cell_data_func (cell, cell_data_func)
|
||||
elif not self.get_modify_func:
|
||||
column.add_attribute (cell, "text", self.id)
|
||||
|
@ -1049,12 +1049,12 @@ class Window (object):
|
|||
@staticmethod
|
||||
def _timestamp_cell_data_func (column, renderer, model, tree_iter):
|
||||
|
||||
ts = model.get (tree_iter, LogModel.COL_TIME)[0]
|
||||
ts = model.get_value (tree_iter, LogModel.COL_TIME)
|
||||
renderer.props.text = Data.time_args (ts)
|
||||
|
||||
def _message_cell_data_func (self, column, renderer, model, tree_iter):
|
||||
|
||||
offset = model.get (tree_iter, LogModel.COL_MESSAGE_OFFSET)[0]
|
||||
offset = model.get_value (tree_iter, LogModel.COL_MESSAGE_OFFSET)
|
||||
self.log_file.seek (offset)
|
||||
renderer.props.text = strip_escape (self.log_file.readline ().strip ())
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class LineFrequencySentinel (object):
|
|||
|
||||
def _search_ts (self, target_ts, first_index, last_index):
|
||||
|
||||
model_get = self.model.get
|
||||
model_get = self.model.get_value
|
||||
model_iter_nth_child = self.model.iter_nth_child
|
||||
col_id = self.model.COL_TIME
|
||||
|
||||
|
@ -32,7 +32,7 @@ class LineFrequencySentinel (object):
|
|||
middle = (last_index - first_index) // 2 + first_index
|
||||
if middle == first_index:
|
||||
return last_index
|
||||
ts = model_get (model_iter_nth_child (None, middle), col_id)[0]
|
||||
ts = model_get (model_iter_nth_child (None, middle), col_id)
|
||||
if ts < target_ts:
|
||||
first_index = middle + 1
|
||||
elif ts > target_ts:
|
||||
|
@ -85,7 +85,7 @@ class LevelDistributionSentinel (object):
|
|||
|
||||
def run_for (self, freq_sentinel):
|
||||
|
||||
model_get = self.model.get
|
||||
model_get = self.model.get_value
|
||||
model_next = self.model.iter_next
|
||||
id_time = self.model.COL_TIME
|
||||
id_level = self.model.COL_LEVEL
|
||||
|
@ -96,7 +96,7 @@ class LevelDistributionSentinel (object):
|
|||
counts = [0] * 6
|
||||
tree_iter = self.model.get_iter_first ()
|
||||
while tree_iter:
|
||||
level = model_get (tree_iter, id_level)[0]
|
||||
level = model_get (tree_iter, id_level)
|
||||
if i > partitions[partitions_i]:
|
||||
result.append (tuple (counts))
|
||||
counts = [0] * 6
|
||||
|
|
Loading…
Reference in a new issue