I went through an old GTK application to replace deprecated GTK3 functions.
I ran into an apparent GTK3 bug, unless there is something I am missing.
The program:
main window with vertical packing box.
The packing box contains a toolbar and a layout.
When I replaced
"gtk_vbox_new(0,0)" with
"gtk_box_new(GTK_ORIENTATION_VERTICAL,0)"
The layout no longer worked.
Using cairo to write text and pixbufs into the layout produced only a blank window.
No diagnostics were produced.
This old code works OK:
Code:
mWin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
vBox = gtk_vbox_new(0,0); // deprecated function
layout = gtk_layout_new(0,0);
gtk_container_add(GTK_CONTAINER(mWin),vBox);
gtk_container_add(GTK_CONTAINER(vBox),layout);
This new code does not work:
Code:
mWin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
vBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,0); // replacement function
layout = gtk_layout_new(0,0);
gtk_container_add(GTK_CONTAINER(mWin),vBox);
gtk_container_add(GTK_CONTAINER(vBox),layout);
Is this a bug or must I do something different?
I could not find anything relevant in the GTK docs or in this forum.