From 3f06e2baaa6e7465af6944b505ae062e38ae9118 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 30 Sep 2016 22:29:43 +0200 Subject: [PATCH] debug-viewer: small code cleanups Inline a few statements. Remove unused variables. --- debug-viewer/GstDebugViewer/GUI/window.py | 1 - debug-viewer/GstDebugViewer/Plugins/Timeline.py | 10 ++-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/debug-viewer/GstDebugViewer/GUI/window.py b/debug-viewer/GstDebugViewer/GUI/window.py index 017d43e675..55f7b295da 100644 --- a/debug-viewer/GstDebugViewer/GUI/window.py +++ b/debug-viewer/GstDebugViewer/GUI/window.py @@ -733,7 +733,6 @@ class Window (object): self.show_info(self.progress_dialog.widget) self.progress_dialog.handle_cancel = self.handle_filter_progress_dialog_cancel dispatcher = Common.Data.GSourceDispatcher() - self.filter_dispatcher = dispatcher # FIXME: Unsetting the model to keep e.g. the dispatched timeline # sentinel from collecting data while we filter idly, which slows diff --git a/debug-viewer/GstDebugViewer/Plugins/Timeline.py b/debug-viewer/GstDebugViewer/Plugins/Timeline.py index d226834748..fc3489ab10 100644 --- a/debug-viewer/GstDebugViewer/Plugins/Timeline.py +++ b/debug-viewer/GstDebugViewer/Plugins/Timeline.py @@ -1059,19 +1059,13 @@ class TimelineFeature (FeatureBase): self.attached_windows = {} - handler = self.handle_show_action_toggled action = self.action_group.get_action("show-timeline") action.props.active = self.state.shown - action.connect("toggled", handler) + action.connect("toggled", self.handle_show_action_toggled) def handle_show_action_toggled(self, action): - show = action.props.active - - if show: - self.state.shown = True - else: - self.state.shown = False + self.state.shown = action.props.active def handle_attach_window(self, window):