Commit Graph

98 Commits

Author SHA1 Message Date
Christian Dywan
4ea49b1705 Bug 551567 – DND mark broken
* gtk/gtktextbtree.c (redisplay_mark): invalidate mark properly
  Patch by Yevgen Muntyan.

svn path=/trunk/; revision=21342
2008-09-11 00:44:51 +00:00
Sven Neumann
b699ac5853 gtk/gtkaccellabel.c gtk/gtkaction.c gtk/gtkclist.c gtk/gtkcolorbutton.c
2008-08-12  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaccellabel.c
	* gtk/gtkaction.c
	* gtk/gtkclist.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkctree.c
	* gtk/gtkdialog.c
	* gtk/gtkdnd-quartz.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilesel.c
	* gtk/gtkgamma.c
	* gtk/gtkiconview.c
	* gtk/gtkkeyhash.c
	* gtk/gtklabel.c
	* gtk/gtkmenu.c
	* gtk/gtkmenubar.c
	* gtk/gtkpaned.c
	* gtk/gtkrecentchooserdialog.c
	* gtk/gtkrecentchooserutils.c
	* gtk/gtkselection.c
	* gtk/gtksizegroup.c
	* gtk/gtktextbtree.c
	* gtk/gtktextbuffer.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtktreemodel.c
	* gtk/gtkuimanager.c
	* gtk/gtkwindow-decorate.c
	* gtk/gtkwindow.c: use canonical signal names in some more places
	that I missed earlier. Also changed this in the documentation and
	comments.


