summaryrefslogtreecommitdiff
path: root/GstDebugViewer
diff options
context:
space:
mode:
authorRené Stadler <mail@renestadler.de>2011-11-06 13:18:19 +0100
committerRené Stadler <mail@renestadler.de>2011-11-06 13:18:19 +0100
commit08ed89f1784852aaf15d57b2f4c4f2930aa1334b (patch)
tree8249759170a73f0992f66ba033d6b3831ecc42bf /GstDebugViewer
parent3bf481fb03381def2564c2da011e0635b2518974 (diff)
columns: cleanup default size calculation
Some unused parameters here.
Diffstat (limited to 'GstDebugViewer')
-rw-r--r--GstDebugViewer/GUI/columns.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/GstDebugViewer/GUI/columns.py b/GstDebugViewer/GUI/columns.py
index 43cb4fb..cf23de0 100644
--- a/GstDebugViewer/GUI/columns.py
+++ b/GstDebugViewer/GUI/columns.py
@@ -54,7 +54,7 @@ class SizedColumn (Column):
default_size = None
- def compute_default_size (self, view, model):
+ def compute_default_size (self):
return None
@@ -109,11 +109,11 @@ class TextColumn (SizedColumn):
cell.props.text = modify_func (model.get (tree_iter, id_)[0])
column.set_cell_data_func (cell, cell_data_func)
- def compute_default_size (self, view, model):
+ def compute_default_size (self):
values = self.get_values_for_size ()
if not values:
- return SizedColumn.compute_default_size (self, view, model)
+ return SizedColumn.compute_default_size (self)
cell = self.view_column.get_cell_renderers ()[0]
@@ -602,19 +602,17 @@ class ViewColumnManager (ColumnManager):
if self.view is None:
return
- model = self.view.get_model ()
-
# Timestamp and log level columns are pretty much fixed size, so resize
# them back to default on zoom change:
for column in self.columns:
if column.name in (TimeColumn.name,
LevelColumn.name):
- self.size_column (column, self.view, model)
+ self.size_column (column)
- def size_column (self, column, view, model):
+ def size_column (self, column):
if column.default_size is None:
- default_size = column.compute_default_size (view, model)
+ default_size = column.compute_default_size ()
else:
default_size = column.default_size
# FIXME: Abstract away fixed size setting in Column class!
@@ -628,8 +626,7 @@ class ViewColumnManager (ColumnManager):
def _add_column (self, column):
result = ColumnManager._add_column (self, column)
- model = self.view.get_model ()
- self.size_column (column, self.view, model)
+ self.size_column (column)
return result
def _remove_column (self, column):
@@ -647,7 +644,7 @@ class ViewColumnManager (ColumnManager):
return
self.logger.debug ("model changed, sizing columns")
for column in self.iter_items ():
- self.size_column (column, view, model)
+ self.size_column (column)
self.columns_sized = True
class WrappingMessageColumn (MessageColumn):