Commit Graph

135 Commits

Author SHA1 Message Date
Itay Perl
850965101f Fix handling of child widgets in the presence of bidi text
GtkTextLayout incorrectly assumed that pango iterates in logical
order. Fixes bug 580814.
2009-05-03 23:26:11 -04:00
Claudio Saavedra
42cb64c2f6 Bug 567468 – no check for trailing != NULL in
2009-01-12  Claudio Saavedra  <csaavedra@igalia.com>

	Bug 567468 – no check for trailing != NULL in
	gtk_text_layout_get_iter_at_position()

	* gtk/gtktextlayout.c: (gtk_text_layout_get_iter_at_position):
	Check for trailing to be non-NULL.
	* gtk/gtktextview.c: (gtk_text_view_get_iter_at_position): document
	that trailing may be NULL.


svn path=/trunk/; revision=22090
2009-01-12 09:57:01 +00:00
Matthias Clasen
0c46603ad4 doc fixes
svn path=/trunk/; revision=21987
2008-12-29 06:08:19 +00:00
Michael Natterer
e18d3c6fd3 consistently chain up using GTK_FOO_CLASS(parent_class)->bar(instance)
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* gtk/*.c: consistently chain up using
	GTK_FOO_CLASS(parent_class)->bar(instance) instead of
	(*GTK_FOO_CLASS(parent_class))->bar(instance).


svn path=/trunk/; revision=21085
2008-08-12 09:06:34 +00:00
Sven Neumann
e3c01cf601 gtk/gtktext.c gtk/gtktextbuffer.c gtk/gtktextlayout.c
2008-08-08  Sven Neumann  <sven@gimp.org>

	* gtk/gtktext.c
	* gtk/gtktextbuffer.c
	* gtk/gtktextlayout.c
	* gtk/gtktexttagtable.c
	* gtk/gtktextview.c
	* gtk/gtktipsquery.c
	* gtk/gtktoolbar.c
	* gtk/gtktoolitem.c
	* gtk/gtktreeitem.c
	* gtk/gtktreemodelfilter.c
	* gtk/gtktreemodelsort.c
	* gtk/gtktreeviewcolumn.c: use canonical signal names.


svn path=/trunk/; revision=21045
2008-08-08 14:23:32 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Michael Natterer
e7355f82c2 gtk/gtkcontainer.c gtk/gtkexpander.c gtk/gtkframe.c gtk/gtklabel.c
2008-02-06  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcontainer.c
	* gtk/gtkexpander.c
	* gtk/gtkframe.c
	* gtk/gtklabel.c
	* gtk/gtkmain.c
	* gtk/gtkmenu.c
	* gtk/gtkmenuitem.c
	* gtk/gtkmenushell.c
	* gtk/gtknotebook.c
	* gtk/gtkseparatortoolitem.c
	* gtk/gtksocket.c
	* gtk/gtktextlayout.c
	* gtk/gtktoggletoolbutton.c
	* gtk/gtktoolbutton.c
	* gtk/gtktoolitem.c
	* gtk/gtktree.c
	* gtk/gtktreeitem.c: replace "foo && GTK_IS_FOO (foo)" by simply
	"GTK_IS_FOO (foo)".


svn path=/trunk/; revision=19481
2008-02-06 09:53:34 +00:00
Paolo Borelli
540569dadb Use gtk_text_buffer_get_insert instead of get_mark. Fixes Bug 497164.
2007-11-17  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtktextbuffer.c:
	* gtk/gtktextlayout.c:
	* gtk/gtktextview.c:
	Use gtk_text_buffer_get_insert instead of get_mark. Fixes Bug 497164.


svn path=/trunk/; revision=18997
2007-11-17 10:18:13 +00:00
Yevgen Muntyan
921da326f5 sort returned tags array by tags priority (#497102).
2007-11-15  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtktextbtree.c (_gtk_text_btree_get_tags): sort returned
	tags array by tags priority (#497102).
	* gtk/gtktextiter.c (gtk_text_iter_get_tags), (gtk_text_iter_get_attributes):
	* gtk/gtktextlayout.c (get_tags_array_at_iter): and do not sort it here.


svn path=/trunk/; revision=18995
2007-11-15 17:00:33 +00:00
Yevgen Muntyan
a3eb6a98d7 do not call _gtk_text_btree_get_iter_at_line() and
2007-11-15  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtktextlayout.c: (gtk_text_layout_get_line_display),
	(get_style): do not call _gtk_text_btree_get_iter_at_line() and
	_gtk_text_btree_get_tags() for every segment, instead call them
	once and then collect the tags while iterating over the segments.
	(get_tags_array_at_iter), (tags_array_toggle_tag): new functions
	for tags array handling.


svn path=/trunk/; revision=18994
2007-11-15 16:24:42 +00:00
Yevgen Muntyan
ef1e05f7de Implement block-cursor for overwrite mode. (#80378)
2007-06-12  Yevgen Muntyan  <muntyan@tamu.edu>

        * gtk/gtkentry.c (gtk_entry_expose), (gtk_entry_toggle_overwrite),
        (gtk_entry_draw_cursor):
        * gtk/gtkstyle.c (_gtk_widget_get_cursor_gc),
        (_gtk_widget_get_cursor_color):
        * gtk/gtkstyle.h:
        * gtk/gtktextdisplay.c (gtk_text_renderer_prepare_run),
        (gtk_text_renderer_draw_shape), (text_renderer_set_state),
        (render_para):
        * gtk/gtktextlayout.c (gtk_text_layout_set_overwrite_mode),
        (gtk_text_layout_invalidate_cache), (get_block_cursor),
        (add_cursor), (gtk_text_layout_get_line_display),
        (_gtk_text_layout_get_block_cursor):
        * gtk/gtktextlayout.h:
        * gtk/gtktextutil.c (layout_get_char_width),
        (_gtk_text_util_get_block_cursor_location):
        * gtk/gtktextutil.h:
        * gtk/gtktextview.c (gtk_text_view_set_editable),
        (gtk_text_view_toggle_overwrite), (gtk_text_view_set_overwrite),
        (gtk_text_view_ensure_layout), (text_window_invalidate_cursors):
        Implement block-cursor for overwrite mode.  (#80378)


svn path=/trunk/; revision=18108
2007-06-12 05:32:57 +00:00
Yevgen Muntyan
8f4aa8c6d7 Avoid recreating pangolayouts in GtkTextView on cursor movement (#435405,
2007-06-01  Yevgen Muntyan  <muntyan@tamu.edu>

	Avoid recreating pangolayouts in GtkTextView on cursor movement
	(#435405, Behdad Esfahbod).

	* gtk/gtktextlayout.c:
	* gtk/gtktextlayout.h: new GtkTextLayout method invalidate_cursors(),
	and functions gtk_text_layout_invalidate_cursors() and
	gtk_text_layout_cursors_changed(), to use when invalidation is due
	to moved marks or changed selection.

	* gtk/gtktextbtree.c:
	* gtk/gtktextbtree.h: use what's appropriate when invalidating layout.

	* gtk/gtk.symbols: add new functions.

	* README.in: added a note about changed GtkTextLayout API.


svn path=/trunk/; revision=18000
2007-06-01 06:25:43 +00:00
Behdad Esfahbod
d77c56a140 Make GTK_JUSTIFY_FILL work, using pango_layout_set_justify() that works
2007-05-03  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtklabel.c (gtk_label_ensure_layout):
        * gtk/gtktextlayout.c (set_para_values): Make GTK_JUSTIFY_FILL work,
        using pango_layout_set_justify() that works now. (#435675)


svn path=/trunk/; revision=17790
2007-05-04 00:24:46 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Matthias Clasen
d7cc776d01 Ignore invisible text when going to end of the previous line. (#382565)
2007-02-18  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextlayout.c (gtk_text_layout_move_iter_visually):
        Ignore invisible text when going to end of the previous line.
        (#382565)


svn path=/trunk/; revision=17328
2007-02-18 16:24:13 +00:00
Behdad Esfahbod
d698e3eaf2 Bug 340141 – Update to Pango 1.16 API
2006-12-24  Behdad Esfahbod  <behdad@gnome.org>

        Bug 340141 – Update to Pango 1.16 API

        * gdk/gdkpango.c (layout_iter_get_line_clip_region),
        (gdk_pango_layout_line_get_clip_region):
        * gtk/gtkcalendar.c (gtk_calendar_size_request):
        * gtk/gtkentry.c (gtk_entry_get_pixel_ranges),
        (get_layout_position), (gtk_entry_find_position),
        (gtk_entry_adjust_scroll):
        * gtk/gtkiconview.c (get_pango_text_offsets):
        * gtk/gtklabel.c (get_cursor_direction):
        * gtk/gtkstyle.c (get_insensitive_layout):
        * gtk/gtktextdisplay.c (render_para):
        * gtk/gtktextlayout.c (allocate_child_widgets),
        (find_display_line_below), (find_display_line_above),
        (gtk_text_layout_move_iter_to_previous_line),
        (gtk_text_layout_move_iter_to_next_line),
        (gtk_text_layout_move_iter_to_line_end),
        (gtk_text_layout_iter_starts_line),
        (gtk_text_layout_move_iter_to_x):
        * gtk/gtktextutil.c (limit_layout_lines):
        Use the _readonly version of pango_layout_iter_get_line(),
        pango_layout_iter_get_run(), pango_layout_get_line(), and
        pango_layout_get_lines().

        * gtk/gtkmain.c (gtk_get_default_language): Use
        pango_get_default_language().
2006-12-24 05:29:25 +00:00
Matthias Clasen
4e7097ff08 Fix messed up refcounting. (#348090, Chris Wilson)
2006-07-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_set_contexts): Fix
	messed up refcounting.  (#348090, Chris Wilson)
2006-07-20 18:42:17 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Matthias Clasen
374c855496 Handle _gtk_text_line_get_data() returning NULL in all cases. (Coverity)
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
	Handle _gtk_text_line_get_data() returning NULL in all
	cases.  (Coverity)
2006-04-12 16:28:54 +00:00
Matthias Clasen
8de7c8b761 Fix a warning.
* gtk/gtktextlayout.c: Fix a warning.

	* gtk/gtktextsegment.h:
	* gtk/gtktextsegment.c:
	* gtk/gtktextchild.c:
	* gtk/gtktextbtree.c:
	* gtk/gtktextmark.c:
	* gtk/gtktexttypes.h: Make the segment class pointers const.

	* gtk/gtktextbufferserialize.c: Make parser struct const.

	* gtk/gtkuimanager.c: Make parser struct const.
2006-04-03 15:50:30 +00:00
Matthias Clasen
bd90bfbc96 Don't leak preedit_string and preedit_attrs. (#322332, Paolo Borelli)
2006-01-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_finalize): Don't
	leak preedit_string and preedit_attrs.  (#322332, Paolo
	Borelli)
2006-01-09 18:20:23 +00:00
Matthias Clasen
04eceaf621 Use the slice allocator for many small allocations.
2006-01-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccelmap.c:
	* gtk/gtkactiongroup.c:
	* gtk/gtkdialog.c:
	* gtk/gtkfilesystemunix.c:
	* gtk/gtkgc.c:
	* gtk/gtkkeyhash.c:
	* gtk/gtkplug.c:
	* gtk/gtktextiter.c:
	* gtk/gtktextlayout.c:
	* gtk/gtkuimanager.c:
	* gtk/gtkwidget.c:
	* gtk/gtkwindow.c:
	* gtk/gtkxembed.c: Use the slice allocator for many small
	allocations.

	* gtk/gtkcolorsel.c:
	* gtk/gtktreeview.c: Use IPN.

	* gtk/gtkwidget.c: Remove an unused field from the AccelPath
	struct.
2006-01-04 07:06:12 +00:00
Matthias Clasen
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00
Matthias Clasen
86e4f7d1f3 Fix positioning at the end of the line for lines ending in invisible
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_line_end):
	Fix positioning at the end of the line for lines ending
	in invisible characters.
	(gtk_text_layout_get_line_display): Set display->layout
	to a PangoLayout, even for totally invisible lines.
2005-06-28 02:46:11 +00:00
Matthias Clasen
4b14b2d4bd Make invisible text work a bit better (#66194, patch by Jeroen
2005-06-13  Matthias Clasen  <mclasen@redhat.com>

	Make invisible text work a bit better (#66194, patch by
	Jeroen Zwartepoorte)

	* gtk/gtk.symbols:
	* gtk/gtktextiter.[hc]: Add function to move by
	visible lines.

	* gtk/gtktextview.c (gtk_text_view_move_cursor_internal):
	Skip invisible text when moving by paragraphs.

	* gtk/gtktextlayout.c (gtk_text_layout_move_iter_visually):
	Skip invisible lines here too.
2005-06-13 05:15:10 +00:00
Matthias Clasen
43f263a031 Allow setting paragraph background. (#81045, Gustavo Carneiro, patch by
2005-06-10  Matthias Clasen  <mclasen@redhat.com>

	Allow setting paragraph background.  (#81045, Gustavo
	Carneiro, patch by Jeroen Zwartepoorte)

	* gtk/gtktextlayout.c (set_para_values): Propagate
	pg_bg_color to the display struct.
	(gtk_text_layout_free_line_display): Free it here.

	* gtk/gtktextdisplay.c (render_para): If pg_bg_color
	is set, draw a rectangle in that color behind
	the paragraph.

	* gtk/gtktexttag.c (gtk_text_tag_class_init): Add
	paragraph-background, paragraph-background-gdk and
	paragraph-background-set properties.
	(set_pg_bg_color): A setter for paragraph-background.

	* gtk/gtktextlayout.h (struct _GtkTextLineDisplay): Add
	pg_bg_color.

	* gtk/gtktexttag.h (struct _GtkTextAttributes): Add
	pg_bg_color.
	(struct _GtkTextTag): Add pg_bg_color_set.
2005-06-10 20:05:08 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gtk/grk.symbols: Group symbols by header and source file.
	* gtk/makegtkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegtkalias.pl -def
	* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
	this file.
	* gtk/*.c: Include gtkalias.h after the other headers,
	include gtkaliasdef.c at the bottom.
	* gtk/*.h: Small cleanups.
2005-03-20 07:01:23 +00:00
Matthias Clasen
057ab5a4df Fix #111031, reported by Padraig O'Briain:
2004-12-08  Matthias Clasen  <mclasen@redhat.com>

	Fix #111031, reported by Padraig O'Briain:

	* gtk/gtktextlayout.h:
	* gtk/gtktextlayout.c (gtk_text_layout_get_iter_at_position):
	Add a variant of gtk_text_layout_get_iter_at_pixel() which
	returns the character at the position, not the closest
	cursor position.

	* gtk/gtktextview.h:
	* gtk/gtktextview.c (gtk_text_view_get_iter_at_position):
	Add a variant of gtk_text_view_get_iter_at_location() which
	returns the character at the position, not the closest
	cursor position.
2004-12-08 21:25:08 +00:00
Matthias Clasen
22ff56c753 Return a boolean indicating whether we could do the requested move.
2004-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_move_iter_by_lines): Return
	a boolean indicating whether we could do the requested move.
	(gtk_text_view_move_cursor_internal): For GTK_MOVEMENT_DISPLAY_LINES,
	move to the beginning/end of the line if we're on the first/last
	line.  (#155891, Paolo Borelli)
2004-11-28 06:06:57 +00:00
Owen Taylor
3d737ee8ba Add GdkPangoRenderer, a subclass of PangoRenderer targeting GDK drawables.
Sat Nov 20 15:13:51 2004  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of
	PangoRenderer targeting GDK drawables. Use to implement the old
	gdk_draw_layout() and friends.

	* gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkwindow.c gdk/gdkpixmap.c:
	Add gdk_draw_glyphs_transformed() gdk_draw_trapezoids() and
	the corresponding members of GdkDrawableClass. Add a fallback
	implementation of gdk_draw_trapezoids() in terms of pixbufs.

	* gdk/gdkwindowing.h gdk/x11/gdkg-x11.h: Add
	_gdk_windowing_gc_get_foreground() to enable the fallback
	trapezoid implementation.

	* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkdisplay-x11.h: Implement
	draw_glyph_transformed,	draw_trapezoids.

	* gdk/x11/gdkdrawable-x11.[ch]: Add
	_gdk_x11_drawable_draw_xtrapezoids, _gdk_x11_drawable_draw_xft_glyphs
	for use of GdkX11Renderer.

	* gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Implement
	GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED in the RENDER codepath.

	* gdk/gdkpango-x11.c: Add GdkX11Renderer... a subclass of
	PangoXftRenderer that does tiles/stipples and fallback rendering
	of trapezoids without the RENDER extension.

	* gdk/gdkpango-x11.c gdk/x11/gdkscreen-x11.[ch] _gdk_x11_renderer_get:
	Add _gdk_x11_renderer_get() to get a singleton GdkX11Renderer
	for the screen.

	* gdk/x11/gdkdrawable-x11.c (get_impl_drawable): Fix a None/NULL
	confusion.

	* gtk/gtklabel.[ch] gtk/gtk.symbols: Add gtk_label_set/get_angle(),
	and an ::angle property.

	* gtk/gtklabel.c: Remove #if 0'd dead code gtk_label_paint_word().

	* gtk/gtktextdisplay.c: Switch to using a GtkTextRenderer subclass
	of GdkPangoRenderer for drawing.

	* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Switch to using
	gtk_attr_shape_new_with_data() to store backreferences to
	embedded pixmaps and widgets. Leave line_display->shaped_objects
	around for backwords compatibility.

	* gdk/gdkpango.[ch] (gdk_pango_context_set_colormap): Describe
	as deprecated, remove implementation.

	* gtk/gtkwidget.c (gtk_widget_create_pango_context): Remove
	call to gdk_pango_context_set_colormap.

	* demos/gtk-demo/Makefile.am demos/gtk-demo/rotated_text.c: Add
	a demo showing drawing rotated text.

	* tests/testgtk.c: Add a rotated-label test, and also a rotated
	drawing test (differs from demos/gtk-demo/rotated_text by also
	using a tile)
2004-11-21 16:24:01 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gtk/Makefile.am: Add rules to generate gtk.def and
	from gtk.symbols, and make make check check the abi
	with abicheck.sh.
	(gtk_private_h_sources): Add gtkinternals.h
	(gtk_built_private_headers): Add gtkalias.h
	(gtk_extra_sources): Add gtk.symbols
	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh

	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gtk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgtk-x11.2.0.so against the symbols
	found in gtk.symbols.

	* gtk/makegtkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gtk/gtkinternals.h: New file. An uninstalled header listing
	symbols which must be exported for some reason and do not appear
	in any other header.

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00
Owen Taylor
83eb184c2c When not wrapping, do the offset of the line for justification ourselves.
Sat Mar 13 18:13:13 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): When not
        wrapping, do the offset of the line for justification ourselves.
        (#120256, Felipe Heidrich)
2004-03-13 23:28:14 +00:00
Dov Grobgeld
a1707142b8 Added call to gtk_text_layout_update_cursor_line() to solve in problem of
2004-03-11  Dov Grobgeld  <dov@imagic.weizmann.ac.il>

        * gtk/gtktextlayer.c: (gtk_text_layout_set_buffer): Added
        call to gtk_text_layout_update_cursor_line() to solve in
        problem of switching keyboard direction at widget creation:
        bug #136680
2004-03-11 15:42:49 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Owen Taylor
8130a8a227 Patch from Dov Grobgeld to implement auto-bidi-direction for GtkTextView
Mon Mar  1 10:41:27 2004  Owen Taylor  <otaylor@redhat.com>

        Patch from Dov Grobgeld to implement auto-bidi-direction
        for GtkTextView (#118543)

        * gtk/gtktextbtree.[ch]: Resolve bidi base direction
        for each line by propagating backwards/forwards as
        necessary.

        * gtk/gtktextlayout.[ch] gtk/gtktextview.c: Set the
        bidi base direction for the ;ine with the cursor from
        the keyboard direction. Add gtk_text_layout_set_keyboard_direction().

Mon Mar  1 10:31:11 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.[ch]: Implement auto-bidi-direction,
        based on a patch from Dov Grobgeld. (#118540)
2004-03-01 16:07:45 +00:00
Owen Taylor
a5f9b185ab gtk/gtktextlayout.c (line_display_iter_to_index) Only adjust the preedit
Thu Jan 29 18:08:06 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.c (line_display_iter_to_index)
        * gtk/gtktextlayout.c (line_display_index_to_iter): Only
        adjust the preedit position for lines that include the
        preedit string. (#132353, Yao Zhang). How the heck
        did this work as well as it did?!?!

        * modules/input/gtkimcontextxim.c (gtk_im_context_xim_get_ic):
        Reverse change to change of XNFilterEvents event mask from
        #110493 -- it's documented and in the Xlib code an
        unsigned long.

        * modules/input/gtkimcontextxim.c (preedit_start_callback):
        Return -1 rather than void to indicate no length limit.
        (#129548)
2004-01-29 23:33:07 +00:00
Owen Taylor
2be259b24a Since we add one to the layout's reported width to account for the cursor,
Mon Aug 25 19:55:55 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.c (gtk_text_view_update_layout_width):
        Since we add one to the layout's reported width to
        account for the cursor, we need to subtract one when
        setting the wrap width for the layout. (Fixes infinite
        loop (#120325, Federico Crozat)

        * gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
        Be a bit more careful about rounding when converting
        wrapped width from Pango units to pixels.
2003-08-26 00:06:18 +00:00
Owen Taylor
9cb6de1fa5 If at the end of the buffer, move to the end iter - parallels behavior of
Thu Jun  5 15:33:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_next_line):
        If at the end of the buffer, move to the end iter -
        parallels behavior of move_iter_to_previous_line.
        (#81960, Padraig O'Briain)
2003-06-05 23:08:48 +00:00
Owen Taylor
6bbdea92f7 #80023, Yao Zhang, TOKUNAGA Hiroyuki
Thu Jun  5 16:12:54 2003  Owen Taylor  <otaylor@redhat.com>

        #80023, Yao Zhang, TOKUNAGA Hiroyuki

        * gtk/gtktextlayout.c (gtk_text_layout_get_cursor_locations):
        Account for the preedit cursor offset if the iter passed
        in is at the same place as the insertion cursor.

        * gtk/gtktextview.c (gtk_text_view_get_cursor_location):
        Encapsulate getting the insertion cursor location.

        * gtk/gtktextview.c (gtk_text_view_update_im_spot_location):
        Pass the real y/height to the IM context. Take
        text_view->x/yoffset into account.
2003-06-05 23:04:49 +00:00
Owen Taylor
de425c5d0f #107883, Gustavo Giráldez
Thu Jun  5 17:20:40 2003  Owen Taylor  <otaylor@redhat.com>

         #107883, Gustavo Giráldez

        * gtk/gtktextlayout.c (gtk_text_layout_emit_changed):
        Split out the case where we know we changed, and
        already dealt with our cached line being invalidated
        from external calls to gtk_text_layout_changed.

        * gtk/gtktextlayout.c (gtk_text_layout_changed):
        Check if the invalidate yrange intersects our
        cached line, and clear it if necessary.
2003-06-05 22:28:48 +00:00
Matthias Clasen
0230821081 Add GTK_WRAP_WORD_CHAR. (#110086, David Brigada)
* gtk/gtktextlayout.c (set_para_values):
	* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR.  (#110086,
	David Brigada)
2003-04-07 18:19:46 +00:00
Owen Taylor
e435fc1fd1 Fix off-by-one error on the backward iteration loop, that was causing the
Wed Jan 15 17:02:18 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
        Fix off-by-one error on the backward iteration loop,
        that was causing the wrong range to be redrawn.
        (at least part of #72734)
2003-01-21 22:48:33 +00:00
Matthias Clasen
ba647198d0 More fixes for invisible text. 2003-01-16 00:25:56 +00:00
Matthias Clasen
decacd40a6 Don't add attributes with empty ranges. (fixes #101564 and #80637)
2002-12-22  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextlayout.c (add_preedit_attrs): Don't add attributes
	with empty ranges.  (fixes #101564 and #80637)
2002-12-22 22:13:31 +00:00
Soeren Sandmann
b1165617b7 docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml
Fri Nov  8 20:14:52 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gdk/tmpl/dnd.sgml
	docs/reference/gdk/tmpl/drawing.sgml
	docs/reference/gdk/tmpl/gdk-unused.sgml
	docs/reference/gdk/tmpl/gdkdisplay.sgml
	docs/reference/gdk/tmpl/general.sgml
	docs/reference/gdk/tmpl/input_devices.sgml
	docs/reference/gdk/tmpl/selections.sgml
	docs/reference/gtk/tmpl/gtkcellrenderer.sgml
	docs/reference/gtk/tmpl/gtkcurve.sgml
	docs/reference/gtk/tmpl/gtkdnd.sgml
	docs/reference/gtk/tmpl/gtkitemfactory.sgml
	docs/reference/gtk/tmpl/gtkmenu.sgml
	docs/reference/gtk/tmpl/gtkoldeditable.sgml
	docs/reference/gtk/tmpl/gtkoptionmenu.sgml
	docs/reference/gtk/tmpl/gtkpreview.sgml
	docs/reference/gtk/tmpl/gtkselection.sgml
	docs/reference/gtk/tmpl/gtksocket.sgml
	docs/reference/gtk/tmpl/gtkstyle.sgml
	docs/reference/gtk/tmpl/gtktextbuffer.sgml
	docs/reference/gtk/tmpl/gtktreemodel.sgml
	docs/reference/gtk/tmpl/gtkwidget.sgml gdk/gdk.h gdk/gdkdisplay.c
	gdk/gdkdisplay.h gdk/gdkdnd.h gdk/gdkdraw.c gdk/gdkdrawable.h
	gdk/gdkinput.h gdk/gdkselection.h gdk/x11/gdkdisplay-x11.c
	gdk/x11/gdkdnd-x11.c gdk/x11/gdkselection-x11.c gtk/gtkcurve.h
	gtk/gtkdnd.h gtk/gtkitemfactory.c gtk/gtkitemfactory.h
	gtk/gtkmenu.h gtk/gtkoldeditable.c gtk/gtkoldeditable.h
	gtk/gtkoptionmenu.h gtk/gtkplug.c gtk/gtkplug.h gtk/gtkpreview.h
	gtk/gtkrange.h gtk/gtkselection.c gtk/gtkselection.h
	gtk/gtksocket.c gtk/gtksocket.h gtk/gtkstyle.c gtk/gtkstyle.h
	gtk/gtktextlayout.c gtk/gtktextlayout.h gtk/gtktreemodel.c
	gtk/gtktreemodel.h gtk/gtkwidget.h

	Trivial s/foo/foo_/ fixes to make gtk.h includable with -Wshadow
	without warnings. (#91680)
2002-11-08 19:41:50 +00:00