[gtk+] GtkNotebook: Fix a problem with tab states
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkNotebook: Fix a problem with tab states
- Date: Sat, 4 Jan 2014 18:02:57 +0000 (UTC)
commit 64855f129579a632fc1a5deb217ab0a0c66039ec
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 4 13:01:49 2014 -0500
GtkNotebook: Fix a problem with tab states
When replacing the tab label, we were not adding the
active-page style class. Fix that.
gtk/gtknotebook.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 9e0944b..e40d277 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -7805,6 +7805,10 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook,
G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page),
notebook);
+ if (priv->cur_page == page)
+ gtk_style_context_add_class (gtk_widget_get_style_context (page->tab_label),
+ "active-page");
+
if (priv->show_tabs && gtk_widget_get_visible (child))
{
gtk_widget_show (page->tab_label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]