diff options
author | Havoc Pennington <hp@redhat.com> | 2001-04-18 19:56:48 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-04-18 19:56:48 +0000 |
commit | c01a1c7363ec11353f3b87d5a9fdec96b5b15a30 (patch) | |
tree | 5167c4694ef9e6eee3d24ed48bd416af77ef51c1 | |
parent | 6cff7051b16d99178c5320592e96c757597835e4 (diff) | |
download | gtk+-c01a1c7363ec11353f3b87d5a9fdec96b5b15a30.tar.gz |
allow shrinking the image window to test that we clip to allocation.
2001-04-18 Havoc Pennington <hp@redhat.com>
* tests/testgtk.c (create_image): allow shrinking the image window
to test that we clip to allocation.
* gtk/gtkimage.c (gtk_image_expose): clip to allocation,
#9845
* gtk/gtkenums.h: move GtkWrapMode in here, #50472
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 10 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 10 | ||||
-rw-r--r-- | gtk/gtkenums.h | 8 | ||||
-rw-r--r-- | gtk/gtkimage.c | 4 | ||||
-rw-r--r-- | gtk/gtktexttag.h | 7 | ||||
-rw-r--r-- | tests/testgtk.c | 4 |
11 files changed, 84 insertions, 9 deletions
@@ -1,3 +1,13 @@ +2001-04-18 Havoc Pennington <hp@redhat.com> + + * tests/testgtk.c (create_image): allow shrinking the image window + to test that we clip to allocation. + + * gtk/gtkimage.c (gtk_image_expose): clip to allocation, + #9845 + + * gtk/gtkenums.h: move GtkWrapMode in here, #50472 + Wed Apr 18 14:23:14 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (gdk_image_new): Try changing diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 8b6a4c3269..6a0b4c146a 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +2001-04-18 Havoc Pennington <hp@redhat.com> + + * tests/testgtk.c (create_image): allow shrinking the image window + to test that we clip to allocation. + + * gtk/gtkimage.c (gtk_image_expose): clip to allocation, + #9845 + + * gtk/gtkenums.h: move GtkWrapMode in here, #50472 + Wed Apr 18 14:23:14 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (gdk_image_new): Try changing diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8b6a4c3269..6a0b4c146a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2001-04-18 Havoc Pennington <hp@redhat.com> + + * tests/testgtk.c (create_image): allow shrinking the image window + to test that we clip to allocation. + + * gtk/gtkimage.c (gtk_image_expose): clip to allocation, + #9845 + + * gtk/gtkenums.h: move GtkWrapMode in here, #50472 + Wed Apr 18 14:23:14 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (gdk_image_new): Try changing diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 8b6a4c3269..6a0b4c146a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +2001-04-18 Havoc Pennington <hp@redhat.com> + + * tests/testgtk.c (create_image): allow shrinking the image window + to test that we clip to allocation. + + * gtk/gtkimage.c (gtk_image_expose): clip to allocation, + #9845 + + * gtk/gtkenums.h: move GtkWrapMode in here, #50472 + Wed Apr 18 14:23:14 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (gdk_image_new): Try changing diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 8b6a4c3269..6a0b4c146a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +2001-04-18 Havoc Pennington <hp@redhat.com> + + * tests/testgtk.c (create_image): allow shrinking the image window + to test that we clip to allocation. + + * gtk/gtkimage.c (gtk_image_expose): clip to allocation, + #9845 + + * gtk/gtkenums.h: move GtkWrapMode in here, #50472 + Wed Apr 18 14:23:14 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (gdk_image_new): Try changing diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 8b6a4c3269..6a0b4c146a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +2001-04-18 Havoc Pennington <hp@redhat.com> + + * tests/testgtk.c (create_image): allow shrinking the image window + to test that we clip to allocation. + + * gtk/gtkimage.c (gtk_image_expose): clip to allocation, + #9845 + + * gtk/gtkenums.h: move GtkWrapMode in here, #50472 + Wed Apr 18 14:23:14 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (gdk_image_new): Try changing diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8b6a4c3269..6a0b4c146a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2001-04-18 Havoc Pennington <hp@redhat.com> + + * tests/testgtk.c (create_image): allow shrinking the image window + to test that we clip to allocation. + + * gtk/gtkimage.c (gtk_image_expose): clip to allocation, + #9845 + + * gtk/gtkenums.h: move GtkWrapMode in here, #50472 + Wed Apr 18 14:23:14 2001 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (gdk_image_new): Try changing diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index 43e290f286..1758048ffd 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -363,6 +363,14 @@ typedef enum GTK_WINDOW_POPUP } GtkWindowType; +/* Text wrap */ +typedef enum +{ + GTK_WRAP_NONE, + GTK_WRAP_CHAR, + GTK_WRAP_WORD +} GtkWrapMode; + /* How to sort */ typedef enum { diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 03f5fe0b68..81f0debc18 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -790,9 +790,9 @@ gtk_image_expose (GtkWidget *widget, area = event->area; - if (gdk_rectangle_intersect (&image_bound, &area, &intersection)) + if (gdk_rectangle_intersect (&area, &widget->allocation, &area) && + gdk_rectangle_intersect (&image_bound, &area, &image_bound)) { - switch (image->storage_type) { case GTK_IMAGE_PIXMAP: diff --git a/gtk/gtktexttag.h b/gtk/gtktexttag.h index 5d56783597..ea30059b75 100644 --- a/gtk/gtktexttag.h +++ b/gtk/gtktexttag.h @@ -12,13 +12,6 @@ typedef struct _GtkTextIter GtkTextIter; typedef struct _GtkTextBTreeNode GtkTextBTreeNode; typedef struct _GtkTextTagTable GtkTextTagTable; -typedef enum -{ - GTK_WRAP_NONE, - GTK_WRAP_CHAR, - GTK_WRAP_WORD -} GtkWrapMode; - typedef struct _GtkTextAttributes GtkTextAttributes; #define GTK_TYPE_TEXT_TAG (gtk_text_tag_get_type ()) diff --git a/tests/testgtk.c b/tests/testgtk.c index 6e149dc5dc..335024b8d2 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -2758,6 +2758,10 @@ create_image (void) GdkBitmap *mask; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + /* this is bogus for testing drawing when allocation < request, + * don't copy into real code + */ + gtk_window_set_policy (GTK_WINDOW (window), TRUE, TRUE, FALSE); gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), |