summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--ChangeLog.pre-2-020
-rw-r--r--ChangeLog.pre-2-1020
-rw-r--r--ChangeLog.pre-2-220
-rw-r--r--ChangeLog.pre-2-420
-rw-r--r--ChangeLog.pre-2-620
-rw-r--r--ChangeLog.pre-2-820
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/creating.sgml13
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml74
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml97
-rw-r--r--docs/reference/gdk/tmpl/gdk-unused.sgml31
-rw-r--r--docs/reference/gdk/tmpl/regions.sgml33
-rw-r--r--gdk/gdkevents.h2
-rw-r--r--gdk/gdktypes.h11
-rw-r--r--gtk/gtkhpaned.c49
-rw-r--r--gtk/gtknotebook.c18
-rw-r--r--gtk/gtkpaned.c12
-rw-r--r--gtk/gtktextbtree.c39
-rw-r--r--gtk/gtktextiter.c35
-rw-r--r--gtk/gtkvpaned.c51
20 files changed, 450 insertions, 155 deletions
diff --git a/ChangeLog b/ChangeLog
index 23ee0d2a23..2f1f27ca36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2000-12-04 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+ * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+ * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+ * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
+ hack to avoid infinite loops (queue draw instead of draw) -
+ Owen has more appropriate fixes in a branch he'll check in later.
+
+ * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+ separator, CR, and CRLF as line ends
+
+ * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+ into lines using pango_find_paragraph_boundary(); other bits of
+ the widget are still going to be broken if the boundary isn't '\n'
+ though
+
2000-12-04 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 23ee0d2a23..2f1f27ca36 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,23 @@
+2000-12-04 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+ * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+ * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+ * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
+ hack to avoid infinite loops (queue draw instead of draw) -
+ Owen has more appropriate fixes in a branch he'll check in later.
+
+ * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+ separator, CR, and CRLF as line ends
+
+ * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+ into lines using pango_find_paragraph_boundary(); other bits of
+ the widget are still going to be broken if the boundary isn't '\n'
+ though
+
2000-12-04 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 23ee0d2a23..2f1f27ca36 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,23 @@
+2000-12-04 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+ * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+ * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+ * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
+ hack to avoid infinite loops (queue draw instead of draw) -
+ Owen has more appropriate fixes in a branch he'll check in later.
+
+ * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+ separator, CR, and CRLF as line ends
+
+ * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+ into lines using pango_find_paragraph_boundary(); other bits of
+ the widget are still going to be broken if the boundary isn't '\n'
+ though
+
2000-12-04 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 23ee0d2a23..2f1f27ca36 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,23 @@
+2000-12-04 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+ * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+ * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+ * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
+ hack to avoid infinite loops (queue draw instead of draw) -
+ Owen has more appropriate fixes in a branch he'll check in later.
+
+ * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+ separator, CR, and CRLF as line ends
+
+ * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+ into lines using pango_find_paragraph_boundary(); other bits of
+ the widget are still going to be broken if the boundary isn't '\n'
+ though
+
2000-12-04 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 23ee0d2a23..2f1f27ca36 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,23 @@
+2000-12-04 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+ * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+ * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+ * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
+ hack to avoid infinite loops (queue draw instead of draw) -
+ Owen has more appropriate fixes in a branch he'll check in later.
+
+ * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+ separator, CR, and CRLF as line ends
+
+ * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+ into lines using pango_find_paragraph_boundary(); other bits of
+ the widget are still going to be broken if the boundary isn't '\n'
+ though
+
2000-12-04 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 23ee0d2a23..2f1f27ca36 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,23 @@
+2000-12-04 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+ * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+ * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+ * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
+ hack to avoid infinite loops (queue draw instead of draw) -
+ Owen has more appropriate fixes in a branch he'll check in later.
+
+ * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+ separator, CR, and CRLF as line ends
+
+ * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+ into lines using pango_find_paragraph_boundary(); other bits of
+ the widget are still going to be broken if the boundary isn't '\n'
+ though
+
2000-12-04 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 23ee0d2a23..2f1f27ca36 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,23 @@
+2000-12-04 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkpaned.c (gtk_paned_expose): fix this to be sane
+
+ * gtk/gtkvpaned.c (gtk_vpaned_expose): Add an expose handler
+
+ * gtk/gtkhpaned.c (gtk_hpaned_expose): Add an expose handler
+
+ * gtk/gtknotebook.c (gtk_notebook_draw_tab): put in a temporary
+ hack to avoid infinite loops (queue draw instead of draw) -
+ Owen has more appropriate fixes in a branch he'll check in later.
+
+ * gtk/gtktextiter.c (gtk_text_iter_ends_line): handle paragraph
+ separator, CR, and CRLF as line ends
+
+ * gtk/gtktextbtree.c (gtk_text_btree_insert): on insertion, break
+ into lines using pango_find_paragraph_boundary(); other bits of
+ the widget are still going to be broken if the boundary isn't '\n'
+ though
+
2000-12-04 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
diff --git a/docs/reference/gdk-pixbuf/tmpl/creating.sgml b/docs/reference/gdk-pixbuf/tmpl/creating.sgml
index 0bbce5405a..b98b4024fa 100644
--- a/docs/reference/gdk-pixbuf/tmpl/creating.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/creating.sgml
@@ -94,19 +94,6 @@ Creating a pixbuf from image data that is already in memory.
@Returns:
-<!-- ##### FUNCTION gdk_pixbuf_new_subpixbuf ##### -->
-<para>
-
-</para>
-
-@src_pixbuf:
-@src_x:
-@src_y:
-@width:
-@height:
-@Returns:
-
-
<!-- ##### FUNCTION gdk_pixbuf_copy ##### -->
<para>
diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml
index b9cea2ff9f..8d5ba404d1 100644
--- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml
@@ -130,3 +130,77 @@ Application-driven progressive image loading.
@loader:
+<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
+ <para>
+ This signal is emitted when a significant area of the image being
+ loaded has been updated. Normally it means that a complete
+ scanline has been read in, but it could be a different area as
+ well. Applications can use this signal to know when to repaint
+ areas of an image that is being loaded.
+ </para>
+
+@gdkpixbufloader: the object which received the signal.
+@arg1:
+@arg2:
+@arg3:
+@arg4:
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+@x: X offset of upper-left corner of the updated area.
+@y: Y offset of upper-left corner of the updated area.
+@width: Width of updated area.
+@height: Height of updated area.
+
+<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
+ <para>
+ This signal is emitted when the pixbuf loader has been fed the
+ initial amount of data that is required to figure out the size and
+ format of the image that it will create. After this signal is
+ emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to
+ fetch the partially-loaded pixbuf.
+ </para>
+
+@gdkpixbufloader: the object which received the signal.
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+
+<!-- ##### SIGNAL GdkPixbufLoader::frame-done ##### -->
+ <para>
+ This signal is emitted when a frame is done loading. It will be
+ emitted for each frame in an animation data stream.
+ </para>
+
+@gdkpixbufloader: the object which received the signal.
+@arg1:
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+@frame: Frame which just completed loading.
+
+<!-- ##### SIGNAL GdkPixbufLoader::animation-done ##### -->
+ <para>
+ This signal is emitted when an animation is done loading.
+ </para>
+
+@gdkpixbufloader: the object which received the signal.
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+
+<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
+ <para>
+ This signal is emitted when gdk_pixbuf_loader_close() is called.
+ It can be used by different parts of an application to receive
+ notification when an image loader is closed by the code that
+ drives it.
+ </para>
+
+@gdkpixbufloader: the object which received the signal.
+<!-- # Unused Parameters # -->
+@loader: Loader which emitted the signal.
+
+<!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
+
diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
index 152dfaf4ec..e26790a569 100644
--- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml
@@ -1,3 +1,7 @@
+<!-- ##### SECTION ./tmpl/from-drawables.sgml:Title ##### -->
+Drawables to Pixbufs
+
+
<!-- ##### USER_FUNCTION GdkPixbufLastUnref ##### -->
<para>
A function of this type can be used to override the default
@@ -15,10 +19,6 @@
@pixbuf: The pixbuf that is losing its last reference.
@data: User closure data.
-<!-- ##### SECTION ./tmpl/from-drawables.sgml:Title ##### -->
-Drawables to Pixbufs
-
-
<!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### -->
<para>
@@ -65,34 +65,6 @@ End:
</para>
-<!-- ##### SIGNAL GdkPixbufLoader::animation-done ##### -->
- <para>
- This signal is emitted when an animation is done loading.
- </para>
-
-@gdkpixbufloader: the object which received the signal.
-@loader: Loader which emitted the signal.
-
-<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
- <para>
- This signal is emitted when a significant area of the image being
- loaded has been updated. Normally it means that a complete
- scanline has been read in, but it could be a different area as
- well. Applications can use this signal to know when to repaint
- areas of an image that is being loaded.
- </para>
-
-@gdkpixbufloader: the object which received the signal.
-@arg1:
-@arg2:
-@arg3:
-@arg4:
-@loader: Loader which emitted the signal.
-@x: X offset of upper-left corner of the updated area.
-@y: Y offset of upper-left corner of the updated area.
-@width: Width of updated area.
-@height: Height of updated area.
-
<!-- ##### FUNCTION gdk_pixbuf_render_to_drawable ##### -->
<para>
@@ -150,17 +122,6 @@ End:
</para>
-<!-- ##### SIGNAL GdkPixbufLoader::frame-done ##### -->
- <para>
- This signal is emitted when a frame is done loading. It will be
- emitted for each frame in an animation data stream.
- </para>
-
-@gdkpixbufloader: the object which received the signal.
-@arg1:
-@loader: Loader which emitted the signal.
-@frame: Frame which just completed loading.
-
<!-- ##### SECTION ./tmpl/xlib-init.sgml:Short_Description ##### -->
Initializing the &gdk-pixbuf; Xlib library.
@@ -194,24 +155,6 @@ Initializing the &gdk-pixbuf; Xlib library.
</para>
-<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
- <para>
- This signal is emitted when gdk_pixbuf_loader_close() is called.
- It can be used by different parts of an application to receive
- notification when an image loader is closed by the code that
- drives it.
- </para>
-
-@gdkpixbufloader: the object which received the signal.
-@loader: Loader which emitted the signal.
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
-End:
--->
-
<!-- ##### ARG GnomeCanvasPixbuf:y_in_pixels ##### -->
<para>
Works in the same way as the <link
@@ -452,17 +395,17 @@ Rendering a pixbuf to a GDK drawable.
Getting parts of an X drawable's image data into a pixbuf.
-<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
- <para>
- This signal is emitted when the pixbuf loader has been fed the
- initial amount of data that is required to figure out the size and
- format of the image that it will create. After this signal is
- emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to
- fetch the partially-loaded pixbuf.
- </para>
+<!-- ##### FUNCTION gdk_pixbuf_new_subpixbuf ##### -->
+<para>
-@gdkpixbufloader: the object which received the signal.
-@loader: Loader which emitted the signal.
+</para>
+
+@src_pixbuf:
+@src_x:
+@src_y:
+@width:
+@height:
+@Returns:
<!-- ##### SECTION ./tmpl/xlib-rgb.sgml:Title ##### -->
XlibRGB
@@ -484,18 +427,18 @@ XlibRGB
</para>
-<!-- ##### SECTION ./tmpl/from-drawables.sgml:See_Also ##### -->
- <para>
- gdk_image_get().
- </para>
-
-
<!-- ##### SECTION ./tmpl/xlib-from-drawables.sgml:See_Also ##### -->
<para>
</para>
+<!-- ##### SECTION ./tmpl/from-drawables.sgml:See_Also ##### -->
+ <para>
+ gdk_image_get().
+ </para>
+
+
<!-- ##### STRUCT GdkPixbufAnimationClass ##### -->
<para>
diff --git a/docs/reference/gdk/tmpl/gdk-unused.sgml b/docs/reference/gdk/tmpl/gdk-unused.sgml
index f455390216..f3f6612dbb 100644
--- a/docs/reference/gdk/tmpl/gdk-unused.sgml
+++ b/docs/reference/gdk/tmpl/gdk-unused.sgml
@@ -163,6 +163,15 @@ onto the predefined valuator types that GTK+ understands.
@axes: an array of GdkAxisUse. This length of this array
must match the number of axes for the device.
+<!-- ##### STRUCT GdkSpan ##### -->
+<para>
+
+</para>
+
+@x:
+@y:
+@width:
+
<!-- ##### FUNCTION gdk_input_set_source ##### -->
<para>
Sets the source type for a device.
@@ -171,6 +180,20 @@ Sets the source type for a device.
@deviceid: the device to configure
@source: the new source type.
+<!-- ##### FUNCTION gdk_region_spans_intersect_foreach ##### -->
+<para>
+Intersects a set of spans with a region and call a user specified
+function for each resulting spanline. This function is a lot more effective
+if the spans are sorted.
+</para>
+
+@region: The region to intersect against.
+@spans: Array of spans to intersect.
+@n_spans: Number of spans.
+@sorted: True if the spans are sorted in increasing y order.
+@function: The function to call for each intersected spanline.
+@data: Opaque user data passed to function.
+
<!-- ##### SECTION ./tmpl/gdkregion.sgml:Title ##### -->
Points, Rectangles and Regions
@@ -184,6 +207,14 @@ Returns the intersection of two regions.
@source2: a #GdkRegion.
@Returns: the intersection of @source1 and @source2.
+<!-- ##### USER_FUNCTION GdkSpanFunc ##### -->
+<para>
+
+</para>
+
+@span: The intersected part of the span.
+@data: Opaque data passed by user.
+
<!-- ##### FUNCTION gdk_input_set_mode ##### -->
<para>
Enables or disables a device, and determines how the
diff --git a/docs/reference/gdk/tmpl/regions.sgml b/docs/reference/gdk/tmpl/regions.sgml
index 88e3e2d62e..387544c82b 100644
--- a/docs/reference/gdk/tmpl/regions.sgml
+++ b/docs/reference/gdk/tmpl/regions.sgml
@@ -266,36 +266,3 @@ Returns the union of a region and a rectangle.
@source2:
-<!-- ##### STRUCT GdkSpan ##### -->
-<para>
-
-</para>
-
-@x:
-@y:
-@width:
-
-<!-- ##### USER_FUNCTION GdkSpanFunc ##### -->
-<para>
-
-</para>
-
-@span: The intersected part of the span.
-@data: Opaque data passed by user.
-
-
-<!-- ##### FUNCTION gdk_region_spans_intersect_foreach ##### -->
-<para>
-Intersects a set of spans with a region and call a user specified
-function for each resulting spanline. This function is a lot more effective
-if the spans are sorted.
-</para>
-
-@region: The region to intersect against.
-@spans: Array of spans to intersect.
-@n_spans: Number of spans.
-@sorted: True if the spans are sorted in increasing y order.
-@function: The function to call for each intersected spanline.
-@data: Opaque user data passed to function.
-
-
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index d671177346..5813f894d5 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -279,6 +279,8 @@ struct _GdkEventKey
guint keyval;
gint length;
gchar *string;
+ guint16 hardware_keycode;
+ guint8 keyboard_group;
};
struct _GdkEventCrossing
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index cedf86dc62..53e0ca3e91 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -64,6 +64,7 @@ extern "C" {
/* Type definitions for the basic structures.
*/
+typedef struct _GdkKeyInfo GdkKeyInfo;
typedef struct _GdkPoint GdkPoint;
typedef struct _GdkRectangle GdkRectangle;
typedef struct _GdkSegment GdkSegment;
@@ -163,6 +164,16 @@ typedef void (*GdkInputFunction) (gpointer data,
typedef void (*GdkDestroyNotify) (gpointer data);
+/* GdkKeyInfo is a description of a the hardware key and state that
+ * can be mapped to some keysym.
+ */
+struct _GdkKeyInfo
+{
+ guint keycode;
+ gint group;
+ gint level;
+};
+
struct _GdkPoint
{
gint x;
diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c
index 32fa276ce3..d74ac1aa05 100644
--- a/gtk/gtkhpaned.c
+++ b/gtk/gtkhpaned.c
@@ -32,6 +32,8 @@ static void gtk_hpaned_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_hpaned_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
+static gint gtk_hpaned_expose (GtkWidget *widget,
+ GdkEventExpose *event);
static void gtk_hpaned_xor_line (GtkPaned *paned);
static gboolean gtk_hpaned_button_press (GtkWidget *widget,
GdkEventButton *event);
@@ -40,6 +42,8 @@ static gboolean gtk_hpaned_button_release (GtkWidget *widget,
static gboolean gtk_hpaned_motion (GtkWidget *widget,
GdkEventMotion *event);
+static gpointer parent_class;
+
GtkType
gtk_hpaned_get_type (void)
{
@@ -70,10 +74,13 @@ gtk_hpaned_class_init (GtkHPanedClass *class)
{
GtkWidgetClass *widget_class;
+ parent_class = gtk_type_class (GTK_TYPE_PANED);
+
widget_class = (GtkWidgetClass *) class;
widget_class->size_request = gtk_hpaned_size_request;
widget_class->size_allocate = gtk_hpaned_size_allocate;
+ widget_class->expose_event = gtk_hpaned_expose;
widget_class->button_press_event = gtk_hpaned_button_press;
widget_class->button_release_event = gtk_hpaned_button_release;
widget_class->motion_notify_event = gtk_hpaned_motion;
@@ -221,6 +228,48 @@ gtk_hpaned_size_allocate (GtkWidget *widget,
}
}
+static gint
+gtk_hpaned_expose (GtkWidget *widget,
+ GdkEventExpose *event)
+{
+ GtkPaned *paned;
+ guint16 border_width;
+
+ g_return_val_if_fail (widget != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_PANED (widget), FALSE);
+
+ if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
+ {
+ paned = GTK_PANED (widget);
+ border_width = GTK_CONTAINER (paned)->border_width;
+
+ if (event->window == widget->window)
+ {
+ gdk_window_clear_area (widget->window,
+ event->area.x, event->area.y,
+ event->area.width,
+ event->area.height);
+
+ /* Chain up to draw children */
+ GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+ }
+ else if (event->window == paned->handle)
+ {
+ gtk_paint_handle (widget->style,
+ paned->handle,
+ GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE,
+ &event->area,
+ widget,
+ "paned",
+ 0, 0, -1, -1,
+ GTK_ORIENTATION_VERTICAL);
+ }
+ }
+
+ return FALSE;
+}
+
static void
gtk_hpaned_xor_line (GtkPaned *paned)
{
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 87010ec8b2..73f5a35291 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2340,8 +2340,22 @@ gtk_notebook_draw_tab (GtkNotebook *notebook,
page->tab_label->allocation.width + 1,
page->tab_label->allocation.height + 1);
}
- if (gtk_widget_intersect (page->tab_label, area, &child_area))
- gtk_widget_draw (page->tab_label, &child_area);
+ if (gtk_widget_intersect (page->tab_label, area, &child_area) &&
+ GTK_WIDGET_DRAWABLE (page->tab_label))
+ {
+ GdkEventExpose expose_event;
+
+ /* This is a lame hack since all this code needs rewriting anyhow */
+
+ expose_event.window = page->tab_label->window;
+ expose_event.area = child_area;
+ expose_event.send_event = TRUE;
+ expose_event.type = GDK_EXPOSE;
+ expose_event.count = 0;
+
+ gtk_widget_event (page->tab_label,
+ (GdkEvent*)&expose_event);
+ }
}
}
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 87cecc3dd0..483084702b 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -295,6 +295,8 @@ gtk_paned_unrealize (GtkWidget *widget)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
+
+
static gint
gtk_paned_expose (GtkWidget *widget,
GdkEventExpose *event)
@@ -310,16 +312,10 @@ gtk_paned_expose (GtkWidget *widget,
{
paned = GTK_PANED (widget);
- if (event->window == paned->handle)
- {
- child_event = *event;
- event->area.x += paned->handle_xpos;
- event->area.y += paned->handle_ypos;
- gtk_widget_draw (widget, &event->area);
- }
- else
+ if (event->window != paned->handle)
{
child_event = *event;
+
if (paned->child1 &&
GTK_WIDGET_NO_WINDOW (paned->child1) &&
gtk_widget_intersect (paned->child1, &event->area, &child_event.area))
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c
index 287b5d15f3..686d170106 100644
--- a/gtk/gtktextbtree.c
+++ b/gtk/gtktextbtree.c
@@ -924,12 +924,15 @@ gtk_text_btree_insert (GtkTextIter *iter,
* added to this line). */
GtkTextLineSegment *seg;
GtkTextLine *newline;
- int chunkSize; /* # characters in current chunk. */
- guint sol; /* start of line */
- guint eol; /* Pointer to character just after last
- * one in current chunk. */
+ int chunk_len; /* # characters in current chunk. */
+ gint sol; /* start of line */
+ gint eol; /* Pointer to character just after last
+ * one in current chunk.
+ */
+ gint delim; /* index of paragraph delimiter */
int line_count_delta; /* Counts change to total number of
- * lines in file. */
+ * lines in file.
+ */
int char_count_delta; /* change to number of chars */
GtkTextBTree *tree;
@@ -968,17 +971,14 @@ gtk_text_btree_insert (GtkTextIter *iter,
char_count_delta = 0;
while (eol < len)
{
- for (; eol < len; eol++)
- {
- if (text[eol] == '\n')
- {
- eol++;
- break;
- }
- }
- chunkSize = eol - sol;
+ pango_find_paragraph_boundary (text + sol,
+ len - sol,
+ &delim,
+ &eol);
- seg = _gtk_char_segment_new (&text[sol], chunkSize);
+ chunk_len = eol - sol;
+
+ seg = _gtk_char_segment_new (&text[sol], chunk_len);
char_count_delta += seg->char_count;
@@ -993,10 +993,9 @@ gtk_text_btree_insert (GtkTextIter *iter,
cur_seg->next = seg;
}
- if (text[eol-1] != '\n')
- {
- break;
- }
+ if (delim == eol)
+ /* chunk didn't end with a paragraph separator */
+ break;
/*
* The chunk ended with a newline, so create a new GtkTextLine
@@ -6703,7 +6702,7 @@ gtk_text_btree_spew_line_short (GtkTextLine *line, int indent)
s = str;
while (*s)
{
- if (*s == '\n')
+ if (*s == '\n' || *s == '\r')
*s = '\\';
++s;
}
diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c
index d73e0a8589..fae5b5dc63 100644
--- a/gtk/gtktextiter.c
+++ b/gtk/gtktextiter.c
@@ -1326,18 +1326,49 @@ gtk_text_iter_starts_line (const GtkTextIter *iter)
* gtk_text_iter_ends_line:
* @iter: an iterator
*
- * Returns TRUE if @iter points to a newline character.
+ * Returns TRUE if @iter points to the start of the paragraph delimiter
+ * characters for a line (delimiters will be either a newline, a
+ * carriage return, a carriage return followed by a newline, or a
+ * Unicode paragraph separator character). Note that an iterator pointing
+ * to the \n of a \r\n pair will not be counted as the end of a line,
+ * the line ends before the \r.
*
* Return value: whether @iter is at the end of a line
**/
gboolean
gtk_text_iter_ends_line (const GtkTextIter *iter)
{
+ GtkTextRealIter *real;
+ gunichar wc;
+
g_return_val_if_fail (iter != NULL, FALSE);
+ real = gtk_text_iter_make_real (iter);
+
check_invariants (iter);
- return gtk_text_iter_get_char (iter) == '\n';
+ /* Only one character has type G_UNICODE_PARAGRAPH_SEPARATOR in
+ * Unicode 3.0; update this if that changes.
+ */
+#define PARAGRAPH_SEPARATOR 0x2029
+
+ wc = gtk_text_iter_get_char (iter);
+
+ if (wc == '\r' || wc == PARAGRAPH_SEPARATOR)
+ return TRUE;
+ else if (wc == '\n')
+ {
+ /* need to determine if a \r precedes the \n, in which case
+ * we aren't the end of the line
+ */
+ GtkTextIter tmp = *iter;
+ if (!gtk_text_iter_prev_char (&tmp))
+ return FALSE;
+
+ return gtk_text_iter_get_char (&tmp) != '\r';
+ }
+ else
+ return FALSE;
}
/**
diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c
index 69bfed62d9..5347372fa3 100644
--- a/gtk/gtkvpaned.c
+++ b/gtk/gtkvpaned.c
@@ -32,6 +32,8 @@ static void gtk_vpaned_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_vpaned_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
+static gint gtk_vpaned_expose (GtkWidget *widget,
+ GdkEventExpose *expose);
static void gtk_vpaned_xor_line (GtkPaned *paned);
static gboolean gtk_vpaned_button_press (GtkWidget *widget,
GdkEventButton *event);
@@ -40,6 +42,8 @@ static gboolean gtk_vpaned_button_release (GtkWidget *widget,
static gboolean gtk_vpaned_motion (GtkWidget *widget,
GdkEventMotion *event);
+static gpointer parent_class;
+
GtkType
gtk_vpaned_get_type (void)
{
@@ -70,10 +74,13 @@ gtk_vpaned_class_init (GtkVPanedClass *class)
{
GtkWidgetClass *widget_class;
+ parent_class = gtk_type_class (GTK_TYPE_PANED);
+
widget_class = (GtkWidgetClass *) class;
widget_class->size_request = gtk_vpaned_size_request;
widget_class->size_allocate = gtk_vpaned_size_allocate;
+ widget_class->expose_event = gtk_vpaned_expose;
widget_class->button_press_event = gtk_vpaned_button_press;
widget_class->button_release_event = gtk_vpaned_button_release;
widget_class->motion_notify_event = gtk_vpaned_motion;
@@ -221,6 +228,50 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
}
}
+static gint
+gtk_vpaned_expose (GtkWidget *widget,
+ GdkEventExpose *event)
+{
+ GtkPaned *paned;
+ guint16 border_width;
+
+ g_return_val_if_fail (widget != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_PANED (widget), FALSE);
+
+ if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget))
+ {
+ paned = GTK_PANED (widget);
+ border_width = GTK_CONTAINER (paned)->border_width;
+
+ if (event->window == widget->window)
+ {
+ gdk_window_clear_area (widget->window,
+ event->area.x, event->area.y,
+ event->area.width,
+ event->area.height);
+
+
+ /* Chain up to draw children */
+ GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+ }
+ else if (event->window == paned->handle)
+ {
+ gtk_paint_handle (widget->style,
+ paned->handle,
+ GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE,
+ &event->area,
+ widget,
+ "paned",
+ 0, 0, -1, -1,
+ GTK_ORIENTATION_HORIZONTAL);
+
+ }
+ }
+
+ return FALSE;
+}
+
static void
gtk_vpaned_xor_line (GtkPaned *paned)
{