Commit 5300dc2b authored by Sven Herzberg's avatar Sven Herzberg
Browse files

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
parent 7644ac51
......@@ -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,
......
......@@ -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,
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment