diff options
author | René Stadler <mail@renestadler.de> | 2007-11-27 16:50:41 +0200 |
---|---|---|
committer | René Stadler <mail@renestadler.de> | 2007-11-27 16:50:41 +0200 |
commit | adc07772215927f19804df4501cb4b3b48c0f710 (patch) | |
tree | 08b99177f577b272bddc1a2dd4f7ecd7eae1913a /GstDebugViewer/Plugins | |
parent | 24ca5afc1e31e77430f537e2589782d56c47e66d (diff) |
Add ranged line omission feature
Diffstat (limited to 'GstDebugViewer/Plugins')
-rw-r--r-- | GstDebugViewer/Plugins/Timeline.py | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/GstDebugViewer/Plugins/Timeline.py b/GstDebugViewer/Plugins/Timeline.py index 18ef9bd..d45a883 100644 --- a/GstDebugViewer/Plugins/Timeline.py +++ b/GstDebugViewer/Plugins/Timeline.py @@ -647,8 +647,14 @@ class TimelineFeature (FeatureBase): action.connect ("toggled", handler) action.props.active = self.state.shown + handler = self.handle_log_view_notify_model + self.notify_model_id = self.log_view.connect ("notify::model", handler) + def handle_detach_window (self, window): + self.log_view.disconnect (self.notify_model_id) + self.log_view = None + window.ui_manager.remove_ui (self.merge_id) self.merge_id = None @@ -659,7 +665,22 @@ class TimelineFeature (FeatureBase): def handle_attach_log_file (self, window, log_file): - model = window.log_filter + pass + + def handle_detach_log_file (self, window, log_file): + + self.timeline.clear () + self.vtimeline.clear () + + def handle_log_view_notify_model (self, view, gparam): + + model = view.props.model + + if model is None: + self.timeline.clear () + self.vtimeline.clear () + return + self.timeline.update (model) # Need to dispatch these idly with a low priority to avoid triggering a @@ -670,11 +691,6 @@ class TimelineFeature (FeatureBase): return False gobject.idle_add (idle_update, priority = gobject.PRIORITY_LOW) - def handle_detach_log_file (self, window, log_file): - - self.timeline.clear () - self.vtimeline.clear () - def update_timeline_position (self): model = self.log_view.props.model |