Porting an application
- From: Wojciech Kazubski <wk0 o2 pl>
- To: gtkdatabox-list gnome org
- Subject: Porting an application
- Date: Fri, 23 Oct 2009 09:12:57 +0200
Hello!
I am trying to port an application gvna from gtkdatabox, using gtkdatabox 0.4
to recent gtkdatabox 0.9.x.
The code to create graph window is like that (analyzer.c):
--- code begin--
...
pmain_widgets->databox = gtk_databox_new ();
gtk_databox_set_background_color (GTK_DATABOX (pmain_widgets->databox),
pconfig_data->backg_color);
gtk_widget_set_size_request (pmain_widgets->databox, 620, 300);
type_marker = gtk_databox_display_type_add(databox_marker_draw,
databox_marker_cleanup);
...
/* data is added here */
...
gtk_box_pack_start (GTK_BOX (pmain_widgets->vbox), pmain_widgets->databox,
TRUE, TRUE, 0);
....
---code end---
I tried to modify the code to use
gtk_databox_create_box_with_scrollbars_and_rulers
but no graph window is drawn. How the code should be modified?
The data is added to the graph with the command like that:
....
pvna->pvna_data->phase_index = gtk_databox_data_add (
GTK_DATABOX(pvna->main_widgets.databox),
pvna->pvna_data->samples, pvna->pvna_data->X,
pvna->pvna_data->PHASE_data,
pconfig_data->phase_color,
GTK_DATABOX_LINES, 1);
....
which should be translated into:
...
graph = gtk_databox_points_new (pvna->pvna_data->samples,
pvna->pvna_data->X, pvna->pvna_data->PHASE_data,
&pconfig_data->phase_color,1);
gtk_databox_graph_add (GTK_DATABOX (pvna->main_widgets.databox),
graph);
...
Wojciech Kazubski
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]