[gnome-boxes/wip/ui-files: 1/4] mini-graph: Remove redundant constructor argument
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/ui-files: 1/4] mini-graph: Remove redundant constructor argument
- Date: Mon, 3 Feb 2014 20:34:33 +0000 (UTC)
commit f8a5e2dbc4199ad35b93c9c21eb15f81e11f8e06
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Feb 3 11:12:07 2014 +0100
mini-graph: Remove redundant constructor argument
No user is passing 'points' at construct time so lets remove it.
src/mini-graph.vala | 4 ++--
src/properties.vala | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/mini-graph.vala b/src/mini-graph.vala
index a795ddd..aff502b 100644
--- a/src/mini-graph.vala
+++ b/src/mini-graph.vala
@@ -20,12 +20,12 @@ private class Boxes.MiniGraph: Gtk.DrawingArea {
}
private bool ymax_set = false;
- public MiniGraph (double[] points = {}, int npoints = -1) {
+ public MiniGraph (int npoints = -1) {
this.points = points;
this.npoints = npoints;
}
- public MiniGraph.with_ymax (double[] points, double ymax, int npoints = -1) {
+ public MiniGraph.with_ymax (double ymax, int npoints = -1) {
this.points = points;
this.ymax = ymax;
this.npoints = npoints;
diff --git a/src/properties.vala b/src/properties.vala
index 3148601..9f18481 100644
--- a/src/properties.vala
+++ b/src/properties.vala
@@ -253,19 +253,19 @@ private class Boxes.Properties: GLib.Object, Boxes.UI {
var label = new Gtk.Label (_("CPU:"));
label.get_style_context ().add_class ("boxes-graph-label");
grid.attach (label, 0, 1, 1, 1);
- cpu = new MiniGraph.with_ymax ({}, 100.0, 20);
+ cpu = new MiniGraph.with_ymax (100.0, 20);
grid.attach (cpu, 1, 1, 1, 1);
label = new Gtk.Label (_("I/O:"));
label.get_style_context ().add_class ("boxes-graph-label");
grid.attach (label, 2, 1, 1, 1);
- io = new MiniGraph ({}, 20);
+ io = new MiniGraph (20);
grid.attach (io, 3, 1, 1, 1);
label = new Gtk.Label (_("Net:"));
label.get_style_context ().add_class ("boxes-graph-label");
grid.attach (label, 4, 1, 1, 1);
- net = new MiniGraph ({}, 20);
+ net = new MiniGraph (20);
grid.attach (net, 5, 1, 1, 1);
shutdown_button = new Button.with_label (_("Force Shutdown"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]