static void remove_tab (GtrTab *tab, GtrNotebook *notebook) { remove_tab_label (notebook, tab); /* Destroy the tab to break circular refs */ gtk_widget_destroy (GTK_WIDGET (tab)); update_tabs_visibility (notebook); }
static void remove_tab (CeditTab *tab, CeditNotebook *nb) { gint position; position = gtk_notebook_page_num (GTK_NOTEBOOK (nb), GTK_WIDGET (tab)); /* we ref the tab so that it's still alive while the tabs_removed * signal is processed. */ g_object_ref (tab); remove_tab_label (nb, tab); gtk_notebook_remove_page (GTK_NOTEBOOK (nb), position); update_tabs_visibility (nb, FALSE); g_signal_emit (G_OBJECT (nb), signals[TAB_REMOVED], 0, tab); g_object_unref (tab); }