=?UTF-8?Q?Re:_Re:_Porting_an_application?=



> Hi,
> 
> wow, version 0.4 is really old :-)
Yes, now is failing to compile with recent gtk (since Fedora 10) 
> 
> Wojciech Kazubski wrote:
> [...]
> > ---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?
> 
> I assume the widget is shown (two scrollbars, two rulers and an area 
> enclosed by them), but you are missing a graph?
> 
> Have you called any scaling function, i.e. gtk_databox_set_total_limits 
> or gtk_databox_auto_rescale? Otherwise the displayed range defaults to 
> (-1., 1., 1., -1.), which might not be where your data is.
> 
> gtk_databox_auto_rescale should be called after adding the data.
> 

I do not get the graph widget. I only get empty space of the requested size. The code i try to use is:
---code begin---
...
    pmain_widgets->databox = gtk_databox_new ();
    gtk_widget_set_size_request (pmain_widgets->vbox, 620, 300);
    gtk_databox_create_box_with_scrollbars_and_rulers
         (&pmain_widgets->databox, &pmain_widgets->table,
                               TRUE, TRUE, TRUE, TRUE);
    gtk_box_pack_start (GTK_BOX (pmain_widgets->vbox), 
                      pmain_widgets->table, TRUE, TRUE, 0);
...
    gtk_databox_set_total_limits (
                 GTK_DATABOX (pmain_widgets->databox),
                 -1000.0, 5000.0, -10000.0, 23000.0);
    gtk_databox_auto_rescale (GTK_DATABOX (pmain_widgets->databox),
                                          0.05);
...
---code end---
I suspect that the problem is caused by the glade used to design the dialogs. Another possibility is that I use wrong variables in the code above.
The main program window is created by create_analyzer_viewer, but is almost empty and in another position on the screen. Only widgets' backgrounds are displayed as rectangles. The window is moved to final position and its content is displayed after entering gtk_main.

I tried to insert the code from examples/basics.c at the begin of create_analyzer_viewer and I got a separate window with a graph as expected.

Wojciech Kazubski



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]