From 1000c0b77ca712c2ceddbc7e2800291b3d166388 Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Sun, 3 Oct 2010 11:59:46 +0000 Subject: [PATCH] Get the current tab label instead of creating a new one. --- pluma/pluma-notebook.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pluma/pluma-notebook.c b/pluma/pluma-notebook.c index 85515b3..b6a935e 100644 --- a/pluma/pluma-notebook.c +++ b/pluma/pluma-notebook.c @@ -815,21 +815,6 @@ create_tab_label (PlumaNotebook *nb, return tab_label; } -static void -remove_tab_label (PlumaNotebook *nb, - PlumaTab *tab) -{ - GtkWidget *tab_label; - - tab_label = pluma_tab_label_new (tab); - - g_signal_handlers_disconnect_by_func (tab_label, - G_CALLBACK (close_button_clicked_cb), - nb); - - g_object_set_data (G_OBJECT (tab), "tab-label", NULL); -} - static GtkWidget * get_tab_label (PlumaTab *tab) { @@ -841,6 +826,21 @@ get_tab_label (PlumaTab *tab) return tab_label; } +static void +remove_tab_label (PlumaNotebook *nb, + PlumaTab *tab) +{ + GtkWidget *tab_label; + + tab_label = get_tab_label (tab); + + g_signal_handlers_disconnect_by_func (tab_label, + G_CALLBACK (close_button_clicked_cb), + nb); + + g_object_set_data (G_OBJECT (tab), "tab-label", NULL); +} + /** * pluma_notebook_set_always_show_tabs: * @nb: a #PlumaNotebook