[gtk+/rendering-cleanup-next: 78/154] tearoffmenuitem: Merge paint() into expose()



commit 9ec5801677c8af40070d6e853abf91c1cd00f616
Author: Benjamin Otte <otte redhat com>
Date:   Tue Sep 7 22:12:33 2010 +0200

    tearoffmenuitem: Merge paint() into expose()

 gtk/gtktearoffmenuitem.c |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtktearoffmenuitem.c b/gtk/gtktearoffmenuitem.c
index 5e68892..c590d25 100644
--- a/gtk/gtktearoffmenuitem.c
+++ b/gtk/gtktearoffmenuitem.c
@@ -41,7 +41,7 @@ struct _GtkTearoffMenuItemPrivate
 
 static void gtk_tearoff_menu_item_size_request (GtkWidget             *widget,
 				                GtkRequisition        *requisition);
-static gint gtk_tearoff_menu_item_expose     (GtkWidget             *widget,
+static gboolean gtk_tearoff_menu_item_expose   (GtkWidget             *widget,
 					      GdkEventExpose        *event);
 static void gtk_tearoff_menu_item_activate   (GtkMenuItem           *menu_item);
 static void gtk_tearoff_menu_item_parent_set (GtkWidget             *widget,
@@ -111,9 +111,9 @@ gtk_tearoff_menu_item_size_request (GtkWidget      *widget,
     }
 }
 
-static void
-gtk_tearoff_menu_item_paint (GtkWidget   *widget,
-			     GdkRectangle *area)
+static gboolean
+gtk_tearoff_menu_item_expose (GtkWidget      *widget,
+			    GdkEventExpose *event)
 {
   GtkAllocation allocation;
   GtkMenuItem *menu_item;
@@ -158,7 +158,7 @@ gtk_tearoff_menu_item_paint (GtkWidget   *widget,
                          window,
 			 GTK_STATE_PRELIGHT,
 			 selected_shadow_type,
-			 area, widget, "menuitem",
+			 &event->area, widget, "menuitem",
 			 x, y, width, height);
 	}
       else
@@ -227,13 +227,6 @@ gtk_tearoff_menu_item_paint (GtkWidget   *widget,
 	  x += 2 * TEAR_LENGTH;
 	}
     }
-}
-
-static gint
-gtk_tearoff_menu_item_expose (GtkWidget      *widget,
-			    GdkEventExpose *event)
-{
-  gtk_tearoff_menu_item_paint (widget, &event->area);
 
   return FALSE;
 }



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