From: René Stadler Date: Mon, 3 Dec 2007 15:44:40 +0000 (+0200) Subject: Keep the bottom view sorted by timestamp X-Git-Tag: 1.19.3~491^2~1742 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a9e40a3ce496ddb93285b69f38e6c4301fee1ce;p=platform%2Fupstream%2Fgstreamer.git Keep the bottom view sorted by timestamp --- diff --git a/debug-viewer/GstDebugViewer/GUI.py b/debug-viewer/GstDebugViewer/GUI.py index 4b65eb7..b80f086 100755 --- a/debug-viewer/GstDebugViewer/GUI.py +++ b/debug-viewer/GstDebugViewer/GUI.py @@ -520,7 +520,6 @@ class Column (object): self.view_column = view_column -# FIXME: Merge with gst-inspector? class SizedColumn (Column): default_size = None @@ -1192,7 +1191,14 @@ class LineView (object): if line_model is None: return - line_model.insert_line (0, super_line_index) + if len (line_model): + timestamps = [row[line_model.COL_TIME] for row in line_model] + row = log_filter[(super_line_index,)] + from bisect import bisect_right + position = bisect_right (timestamps, row[line_model.COL_TIME]) + else: + position = 0 + line_model.insert_line (position, super_line_index) def handle_log_view_selection_changed (self, selection):