GNOME Bugzilla – Bug 669737
ephy-web-view: cleanup close-web-view and close-requested signals
Last modified: 2012-02-22 15:58:48 UTC
Remove duplicated signal and cleanup the code of the handler of the correct one.
Created attachment 207175 [details] [review] ephy-web-view: blank line nitpick
Created attachment 207176 [details] [review] ephy-web-view: remove close-requested signal WebKitWebView has a ::close-web-view signal for the same thing. The only user of this was ephy-window, for exactly the same thing that we are already doing in ephy-web-view, when handling ::close-web-view.
Created attachment 207177 [details] [review] ephy-web-view: don't assume a embed-container in close-web-view The EphyWebView is not necessarily embedded in an EphyEmbedContainer. Simplify close_web_view_cb and make it smarter. It now handles EphyEmbedContainer and random toplevel widgets.
Review of attachment 207175 [details] [review]: OK.
Review of attachment 207176 [details] [review]: Are you saying this code never actually runs?
Comment on attachment 207175 [details] [review] ephy-web-view: blank line nitpick Attachment 207175 [details] pushed as 8be7e8d - ephy-web-view: blank line nitpick
(In reply to comment #5) > Review of attachment 207176 [details] [review]: > > Are you saying this code never actually runs? Yes. No one uses the signal in the codebase, nor in epiphany-extensions. There is also tab-close-request which does something similar, but is used, and close-web-view, which is handled in EphyWebView already.
(In reply to comment #7) > Yes. No one uses the signal in the codebase, nor in epiphany-extensions. > > There is also tab-close-request which does something similar, but is used, and > close-web-view, which is handled in EphyWebView already. Right, I see. I recently cleaned up a bit the code in EphyNotebook. It would be good to handle in just one place the whole "destroy the window when there's only one web view" thing.
Review of attachment 207176 [details] [review]: OK.
Review of attachment 207177 [details] [review]: OK, nice, so this will end up destroying the container when there's just one child left through tab-close-request in EphyWindow, correct? Looks like it, so go for it.
Attachment 207176 [details] pushed as f1fd22a - ephy-web-view: remove close-requested signal Attachment 207177 [details] pushed as a24e4eb - ephy-web-view: don't assume a embed-container in close-web-view