]> Pileus Git - ~andy/gtk/commitdiff
drop the draw_string() function from GtkStyle
authorSven Herzberg <herzi@gnome-de.org>
Thu, 3 Jun 2010 12:00:34 +0000 (14:00 +0200)
committerSven Herzberg <herzi@gnome-de.org>
Mon, 7 Jun 2010 11:56:10 +0000 (13:56 +0200)
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
gtk/gtkstyle.h
modules/engines/pixbuf/pixbuf-draw.c

index 39085efac805b53b0b1b0067eb90d19496bf44d4..74fc195738c490e92ed1d23a328c383a1808af1a 100644 (file)
@@ -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;
@@ -2748,39 +2738,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,
index dd8890002e83dde932c6ae9e330c8929b955db49..93feed62434e0f23b6bd63b271b659d9f540745f 100644 (file)
@@ -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,
index 38f2761232fd12f8d493eed6419efee4fd100874..f9188a2b8604b67f1530005d1b3a16c5e44defca 100644 (file)
@@ -586,44 +586,6 @@ draw_diamond (GtkStyle     *style,
                                x, y, width, height);
 }
 
-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,
@@ -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;