[gnome-system-monitor/ubergraph] Sanitize label show/hide mechanism
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor/ubergraph] Sanitize label show/hide mechanism
- Date: Tue, 9 Jul 2013 00:07:29 +0000 (UTC)
commit 4a1c3d8c956be8f3e1d3c215ba96c5b4ef8bf114
Author: Robert Roth <robert roth off gmail com>
Date: Tue Jul 9 03:07:14 2013 +0300
Sanitize label show/hide mechanism
uber/uber-line-graph.c | 2 --
uber/uber-window.c | 28 ----------------------------
2 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/uber/uber-line-graph.c b/uber/uber-line-graph.c
index 9a3528a..f136d45 100644
--- a/uber/uber-line-graph.c
+++ b/uber/uber-line-graph.c
@@ -504,7 +504,6 @@ uber_line_graph_render_line (UberLineGraph *graph, /* IN */
* Just move to the right position on first entry.
*/
cairo_move_to(cr, x, y);
- goto next;
} else {
/*
* Draw curve to data point using the last X/Y positions as
@@ -516,7 +515,6 @@ uber_line_graph_render_line (UberLineGraph *graph, /* IN */
last_x - (each / 2.),
y, x, y);
}
- next:
last_y = y;
last_x = x;
}
diff --git a/uber/uber-window.c b/uber/uber-window.c
index 42e026b..06bd670 100644
--- a/uber/uber-window.c
+++ b/uber/uber-window.c
@@ -70,16 +70,12 @@ void
uber_window_show_labels (UberWindow *window, /* IN */
UberGraph *graph) /* IN */
{
- UberWindowPrivate *priv;
GtkWidget *labels;
GtkWidget *align;
GList *list;
- gboolean show;
- g_return_if_fail(UBER_IS_WINDOW(window));
g_return_if_fail(UBER_IS_GRAPH(graph));
- priv = window->priv;
/*
* Get the widgets labels.
*/
@@ -87,7 +83,6 @@ uber_window_show_labels (UberWindow *window, /* IN */
/*
* Show/hide ticks and labels.
*/
- show = !!labels;
if (labels) {
align = gtk_bin_get_child(GTK_BIN(labels));
list = gtk_container_get_children(GTK_CONTAINER(align));
@@ -95,32 +90,9 @@ uber_window_show_labels (UberWindow *window, /* IN */
gtk_widget_show(labels);
} else {
gtk_widget_hide(labels);
- show = FALSE;
}
g_list_free(list);
}
- if (graph == (gpointer)g_list_last(priv->graphs)) {
- show = TRUE;
- }
- uber_graph_set_show_xlabels(graph, show);
- /*
- * Hide labels/xlabels for other graphs.
- */
- for (list = priv->graphs; list && list->next; list = list->next) {
- if (list->data != graph) {
- uber_graph_set_show_xlabels(list->data, FALSE);
- labels = uber_graph_get_labels(list->data);
- if (labels) {
- gtk_widget_hide(labels);
- }
- }
- }
- /*
- * Ensure the last graph always has labels.
- */
- if (list) {
- uber_graph_set_show_xlabels(UBER_GRAPH(list->data), TRUE);
- }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]