Skip to content

Commit 0b210dd

Browse files
committed
Simplify icon handling in CPUProcessTreeView by removing regex check for icon paths
1 parent f5bdf4c commit 0b210dd

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,7 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView {
112112
model.get_value (iter, Column.ICON, out icon_name);
113113
string path = ((string) icon_name);
114114

115-
if (regex.match (path)) {
116-
try {
117-
Gdk.Pixbuf icon = new Gdk.Pixbuf.from_file_at_size (path, 16, -1);
118-
((Gtk.CellRendererPixbuf)icon_cell).pixbuf = icon;
119-
} catch (Error e) {
120-
warning (e.message);
121-
}
122-
} else {
123-
((Gtk.CellRendererPixbuf)icon_cell).icon_name = path;
124-
}
115+
((Gtk.CellRendererPixbuf)icon_cell).icon_name = path;
125116
}
126117

127118
public void cpu_usage_cell_layout (Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) {

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)