Reconsider how EphyNotificationContainer works with multiple windows
Submitted by Michael Catanzaro
Currently we have EphyNotificationContainer, a singleton widget that gets unparented and reparented whenever the active EphyEmbed changes. It's a child of the EphyEmbed to make it appear in the right position on the screen, but we want it displayed over whatever EphyEmbed is currently active. It's a little strange, but works in practice.
Problem is we never considered how to make it work with multiple windows. Until yesterday, the code attempted to add the EphyNotificationContainer widget to one EphyEmbed per window, which of course doesn't work as a GtkWidget can have only a single parent. I've made all subsequent attempts fail, but this is probably not ideal. Probably we want to display the notification always on the active embed.
Or, perhaps we want one EphyNotificationContainer per window. To implement that, we'd need to make it:
- not a singleton
- remove ephy_notification_container_get_default()
- and probably store the EphyNotificationContainer in the EphyEmbedContainer (implemented by EphyWindow)
so that it can be accessible from EphyPasswordNotification (in lib/widgets/). (You can get the EphyEmbedContainer using ephy_embed_shell_get_default () -> EPHY_EMBED_CONTAINER (gtk_application_get_active_window (GTK_APPLICATION (shell))).)
Version: git master