Closed hetogs closed 4 years ago
@ebassi What's the correct way of closing an assistant?
The best place to ask about this would be on https://discourse.gnome.org . As this is not a bug or feature request, let's close it here.
Sorry, I missed the notification.
GtkAssistant
does not allow closing itself in the middle of a progress page; if you try doing that, it will emit the "cancel" signal, which will let you handle the case. At that point, you might want to hide the assistant window, schedule an idle callback, and call unsafe { assistant.destroy(); }
when you know nothing else is holding a reference to it.
Alternatively, you can connect to the delete-event
signal and return true
from your handler, which will skip the default behaviour.
In crate version 0.9 we need to call
gtk::GtkWindow::close()
insteadgtk::Widget::destroy()
becausedestroy()
is marked asunsafe
but withgtk::Assistant
call to this function do nothing, the assistant do not close.