gtkimage.c: Fixes to expose handler from Rob Browning

testselection.c gtktext.c gtktext.h: Spelling fix: foreward => forward
  from Tom Tromey
                                        -owt
This commit is contained in:
Owen Taylor 1997-12-08 23:55:54 +00:00
parent d6b0c35739
commit 2e943b280e
5 changed files with 29 additions and 26 deletions

View File

@ -127,17 +127,17 @@ static gint
gtk_image_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkImage *image;
GtkMisc *misc;
GdkRectangle area;
gint x, y;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_IMAGE (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
{
GtkImage *image;
GtkMisc *misc;
GdkRectangle area, image_bound, intersection;
gint x, y;
image = GTK_IMAGE (widget);
misc = GTK_MISC (widget);
@ -156,20 +156,23 @@ gtk_image_expose (GtkWidget *widget,
gdk_gc_set_clip_origin (widget->style->black_gc, x, y);
}
image_bound.x = x;
image_bound.y = y;
image_bound.width = image->image->width;
image_bound.height = image->image->height;
area = event->area;
if ((area.x < 0) || (area.y < 0))
{
area.x = area.y = 0;
area.width = image->image->width;
area.height = image->image->height;
}
gdk_draw_image (widget->window,
widget->style->black_gc,
image->image,
area.x, area.y, x+area.x, y+area.y,
area.width, area.height);
if(gdk_rectangle_intersect(&image_bound, &area, &intersection))
{
gdk_draw_image (widget->window,
widget->style->black_gc,
image->image,
image_bound.x - x, image_bound.y - y,
image_bound.x, image_bound.y,
image_bound.width, image_bound.height);
}
if (image->mask)
{
gdk_gc_set_clip_mask (widget->style->black_gc, NULL);

View File

@ -578,11 +578,11 @@ gtk_text_backward_delete (GtkText *text,
gtk_text_set_point (text, text->point.index - nchars);
return gtk_text_foreward_delete (text, nchars);
return gtk_text_forward_delete (text, nchars);
}
gint
gtk_text_foreward_delete (GtkText *text,
gtk_text_forward_delete (GtkText *text,
guint nchars)
{
g_return_val_if_fail (text != NULL, 0);
@ -1080,7 +1080,7 @@ gtk_text_key_press (GtkWidget *widget,
if (!text->has_cursor || LAST_INDEX (text, text->cursor_mark))
break;
gtk_text_foreward_delete (text, 1);
gtk_text_forward_delete (text, 1);
break;
case GDK_Tab:
if (!text->has_cursor)

View File

@ -192,7 +192,7 @@ void gtk_text_insert (GtkText *text,
gint length);
gint gtk_text_backward_delete (GtkText *text,
guint nchars);
gint gtk_text_foreward_delete (GtkText *text,
gint gtk_text_forward_delete (GtkText *text,
guint nchars);

View File

@ -282,8 +282,8 @@ selection_received (GtkWidget *widget, GtkSelectionData *data)
gtk_text_freeze (GTK_TEXT (selection_text));
gtk_text_set_point (GTK_TEXT (selection_text), 0);
gtk_text_foreward_delete (GTK_TEXT (selection_text),
gtk_text_get_length (GTK_TEXT (selection_text)));
gtk_text_forward_delete (GTK_TEXT (selection_text),
gtk_text_get_length (GTK_TEXT (selection_text)));
position = 0;
while (position < data->length)

View File

@ -282,8 +282,8 @@ selection_received (GtkWidget *widget, GtkSelectionData *data)
gtk_text_freeze (GTK_TEXT (selection_text));
gtk_text_set_point (GTK_TEXT (selection_text), 0);
gtk_text_foreward_delete (GTK_TEXT (selection_text),
gtk_text_get_length (GTK_TEXT (selection_text)));
gtk_text_forward_delete (GTK_TEXT (selection_text),
gtk_text_get_length (GTK_TEXT (selection_text)));
position = 0;
while (position < data->length)