[gtk+/rendering-cleanup-next: 61/155] notebook: Simplify draw_tab function a bit



commit ad40d8a9a99dd2792b6b13eaee5e22674d0567c0
Author: Benjamin Otte <otte redhat com>
Date:   Tue Sep 7 01:09:41 2010 +0200

    notebook: Simplify draw_tab function a bit
    
    Don't keep lots of local variables that are only used once.

 gtk/gtknotebook.c |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 49747c8..ce74cad 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -4928,9 +4928,7 @@ gtk_notebook_draw_tab (GtkNotebook     *notebook,
 		       GdkRectangle    *area)
 {
   GtkNotebookPrivate *priv;
-  GdkRectangle page_area;
   GtkStateType state_type;
-  GtkPositionType gap_side;
   GdkWindow *window;
   GtkWidget *widget;
   
@@ -4947,13 +4945,6 @@ gtk_notebook_draw_tab (GtkNotebook     *notebook,
   else
     window = gtk_widget_get_window (widget);
 
-  page_area.x = page->allocation.x;
-  page_area.y = page->allocation.y;
-  page_area.width = page->allocation.width;
-  page_area.height = page->allocation.height;
-
-  gap_side = get_tab_gap_pos (notebook);
-
   if (priv->cur_page == page)
     state_type = GTK_STATE_NORMAL;
   else 
@@ -4962,9 +4953,11 @@ gtk_notebook_draw_tab (GtkNotebook     *notebook,
   gtk_paint_extension (gtk_widget_get_style (widget), window,
                        state_type, GTK_SHADOW_OUT,
                        area, widget, "tab",
-                       page_area.x, page_area.y,
-                       page_area.width, page_area.height,
-                       gap_side);
+                       page->allocation.x,
+                       page->allocation.y,
+                       page->allocation.width,
+                       page->allocation.height,
+                       get_tab_gap_pos (notebook));
 
   if (gtk_widget_has_focus (widget) &&
       priv->cur_page == page)



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