[gtk+] notebook: Drop unneeded code



commit 8917ee5373dc8f5ff1344fa9ffb636ffe99b5bed
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 24 10:32:35 2015 -0400

    notebook: Drop unneeded code
    
    We no longer need to set the position classes on the main css node,
    since they are already set on the per-tab subnodes.

 gtk/gtknotebook.c |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 7dd8bf6..84fdcfd 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1942,29 +1942,6 @@ gtk_notebook_unrealize (GtkWidget *widget)
 }
 
 static void
-add_tab_position_style_class (GtkStyleContext *context,
-                              gint             tab_pos)
-{
-  switch (tab_pos)
-    {
-    case GTK_POS_TOP:
-      gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
-      break;
-    case GTK_POS_BOTTOM:
-      gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
-      break;
-    case GTK_POS_LEFT:
-      gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
-      break;
-    case GTK_POS_RIGHT:
-      gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
-      break;
-    default:
-      break;
-    }
-}
-
-static void
 gtk_notebook_get_preferred_tabs_size (GtkNotebook    *notebook,
                                       GtkRequisition *requisition)
 {
@@ -5216,7 +5193,6 @@ gtk_notebook_paint (GtkWidget    *widget,
   header_height = height;
 
   gtk_style_context_save (context);
-  add_tab_position_style_class (context, tab_pos);
 
   switch (tab_pos)
     {
@@ -5335,9 +5311,6 @@ gtk_notebook_paint (GtkWidget    *widget,
                         "has-tab-gap", &has_tab_gap,
                         NULL);
 
-  if (priv->show_tabs)
-    add_tab_position_style_class (context, tab_pos);
-
   if (priv->show_border)
     gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]