add "filled" property so sparklines can be filled or not without recompiling -- Guido diff -r 59fd3136f525 src/graphWidgets/sparkline.c --- a/src/graphWidgets/sparkline.c Thu Oct 02 15:15:53 2008 +0200 +++ b/src/graphWidgets/sparkline.c Sat Oct 04 12:16:11 2008 +0200 @@ -41,7 +41,8 @@ enum { PROP_0, - PROP_DATAARRAY + PROP_DATAARRAY, + PROP_FILLED, }; static gpointer parent_class; @@ -88,7 +89,6 @@ priv = GTK_SPARKLINE_GET_PRIVATE (sparkline); priv->filled = TRUE; - // priv->filled = FALSE; priv->data_array = g_value_array_new(0); g_signal_connect (G_OBJECT (sparkline), "expose_event", @@ -124,6 +124,13 @@ 0, G_PARAM_READABLE | G_PARAM_WRITABLE), G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (object_class, + PROP_FILLED, + g_param_spec_boolean ("filled", + "Filled", + "fill space under sparcline", + TRUE, + G_PARAM_READABLE | G_PARAM_WRITABLE)); g_type_class_add_private (object_class, sizeof (GtkSparklinePrivate)); } @@ -153,6 +160,10 @@ { case PROP_DATAARRAY: g_value_set_boxed(value, priv->data_array); + break; + + case PROP_FILLED: + g_value_set_boolean(value, priv->filled); break; default: @@ -178,6 +189,10 @@ g_value_array_free(priv->data_array); priv->data_array = g_value_array_copy(g_value_get_boxed(value)); gtk_widget_queue_draw(GTK_WIDGET(object)); + break; + + case PROP_FILLED: + priv->filled = g_value_get_boolean(value); break; default: _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/et-mgmt-tools