Skip to content

Commit 798be66

Browse files
authored
Create the model for OpenFilesTreeView internally (#468)
* Remove unused regex from OpenFilesTreeView class * Create OpenFilesTreeViewModel in OpenFilesTreeView
1 parent f5bdf4c commit 798be66

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/Views/ProcessView/ProcessInfoView/OpenFilesTreeView.vala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@
66
public class Monitor.OpenFilesTreeView : Gtk.TreeView {
77
public new OpenFilesTreeViewModel model;
88
private Gtk.TreeViewColumn path_column;
9-
private Regex ? regex;
109

1110
public signal void process_selected (Process process);
1211

13-
public OpenFilesTreeView (OpenFilesTreeViewModel model) {
14-
this.model = model;
15-
/* *INDENT-OFF* */
16-
regex = /(?i:^.*\.(xpm|png)$)/; // vala-lint=space-before-paren,
17-
/* *INDENT-ON* */
12+
public OpenFilesTreeView () {
13+
this.model = new OpenFilesTreeViewModel ();
1814

1915
show_expanders = false;
2016

src/Views/ProcessView/ProcessInfoView/ProcessInfoIOStats.vala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ public class Monitor.ProcessInfoIOStats : Gtk.Grid {
2020

2121
cancelled_write_bytes_label = create_label (Utils.NO_DATA);
2222

23-
var model = new OpenFilesTreeViewModel ();
24-
25-
open_files_tree_view = new OpenFilesTreeView (model);
23+
open_files_tree_view = new OpenFilesTreeView ();
2624

2725
var open_files_tree_view_scrolled = new Gtk.ScrolledWindow (null, null) {
2826
child = open_files_tree_view

subprojects/live-chart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 5a690045f2e3df1d78ff0ea1e5df6470a6760639

0 commit comments

Comments
 (0)