Comment 1 for bug 905759

Revision history for this message
gue5t gue5t (gue5t) wrote : Re: ditacheing a tab is not a real cetache

I'm interested in fixing this, but it'll take a little work because of how things are currently done.

_midori_browser_add_tab is the main culprit here: it connects numerous signals on the midoriview with the browser in which the view was originally created as a data argument. This means we need to disconnect all these signals when we add the view to a new browser. In addition, the function adds the view to the browser's set of items, so we'll have to undo that. I'd probably put these operations into a function, _midori_browser_remove_tab (with the current function of that name becoming perhaps _midori_browser_destroy_tab), which is more or less the inverse of the portion of _midori_browser_add_tab that attaches the midoriview to the midoribrowser.

These changes seem like they'd be sufficient to fix the problem of tabs not knowing that they no longer "belong" to their old owner when they get dragged into a new window. If there are no concerns I'll get to writing a patch along these lines soonish.