From eea7c6687b38e971c0488ef96623f9576f94540c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stadler?= Date: Wed, 14 Nov 2007 13:34:53 +0200 Subject: [PATCH] Add PID column --- debug-viewer/GstDebugViewer/GUI.py | 20 +++++++++++++++++++- debug-viewer/data/gst-debug-viewer.ui | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/debug-viewer/GstDebugViewer/GUI.py b/debug-viewer/GstDebugViewer/GUI.py index 9a43bb9995..77503a9838 100755 --- a/debug-viewer/GstDebugViewer/GUI.py +++ b/debug-viewer/GstDebugViewer/GUI.py @@ -498,6 +498,24 @@ class LevelColumn (TextColumn): return values +class PidColumn (TextColumn): + + name = "pid" + label_header = _("PID") + id = LazyLogModel.COL_PID + + @staticmethod + def get_modify_func (): + + return str + + def get_values_for_size (self): + + # TODO: Same as for TimeColumn. There is no guarantee that 999999 is + # the widest string; use fixed font or come up with something better. + + return ["999999"] + class ThreadColumn (TextColumn): name = "thread" @@ -756,7 +774,7 @@ class ColumnManager (Common.GUI.Manager): class ViewColumnManager (ColumnManager): - column_classes = (TimeColumn, LevelColumn, ThreadColumn, CategoryColumn, + column_classes = (TimeColumn, LevelColumn, PidColumn, ThreadColumn, CategoryColumn, FilenameColumn, FunctionColumn, ObjectColumn, MessageColumn,) def __init__ (self, state): diff --git a/debug-viewer/data/gst-debug-viewer.ui b/debug-viewer/data/gst-debug-viewer.ui index 7d31e32586..70deae2cfe 100644 --- a/debug-viewer/data/gst-debug-viewer.ui +++ b/debug-viewer/data/gst-debug-viewer.ui @@ -13,6 +13,7 @@ +