SynchioButton I was clicked!
(harp_app_0:5279): GLib-GObject-WARNING **: invalid cast from `GtkDataboxLines' to `GtkDatabox'
** (harp_app_0:5279): CRITICAL **: gtk_databox_graph_add: assertion `GTK_IS_DATABOX (box)' failed
(harp_app_0:5279): GLib-GObject-WARNING **: invalid cast from `GtkDataboxLines' to `GtkDatabox'
** (harp_app_0:5279): CRITICAL **: gtk_databox_calculate_extrema: assertion `GTK_IS_DATABOX (box)' failed
(harp_app_0:5279): Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed
/* SYNCH IO BUTTON CALLBACK */
g_signal_connect (G_OBJECT (synchioButton), "clicked",
G_CALLBACK (button_clicked), (gpointer) window1);
void
button_clicked (GtkButton *synchioButton,
GtkWindow *window1)
{
//GtkWidget *dialog, *label, *image, *hbox;
GtkWidget *plotbox;
GtkWidget *gtk_databox_new (void);
GtkDataboxGraph *graph;
GdkColor color;
gfloat *X, *Y;
gint i;
g_print("SynchioButton I was clicked!\n");
X = g_new0 (gfloat, POINTS); // WILL PROBABLY HAVE TO GET RID OF THIS
Y = g_new0 (gfloat, POINTS);
for (i = 1 ; i < POINTS + 1; i ++) { X [i] = i; Y [i] = log10 (i); }
color.red = 15535;
color.green = 15535;
color.blue = 15535;
graph = gtk_databox_lines_new (POINTS, X, Y, &color, 1);
gtk_databox_graph_add (GTK_DATABOX (plotbox), graph);
gtk_databox_auto_rescale (GTK_DATABOX (plotbox), 0.05);
gtk_widget_show (plotbox);
}