debug-viewer: small code cleanups

Inline a few statements. Remove unused variables.
This commit is contained in:
Stefan Sauer 2016-09-30 22:29:43 +02:00
parent 0e4d6664d4
commit 3f06e2baaa
2 changed files with 2 additions and 9 deletions

View file

@ -733,7 +733,6 @@ class Window (object):
self.show_info(self.progress_dialog.widget) self.show_info(self.progress_dialog.widget)
self.progress_dialog.handle_cancel = self.handle_filter_progress_dialog_cancel self.progress_dialog.handle_cancel = self.handle_filter_progress_dialog_cancel
dispatcher = Common.Data.GSourceDispatcher() dispatcher = Common.Data.GSourceDispatcher()
self.filter_dispatcher = dispatcher
# FIXME: Unsetting the model to keep e.g. the dispatched timeline # FIXME: Unsetting the model to keep e.g. the dispatched timeline
# sentinel from collecting data while we filter idly, which slows # sentinel from collecting data while we filter idly, which slows

View file

@ -1059,19 +1059,13 @@ class TimelineFeature (FeatureBase):
self.attached_windows = {} self.attached_windows = {}
handler = self.handle_show_action_toggled
action = self.action_group.get_action("show-timeline") action = self.action_group.get_action("show-timeline")
action.props.active = self.state.shown 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): def handle_show_action_toggled(self, action):
show = action.props.active self.state.shown = action.props.active
if show:
self.state.shown = True
else:
self.state.shown = False
def handle_attach_window(self, window): def handle_attach_window(self, window):