>the compiler says that it can't find a function like>toplevel_window->set_transient_for(popup_window*&) and that the candidates>are Gtk::Window::set_transient_for(Gtk::Window*&). thats because you are passing in a ptr-to-Gtk::Window, as the error indicates. try toplevel_window->set_transient_for (*popup_window);
Now it compiles well, the problem is that the new toplevel window isn't visible, only the main popup window is visible.
To view the toplevel window I create a window_simulador object and then call the show_as_child method:
void window_simulador::show_as_child(window1 *obj_father)
{
if(!obj_father)
{
this->error("NO FATHER"); // Custom error message
this->on_button_close_released(); // Close the window to avoid problems
return;
}
this->set_transient_for(*obj_father);
this->raise();
}
If the father window is toplevel all work nice, and the new window is always
visible and the father window is still active.
_________________________________________________________________Stay informed on Election 2004 and the race to Super Tuesday. http://special.msn.com/msn/election2004.armx