Get the current tab label instead of creating a new one.

This commit is contained in:
Ignacio Casal Quinteiro 2010-10-03 11:59:46 +00:00 committed by Benjamin Valentin
parent 8c239347fd
commit 1000c0b77c
1 changed files with 15 additions and 15 deletions

View File

@ -815,21 +815,6 @@ create_tab_label (PlumaNotebook *nb,
return tab_label; 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 * static GtkWidget *
get_tab_label (PlumaTab *tab) get_tab_label (PlumaTab *tab)
{ {
@ -841,6 +826,21 @@ get_tab_label (PlumaTab *tab)
return tab_label; 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: * pluma_notebook_set_always_show_tabs:
* @nb: a #PlumaNotebook * @nb: a #PlumaNotebook