svn path=/trunk/; revision=21094
2008-08-12 14:37:03 +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
Yevgen Muntyan
abad58b003 new functions _gtk_text_btree_get_insert() and
2007-11-15  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtktextbtree.h:
	* gtk/gtktextbtree.c: new functions _gtk_text_btree_get_insert()
	and _gtk_text_btree_get_selection_bound() (#497102).
	* gtk/gtktextbuffer.c (gtk_text_buffer_get_insert),
	(gtk_text_buffer_get_selection_bound): use them here instead of
	hash table lookup.


svn path=/trunk/; revision=18996
2007-11-15 17:03:09 +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
Owen Taylor
00481dd67c Pay attention to tags that turn invisibility off as well as tags that turn
2007-10-26  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible):
        Pay attention to tags that turn invisibility off as well
        as tags that turn invsibility on. (#488051, Mathias Hasselmann)

svn path=/trunk/; revision=18949
2007-10-26 14:02:06 +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
Matthias Clasen
6ac30db004 Allow to separate GtkTextMark creation from buffer insertion. (#132818,
2007-05-25  Matthias Clasen  <mclasen@redhat.com>

        Allow to separate GtkTextMark creation from buffer insertion.
        (#132818, Gustavo Giráldez, patch by Yevgen Muntyan)

        * gtk/gtktextmarkprivate.h:
        * gtk/gtktextmark.[hc] (gtk_text_mark_new): New function to
        create a GtkTextMark.

        * gtk/gtktextbuffer.[hc] (gtk_text_buffer_add_mark): New
        function to add an existing mark to a buffer.

        * gtk/gtktextbtree.c: Allow adding existing marks.

        * gtk/gtk.symbols: Add new functions.

        * tests/testtextbuffer.c: Add some tests for new mark
        functionality.


svn path=/trunk/; revision=17922
2007-05-26 04:10:42 +00:00
Matthias Clasen
a2c86932f5 Free the lines even if there are no views. (#408018, Albert Huang)
2007-02-15  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextbtree.c (_gtk_text_btree_delete): Free the lines
        even if there are no views.  (#408018, Albert Huang)



svn path=/trunk/; revision=17302
2007-02-15 20:38:21 +00:00
Paolo Borelli
f3a47fc835 avoid memory corruption (#357050).
2006-11-07  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_delete): avoid memory
	corruption (#357050).
2006-11-07 15:41:42 +00:00
Matthias Clasen
075e746432 Move some asserts to the right place. (#341661, #341665, Pascal Terjan)
2006-05-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c:
	* gtk/gtktextview.c: Move some asserts to the right
	place.  (#341661, #341665, Pascal Terjan)
2006-05-14 03:46:14 +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
e68767fb9f Fix the build 2006-02-22 20:05:17 +00:00
Matthias Clasen
6a246a6c96 Minor optimizations. (#332059, Arnaud Charlet)
2006-02-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c:
	* gtk/gtktextiter.c: Minor optimizations.  (#332059, Arnaud Charlet)
2006-02-22 17:52:29 +00:00
Matthias Clasen
74a19d9f39 some more slice allocation 2005-12-27 00:59:53 +00:00
Matthias Clasen
e572ab94b0 Some more slice allocation 2005-12-27 00:54:39 +00:00
Matthias Clasen
bf16be253f Use the slice allocator for some other small auxiliary structures as well.
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c: Use the slice allocator for some other small
	auxiliary structures as well.
2005-12-27 00:49:24 +00:00
Matthias Clasen
443f3aa6ed Forgotten file 2005-12-27 00:41:43 +00:00
Matthias Clasen
104772f87a Speed up stepping backwards. (#320638, Larry Ewing, Paolo Borelli)
2005-12-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_line_char_to_byte_offsets):
	* gtk/gtktextiter.c (gtk_text_iter_backward_chars): Speed up
	stepping backwards.  (#320638, Larry Ewing, Paolo Borelli)
2005-12-12 19:16:00 +00:00
Matthias Clasen
6002bc6582 Replace manual offset calculations by g_utf8_offset_to_pointer().
2005-11-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_line_char_to_byte_offsets):
	* gtk/gtktextiter.c (gtk_text_iter_backward_chars): Replace
	manual offset calculations by g_utf8_offset_to_pointer().
	(#320360, Paolo Borelli)
2005-11-02 05:08:31 +00:00
Matthias Clasen
87129bab87 Only use text segments when determining text direction. (#319065, Tommi
* gtk/gtktextbtree.c (gtk_text_btree_resolve_bidi): Only use text
	segments when determining text direction.  (#319065, Tommi Komulainen)
2005-10-26 20:47:04 +00:00
Matthias Clasen
a07a5ecba7 Try to match an off toggle here with the matching on toggle if it
2005-10-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_delete): Try to match an off
	toggle here with the matching on toggle if it immediately follows.
	This is a common case, and handling it here prevents quadratic blowup
	in cleanup_line() below.  (#317125)

	* gtk/gtktextsegment.h:
	* gtk/gtktextsegment.c (_gtk_char_segment_new_from_two_strings): Pass
	the character counts into this function instead of computing them
	again.
2005-10-11 14:39:17 +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
e09c960885 Small cleanup. (#305539, Paolo Borelli)
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible): Small
	cleanup.  (#305539, Paolo Borelli)
2005-06-09 18:36:58 +00:00
Matthias Clasen
cc913d6110 Queue the redisplay after modifying the tag in the btree, otherwise we end
2005-05-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_tag): Queue the
	redisplay after modifying the tag in the btree, otherwise
	we end up showing the old tags until the next redraw comes
	around.   (#143537, Gary Kramlich)
2005-05-26 19:49:51 +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
738211828b Redisplay the new selection.
2004-10-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_select_range): Redisplay
	the new selection.

	* gtk/gtktextview.c (gtk_text_view_select_all): Use
	gtk_text_buffer_select_range().
2004-10-30 04:24:55 +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
Matthias Clasen
74d62a92ea Don't iterate too far up. (#147965, Olivier Sessink)
Fri Jul 23 11:00:17 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag):
	Don't iterate too far up. (#147965, Olivier Sessink)
2004-07-23 15:01:50 +00:00
Matthias Clasen
0dc58fb24d Don't stop the iteration up to the tag_root too early. (#109945, Dongho
2004-04-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag):
	Don't stop the iteration up to the tag_root too
	early.  (#109945, Dongho Shin)
2004-04-19 16:17:01 +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
Michael Natterer
ebd7d1688a removed underscores from calls to gtk_text_btree_resolve_bidi().
2004-03-01  Michael Natterer  <mitch@gimp.org>

	* gtk/gtktextbtree.c: removed underscores from calls to
	gtk_text_btree_resolve_bidi().
2004-03-01 16:25:45 +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
Matthias Clasen
738eeba8d6 Actually free the lists. Pointed out by Morten Welinder.
Fri Feb  6 23:08:29 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextbtree.c (_gtk_text_btree_check):
	* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_clear_attributes):
	* gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear_attributes):
	Actually free the lists. Pointed out by Morten Welinder.
2004-02-06 22:25:01 +00:00
Matthias Clasen
83c626bbe0 Remove dubious bitfields of unspecified signedness. (#112919, Morten
2003-05-27  Matthias Clasen  <maclas@gmx.de>

	* io-wbmp.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)gdk-p

	* gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances
	of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)

	* gtk/gtkwindow-decorate.c:
	* gtk/gtktreeprivate.h:
	* gtk/gtkdnd.c:
	* gdk/win32/gdkwindow-win32.h:
	* gdk/linux-fb/gdkprivate-fb.h:
	* gdk/linux-fb/gdkkeyboard-fb.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)

	* gtk/queryimmodules.c (escape_string):
	* gtk/gtktextbtree.c (_gtk_text_btree_get_text):
	* gtk/gtksettings.c (_gtk_settings_parse_convert):
	* gtk/gtkrc.c (gtk_rc_parse_assignment):
	* gtk/gtkinputdialog.c (gtk_input_dialog_set_key):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all
	occurances of g_string_new ("") by g_string_new (NULL). (#106975,
	Morten Welinder)
2003-05-27 21:21:00 +00:00
Matthias Clasen
452de5d6a4 Check if line_ancestor_parent is NULL. (#102711, Manuel Clos)
2003-02-20  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag):
	Check if line_ancestor_parent is NULL.  (#102711, Manuel Clos)

	* gtk/gtktextview.c (gtk_text_view_scroll_to_iter):
	(gtk_text_view_update_adjustments): Make sure cursor stays visible
	during horizontal scrolling.  (#75270)
2003-02-20 19:42:05 +00:00
Matthias Clasen
bc70dc94bf Implement a utility function proposed in #102534:
2003-01-06  Matthias Clasen  <maclas@gmx.de>

	Implement a utility function proposed in #102534:

	* gtk/gtktextbtree.h:
	* gtk/gtktextbtree.c (_gtk_text_btree_select_range): New function.
	(_gtk_text_btree_place_cursor): Now a simple wrapper around
	_gtk_text_btree_select_range().

	* gtk/gtktextbuffer.h:
	* gtk/gtktextbuffer.c (gtk_text_buffer_select_range): New function.
	(gtk_text_buffer_place_cursor): Now a simple wrapper around
	gtk_text_buffer_select_range().
2003-01-06 22:34:23 +00:00
Manish Singh
ac77076507 Deprecation cleanup
Thu Oct 10 14:41:05 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
        gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
        gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
        Deprecation cleanup
2002-10-10 21:45:41 +00:00
Owen Taylor
be19be61b7 Use 'signed int' not 'gint' for signed bitfields. (#93020, Vitaly Tishkov)
Mon Sep 23 14:58:04 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkhandlebox.h gtk/gtktextbtree.[ch]:
        Use 'signed int' not 'gint' for signed bitfields.
        (#93020, Vitaly Tishkov)

        * gtk/gtktextlayout.h gtk/gtktextbtree.[ch]:
        Fix some 'gint' bitfields that should have been
        unsigned.
2002-09-23 19:20:48 +00:00
Owen Taylor
bf09470d79 Fix some cases where signal connection IDs where being assigned to guint
Wed Jul 10 14:27:14 2002  Owen Taylor  <otaylor@redhat.com>

        * modules/input/gtkimcontextxim.c gtk/gtkcolorsel.c
        gtk/gtkdialog.c gtk/gtktextbtree.c: Fix some cases
        where signal connection IDs where being assigned to
        guint rather than gulong. (part of #87281, Shivram U)
2002-07-10 18:30:23 +00:00
Matthias Clasen
2c867d1e82 Don't leak child_anchor_table. (#84425)
* gtk/gtktextbtree.c (_gtk_text_btree_unref): Don't leak
	child_anchor_table.  (#84425)

	* gtk/gtktextlayout.c (gtk_text_layout_finalize): Don't leak
	one_display_cache.  (#84424)
2002-06-09 20:43:45 +00:00
Havoc Pennington
271018df40 assign something to "prev" so that removing tag info succeeds. Part of
2002-04-30  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
	something to "prev" so that removing tag info succeeds.
	Part of #77301

	* gtk/gtktextbtree.c (_gtk_text_btree_unref): reorder so that it
	unrefs the tag table first, so that the btree is in a consistent
	state when we're removing tags from it.

	* gtk/gtktexttagtable.c (_gtk_text_tag_table_remove_buffer): strip
	all tags in the tag table out of the buffer. #77301
2002-04-30 15:52:52 +00:00
Havoc Pennington
a760ad804e just go ahead and flush all the first validate stuff if it hasn't been
2002-02-13  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_paint): just go ahead and flush
	all the first validate stuff if it hasn't been done, presumably
	someone called process_updates at a weird time.

	* tests/testtext.c (do_apply_colors): terminate on >= end, not >
	end, avoids infinite loop when end is at the end of the buffer.

	* gtk/gtktextbtree.c (_gtk_text_btree_delete): when creating a
	line data, we were adding it to the wrong line ("line" instead of
	"start_line")
2002-02-13 23:44:03 +00:00
Darin Adler
6ec06edbbf isspace -> g_ascii_isspace Remove gdki8n.h include. Remove <ctype.h>
* demos/gtk-demo/main.c: (load_file): isspace -> g_ascii_isspace
	* gdk/x11/gdkim-x11.c: Remove gdki8n.h include.
	* gdk/x11/gdkkeys-x11.c: Remove <ctype.h> include.
	* gdk/x11/gdkmain-x11.c: Remove <ctype.h> include.
	* gtk/fnmatch.c: Remove <ctype.h> include.
	* gtk/gtkaccelgroup.c: Remove <ctype.h> include.
	* gtk/gtkaccellabel.c: (gtk_accel_label_refetch): toupper ->
	g_unichar_toupper, toupper -> g_unichar_totile
	* gtk/gtkbindings.c: Remove <ctype.h> include.
	* gtk/gtkfontsel.c: Remove <ctype.h> include.
	* gtk/gtkiconfactory.c: Remove <ctype.h> include.
	* gtk/gtkinputdialog.c: Remove <ctype.h> include.
	* gtk/gtklabel.c: Remove <ctype.h> include.
	* gtk/gtkmain.c: Remove <ctype.h> include.
	* gtk/gtkmenu.c: Remove <ctype.h> include.
	* gtk/gtkoldeditable.c: Remove <ctype.h> include.
	* gtk/gtkrc.c: Remove <ctype.h> include.
	* gtk/gtktextbtree.c: Remove <ctype.h> include.
	* gtk/gtktextiter.c: Remove <ctype.h> include.
	* gtk/gtktextsegment.c: Remove <ctype.h> include.
2002-02-08 19:12:34 +00:00
Havoc Pennington
5d82c0a4b6 fix assertion failure by creating the line data, but not validating it at
2002-01-25  Havoc Pennington  <hp@redhat.com>

        * gtk/gtktextbtree.c (_gtk_text_btree_delete): fix assertion
        failure by creating the line data, but not validating it at this
        stage. Also, remove old code related to the "bogus newline" mess
        that removed all tags from the last char in the buffer if you
        tried to delete it.
        (_gtk_text_line_data_new): put this here and prepend underscore,
        remove from gtktextlayout.c
2002-01-29 04:55:48 +00:00
Havoc Pennington
290e4efdfe propagate exposes to no window children not in the buffer window.
2002-01-01  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktextview.c (gtk_text_view_expose_event): propagate
	exposes to no window children not in the buffer window.
	(gtk_text_view_class_init): add move_focus bindings for Ctrl-Tab
	- is this the right way to do it?
	(gtk_text_view_focus): add focus method, just chains up for now,
	I'm not sure why the GtkContainer implementation doesn't work

	* gtk/gtktextbtree.c (_gtk_text_btree_insert_child_anchor): fill
	in the text line for the child anchor segment

	* tests/testtext.c (do_add_focus_children): add another test
	example (to put focusable buttons into the widget)
2002-01-02 03:49:09 +00:00
Havoc Pennington
9b185ed750 fix an incorrect assertion that the "valid" flag is always correct in a
2001-12-31  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
	fix an incorrect assertion that the "valid" flag is always correct
	in a node and add explanatory comment. This keeps me from
	reproducing #59101, but I'm remembering that 59101 was actually
	about incorrect pixel totals, so I'm not sure 59101 is actually
	fixed. May just have stopped happening due to some change in
	how C-k works.
2001-12-31 22:17:26 +00:00
Havoc Pennington
6b1407a3ec remove g_assert_not_reached() that was bogus, since we demand-create the
2001-12-04  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): remove
	g_assert_not_reached() that was bogus, since we demand-create the
	tag info. reported by Chris Phelps

        Jump through assorted hoops to fix bug from Chris Phelps where
	removing tags from the table resulted in btree trying to
	access tag->table

	* gtk/gtktextbuffer.c: set up mechanics of adding/removing
	ourselves to the tag table

	* gtk/gtktexttagtable.c (_gtk_text_tag_table_add_buffer)
	(_gtk_text_tag_table_remove_buffer): private cruft to
	let us notify buffer of disappearing tags

	* gtk/gtktexttag.h: remove BTreeNode typedef from this public
	header, put it in tagprivate

	* gtk/gtktextbtree.c (_gtk_text_btree_new): don't connect to
	tag_removed; it's emitted too late.
	(_gtk_text_btree_notify_will_remove_tag): rename tag_remove_cb to
	this

	Padding for ABI-compat expansion

	* gtk/gtktexttag.h (struct _GtkTextAttributes): pad this
	(struct _GtkTextAppearance): one pad in here too

	* gtk/gtktextlayout.h (struct _GtkTextLayoutClass): padding here

	* gtk/gtktextview.h (struct _GtkTextViewClass): more padding,
	since action signals etc. seem pretty likely

	* gtk/gtktextbuffer.h (struct _GtkTextBufferClass): padding

	* gtk/gtktexttag.h (struct _GtkTextTagClass): padding

	* gtk/gtktexttagtable.h (struct _GtkTextTagTableClass): padding
2001-12-05 01:43:48 +00:00
Havoc Pennington
f2bf563dbd add assertion that #58290 would trigger if it reappeared, I think
2001-10-22  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_insert): add assertion that
	#58290 would trigger if it reappeared, I think
2001-10-22 22:28:27 +00:00
Havoc Pennington
0a522533b0 add temporary code to dump btree contents on assertion failure described
2001-10-22  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (_gtk_text_iter_forward_indexable_segment):
	add temporary code to dump btree contents on assertion failure
	described in #62656

	* gtk/gtktextbtree.c (ensure_end_iter_segment): add some
	assertions that we're getting the right end iter segment

	* gtk/gtktextiter.c (_gtk_text_iter_forward_indexable_segment):
	verify that we aren't on the end iterator after moving
	forward one segment - fixes return value in an obscure case.
	Also, some trivial code cleanup/rearranging.
2001-10-22 22:17:21 +00:00