I've been trying to build a simple interface with some spin buttons using Gtkmm
3.0. However, when I run my code I get errors like:
"(main:8242): Pango-CRITICAL **: pango_font_description_get_size: assertion
`desc != NULL' failed
(main:8242): Pango-CRITICAL **: pango_font_description_get_size: assertion
`desc != NULL' failed
(main:8242): Pango-CRITICAL **: pango_font_description_get_size: assertion
`desc != NULL' failed
(main:8242): Pango-CRITICAL **: pango_font_description_get_size: assertion
`desc != NULL' failed
(main:8242): Pango-CRITICAL **: pango_font_description_get_size: assertion
`desc != NULL' failed
(main:8242): Gtk-CRITICAL **: gtk_style_context_set_background: assertion
`GDK_IS_WINDOW (window)' failed
(main:8242): Gtk-CRITICAL **: gtk_style_context_set_background: assertion
`GDK_IS_WINDOW (window)' failed
(main:8242): Gtk-CRITICAL **: gtk_style_context_set_background: assertion
`GDK_IS_WINDOW (window)' failed
(main:8242): Gtk-CRITICAL **: gtk_style_context_set_background: assertion
`GDK_IS_WINDOW (window)' failed
(main:8242): Gtk-CRITICAL **: gtk_style_context_set_background: assertion
`GDK_IS_WINDOW (window)' failed
(main:8242): Gtk-CRITICAL **: gtk_style_context_set_background: assertion
`GDK_IS_WINDOW (window)' failed
(main:8242): Gtk-CRITICAL **: gtk_style_context_set_background: assertion
`GDK_IS_WINDOW (window)' failed
(main:8242): Gtk-CRITICAL **: gtk_style_context_set_background: assertion
`GDK_IS_WINDOW (window)' failed".
So, I went back to the examples and had a look at the SpinButton example in the
documentation. This worked fine, so I started simplifying it until I had just
one spin button and a frame in a box. Thus, the examplewindow.cc file looked
like (main.cc and examplewindow.h were the same as in the example):
#include "examplewindow.h"
#include <iostream>
#include <cstdio>
ExampleWindow::ExampleWindow()
:
m_Frame_NotAccelerated("Not accelerated"),
m_VBox_Main(false, 5),
m_adjustment_day( Gtk::Adjustment::create(1.0, 1.0, 31.0, 1.0, 5.0, 0.0) ),
m_SpinButton_Day(m_adjustment_day)
{
add(m_VBox_Main);
m_VBox_Main.pack_start(m_Frame_NotAccelerated);
m_VBox_Main.pack_start(m_SpinButton_Day);
show_all_children();
}
ExampleWindow::~ExampleWindow()
{
}
This works fine, but if I comment out the line adding the frame to the main
VBox then I get the error back. This is probably some feature of Gtk containers
that I don't understand, but I had a look in the docs and couldn't see any
obvious reasons. Any ideas?
Tom
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list