[gtk+] drop the draw_string() function from GtkStyle



commit 5300dc2b36c1e533bea45046549f4cf9d3bdb687
Author: Sven Herzberg <herzi gnome-de org>
Date:   Thu Jun 3 14:00:34 2010 +0200

    drop the draw_string() function from GtkStyle
    
    Reviewed by Michael Natterer.
    
    * gtk/gtkstyle.c,
    * gtk/gtkstyle.h: gdk_draw_string() has been deprecated and removed
      already. There's no one left who should be using this function
      (found this when porting sapwood to GTK+ 3.0)
    * modules/engines/pixbuf/pixbuf-draw.c: don't implement this unused
      function

 gtk/gtkstyle.c                       |   43 ----------------------------------
 gtk/gtkstyle.h                       |    9 -------
 modules/engines/pixbuf/pixbuf-draw.c |   39 ------------------------------
 3 files changed, 0 insertions(+), 91 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 39085ef..74fc195 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -164,15 +164,6 @@ static void gtk_default_draw_diamond    (GtkStyle        *style,
 					 gint             y,
 					 gint             width,
 					 gint             height);
-static void gtk_default_draw_string     (GtkStyle        *style,
-					 GdkWindow       *window,
-					 GtkStateType     state_type,
-					 GdkRectangle    *area,
-					 GtkWidget       *widget,
-					 const gchar     *detail,
-					 gint             x,
-					 gint             y,
-					 const gchar     *string);
 static void gtk_default_draw_box        (GtkStyle        *style,
 					 GdkWindow       *window,
 					 GtkStateType     state_type,
@@ -526,7 +517,6 @@ gtk_style_class_init (GtkStyleClass *klass)
   klass->draw_polygon = gtk_default_draw_polygon;
   klass->draw_arrow = gtk_default_draw_arrow;
   klass->draw_diamond = gtk_default_draw_diamond;
-  klass->draw_string = gtk_default_draw_string;
   klass->draw_box = gtk_default_draw_box;
   klass->draw_flat_box = gtk_default_draw_flat_box;
   klass->draw_check = gtk_default_draw_check;
@@ -2749,39 +2739,6 @@ gtk_default_draw_diamond (GtkStyle      *style,
 }
 
 static void
-gtk_default_draw_string (GtkStyle      *style,
-                         GdkWindow     *window,
-                         GtkStateType   state_type,
-                         GdkRectangle  *area,
-                         GtkWidget     *widget,
-                         const gchar   *detail,
-                         gint           x,
-                         gint           y,
-                         const gchar   *string)
-{
-  if (area)
-    {
-      gdk_gc_set_clip_rectangle (style->white_gc, area);
-      gdk_gc_set_clip_rectangle (style->fg_gc[state_type], area);
-    }
-
-  if (state_type == GTK_STATE_INSENSITIVE)
-    gdk_draw_string (window,
-		     gtk_style_get_font_internal (style),
-		     style->white_gc, x + 1, y + 1, string);
-
-  gdk_draw_string (window,
-		   gtk_style_get_font_internal (style),
-		   style->fg_gc[state_type], x, y, string);
-
-  if (area)
-    {
-      gdk_gc_set_clip_rectangle (style->white_gc, NULL);
-      gdk_gc_set_clip_rectangle (style->fg_gc[state_type], NULL);
-    }
-}
-
-static void
 option_menu_get_props (GtkWidget      *widget,
 		       GtkRequisition *indicator_size,
 		       GtkBorder      *indicator_spacing)
diff --git a/gtk/gtkstyle.h b/gtk/gtkstyle.h
index dd88900..93feed6 100644
--- a/gtk/gtkstyle.h
+++ b/gtk/gtkstyle.h
@@ -240,15 +240,6 @@ struct _GtkStyleClass
 				 gint			 y,
 				 gint			 width,
 				 gint			 height);
-  void (*draw_string)		(GtkStyle		*style,
-				 GdkWindow		*window,
-				 GtkStateType		 state_type,
-				 GdkRectangle		*area,
-				 GtkWidget		*widget,
-				 const gchar		*detail,
-				 gint			 x,
-				 gint			 y,
-				 const gchar		*string);
   void (*draw_box)		(GtkStyle		*style,
 				 GdkWindow		*window,
 				 GtkStateType		 state_type,
diff --git a/modules/engines/pixbuf/pixbuf-draw.c b/modules/engines/pixbuf/pixbuf-draw.c
index 38f2761..f9188a2 100644
--- a/modules/engines/pixbuf/pixbuf-draw.c
+++ b/modules/engines/pixbuf/pixbuf-draw.c
@@ -587,44 +587,6 @@ draw_diamond (GtkStyle     *style,
 }
 
 static void
-draw_string (GtkStyle * style,
-	     GdkWindow * window,
-	     GtkStateType state,
-	     GdkRectangle * area,
-	     GtkWidget * widget,
-	     const gchar *detail,
-	     gint x,
-	     gint y,
-	     const gchar * string)
-{
-  g_return_if_fail(style != NULL);
-  g_return_if_fail(window != NULL);
-
-  if (state == GTK_STATE_INSENSITIVE)
-    {
-      if (area)
-	{
-	  gdk_gc_set_clip_rectangle(style->white_gc, area);
-	  gdk_gc_set_clip_rectangle(style->fg_gc[state], area);
-	}
-
-      gdk_draw_string(window, gtk_style_get_font (style), style->fg_gc[state], x, y, string);
-      
-      if (area)
-	{
-	  gdk_gc_set_clip_rectangle(style->white_gc, NULL);
-	  gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL);
-	}
-    }
-  else
-    {
-      gdk_gc_set_clip_rectangle(style->fg_gc[state], area);
-      gdk_draw_string(window, gtk_style_get_font (style), style->fg_gc[state], x, y, string);
-      gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL);
-    }
-}
-
-static void
 draw_box (GtkStyle     *style,
 	  GdkWindow    *window,
  	  GtkStateType  state,
@@ -1094,7 +1056,6 @@ pixbuf_style_class_init (PixbufStyleClass *klass)
   style_class->draw_shadow = draw_shadow;
   style_class->draw_arrow = draw_arrow;
   style_class->draw_diamond = draw_diamond;
-  style_class->draw_string = draw_string;
   style_class->draw_box = draw_box;
   style_class->draw_flat_box = draw_flat_box;
   style_class->draw_check = draw_check;



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