Commit 975606f1 authored by Petr Štětka's avatar Petr Štětka
Browse files

*some cleans

parent a1d85aeb
......@@ -2,29 +2,13 @@ namespace Usage
{
public class PerformanceView : View
{
/*ProcessList processListBox;
Gtk.Label CPULoadLabel;
List<ProcessRow> processRowList;
bool showActiveProcess = true;*/
Gtk.Stack performanceStack;
Gtk.Stack performanceStack;
public PerformanceView()
{
name = "PERFORMANCE";
title = _("Performance");
/*CPULoadLabel = new Gtk.Label(null);
CPULoadLabel.margin_right = 100;
var processorLabel = new Gtk.Label("<b>" + _("Processor") + "</b>");
processorLabel.set_use_markup(true);
var processorTextBox = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
processorTextBox.set_center_widget(processorLabel);
processorTextBox.pack_end(CPULoadLabel, false, true, 0);
processorTextBox.margin_top = 20;*/
var CPUButton = new Gtk.Button.with_label("Processor");
var memoryButton = new Gtk.Button.with_label("Memory");
var diskButton = new Gtk.Button.with_label("Disk I/O");
......@@ -36,28 +20,9 @@ namespace Usage
panelBox.pack_start(diskButton, false, true, 0);
panelBox.pack_start(networkButton, false, true, 0);
/*processListBox = new ProcessList();
var CPUBox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
var processListBoxFrame = new Gtk.Frame(null);
processListBoxFrame.margin_start = 100;
processListBoxFrame.margin_end = 100;
processListBoxFrame.margin_bottom = 20;
processListBoxFrame.add(processListBox);
CPUBox.pack_start(processorTextBox, false, false, 0);
CPUBox.pack_start(processListBoxFrame, true, false, 0);*/
/*var scrolledWindowCPU = new Gtk.ScrolledWindow(null, null);
scrolledWindowCPU.add(CPUBox);
scrolledWindowCPU.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);*/
performanceStack = new Gtk.Stack();
performanceStack.set_transition_type(Gtk.StackTransitionType.SLIDE_UP_DOWN);
performanceStack.set_transition_duration(700);
/*performanceStack.add_named(scrolledWindowCPU, "CPU");
performanceStack.add_named(new Gtk.Label("Memory"), "RAM");
performanceStack.add_named(new Gtk.Label("Disk I/O"), "DISK");
performanceStack.add_named(new Gtk.Label("Network"), "NETWORK");*/
var subViews = new View[]
{
......@@ -81,7 +46,7 @@ namespace Usage
headerBar.hideMenuButton();
});
networkButton.clicked.connect(() => {
performanceStack.set_visible_child_name("NETcpu-subview.valaWORK");
performanceStack.set_visible_child_name("NETWORK");
headerBar.hideMenuButton();
});
......@@ -89,7 +54,6 @@ namespace Usage
paned.add1(panelBox);
paned.add2(performanceStack);
add(paned);
}
public override void updateHeaderBar()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment