Remove views from the tab panel as they are removed from the browser

This commit is contained in:
Christian Dywan 2009-06-22 23:13:23 +02:00
parent 397dd423bd
commit 7860357ed2

View file

@ -255,7 +255,27 @@ tab_panel_browser_remove_tab_cb (MidoriBrowser* browser,
MidoriView* view, MidoriView* view,
MidoriExtension* extension) MidoriExtension* extension)
{ {
GtkTreeModel* model = g_object_get_data (G_OBJECT (extension), "treemodel");
guint i;
GtkTreeIter iter;
i = 0;
while (gtk_tree_model_iter_nth_child (model, &iter, NULL, i))
{
MidoriView* view_;
gtk_tree_model_get (model, &iter, 0, &view_, -1);
if (view == view_)
{
gtk_tree_store_remove (GTK_TREE_STORE (model), &iter);
g_object_unref (view_);
break;
}
g_object_unref (view_);
i++;
}
} }
static void static void