Questions on Gtk::Notebook




After deriving my own Gtk::Notebook class, i experienced the following
behavour, for which i want to know, if this is on purpose:

1.) A Gtk::Notebook seems to emit signal_switch_page with a second parameter 0
    when realized. Because i wanted to open a different page by default, i had
    to override on_realize().

2.) A Gtk::Notebook emits the same signal a few times, when getting destroyed.
    This led to following warnings glibmm-warnings:

    (duty-roaster:20667): glibmm-WARNING **: Glib::create_new_wrapper:
    Attempted to create a 2nd C++ wrapper for a C instance whose C++ wrapper
    has been deleted.

    (duty-roaster:20667): glibmm-WARNING **: failed to wrap type of
    'gtkmm__GtkFrame'

    (duty-roaster:20667): gtkmm-CRITICAL **: void
    <unnamed>::container_foreach_callback(GtkWidget*, void*): assertion
    `widget != 0' failed
    _month == 05

    (duty-roaster:20667): glibmm-WARNING **: Glib::create_new_wrapper:
    Attempted to create a 2nd C++ wrapper for a C instance whose C++ wrapper
    has been deleted.

    (duty-roaster:20667): glibmm-WARNING **: failed to wrap type of
    'gtkmm__GtkFrame'

    (duty-roaster:20667): gtkmm-CRITICAL **: void
    <unnamed>::container_foreach_callback(GtkWidget*, void*): assertion
    `widget != 0' failed
    _month == 04

    ....

    I removed them, by adding 'bool _destruct' to my class, which is normally
    false, but set to true in the desructor. If _destrcut == true, i ignore
    signal_switch_page.
    
Thanks, Antonio    


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