mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
Add ability to add rows to bottom view
This commit is contained in:
parent
3cfcc8e635
commit
ad32656ecb
1 changed files with 13 additions and 0 deletions
|
@ -1096,6 +1096,7 @@ class LineView (object):
|
|||
|
||||
log_view = window.log_view
|
||||
log_view.connect ("notify::model", self.handle_log_view_notify_model)
|
||||
log_view.connect ("row-activated", self.handle_log_view_row_activated)
|
||||
sel = log_view.get_selection ()
|
||||
sel.connect ("changed", self.handle_log_view_selection_changed)
|
||||
|
||||
|
@ -1111,6 +1112,18 @@ class LineView (object):
|
|||
line_model = LineViewLogModel (log_model)
|
||||
self.line_view.props.model = line_model
|
||||
|
||||
def handle_log_view_row_activated (self, view, path, column):
|
||||
|
||||
log_filter = view.props.model
|
||||
line_index = path[0]
|
||||
|
||||
parent_line_index = log_filter.parent_line_index (line_index)
|
||||
line_model = self.line_view.props.model
|
||||
if line_model is None:
|
||||
return
|
||||
|
||||
line_model.insert_line (0, parent_line_index)
|
||||
|
||||
def handle_log_view_selection_changed (self, selection):
|
||||
|
||||
model, tree_iter = selection.get_selected ()
|
||||
|
|
Loading…
Reference in a new issue