summaryrefslogtreecommitdiff
path: root/gtk/gtktextbtree.c
Commit message (Collapse)AuthorAgeFilesLines
* textview: Track differences between ink and logical rectsBenjamin Otte2016-03-211-2/+8
| | | | | | | This way, we can ensure that we queue redraws on the full ink rect. This is particularly visible for squiggly underlines in spell checking. https://bugzilla.gnome.org/show_bug.cgi?id=763741
* Drop some unused debug printfsMatthias Clasen2016-02-281-12/+0
| | | | | Remove some debug spew that has been ifdef'ed out for years and does not look useful enough to keep.
* Don't use g_slist_next in gtktextbtree.cMatthias Clasen2015-10-201-6/+6
| | | | We generally access ->next directly.
* Split off a private header for GtkTextBufferMatthias Clasen2015-10-151-0/+1
| | | | This avoids polluting the installed header with private symbols.
* Use stupid quotes instead of dumb quotesMatthias Clasen2015-09-231-12/+12
| | | | | | Following a similar change in GLib a while ago. 'bla' may by stupid, but it looks less dumb than `bla'.
* Clean up debug featuresMatthias Clasen2015-09-091-21/+46
| | | | | Introduce a GTK_DEBUG_CHECK() macro and use it to check for GTK_DEBUG flags everywhere. Also guard all such places by
* text buffer: Fix compiler warningsMatthias Clasen2015-06-021-17/+17
| | | | Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
* textbtree: Remove unneeded checkSebastien Lafargue2014-11-261-1/+1
|
* GtkTextView: use GSliceSébastien Wilmet2014-07-201-8/+8
| | | | | | GSlice is better for allocating structs. https://bugzilla.gnome.org/show_bug.cgi?id=733407
* GtkTextView: use GSlice to allocate GtkTextLineSegment'sSébastien Wilmet2014-04-131-3/+4
| | | | | | | | | | | | | | | | | | | | Use GSlice to allocate all types of segments: - char - toggle - mark - pixbuf - child widget Char segments are a bit more complicated because the length of the text is determined at run time and stored in the 'byte_count' field. If the text is long, GSlice will call the system malloc() anyway, so it's better to always use GSlice for GtkTextLineSegment. Toggle segments are also freed in gtktextbtree.c, hence the function _gtk_toggle_segment_free() (for a later commit it would be nice to rename those functions with the _gtk_text prefix). https://bugzilla.gnome.org/show_bug.cgi?id=727908
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-2/+2
| | | | Instead of Return value:
* docs: use apostrophes in *n'tWilliam Jon McCann2014-02-071-1/+1
|
* docs: use more apostrophesWilliam Jon McCann2014-02-071-20/+20
|
* docs: use proper apostropheWilliam Jon McCann2014-02-071-1/+1
| | | | https://wiki.gnome.org/Design/OS/Typography
* gtktextbtree: use g_sliceIgnacio Casal Quinteiro2011-12-251-4/+4
|
* GtkTextBTreeNode: Improve struct packingMatthias Clasen2011-04-121-4/+4
|
* gtktexttag: Move public members to private headerJavier Jardón2011-01-031-23/+24
| | | | And fix gail to not poke at GtkTextTag internals
* Get rid of the rest of variables exported from libgtkTor Lillqvist2010-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | Especially the gtk_*_type ones in gtktexttypes.h were mentioned in gtk.symbols presumably by accident. That header isn't even installed, so no way can they be supposed to be public. gtk_text_attr_appearance_type is from the installed but "semi-private" gtktextlayout.h, so drop that one too from gtk.symbols for now. The use of gtk_text_unknown_char_utf8 is bit of a mess. Code in a few files knew implicitly that it is three bytes. Define a symbolic name for the length of it instead. Add an exported function gtk_text_unknown_char_utf8_gtk_tests_only() that returns a pointer to it just for the sake of gtk/tests/textbuffer.c. Prefix the variable with an underscore. I doubt the usefulness of the test_utf8() in textbuffer.c. If it could be dropped, gtk_text_unknown_char_utf8_gtk_tests_only() could be dropped, too.
* Replace gtk_debug_flags with getter and setter functionsTor Lillqvist2010-09-081-13/+13
| | | | | | Preferrably should be made just into a local variable for libgtk like _gdk_debug_flags for libgdk. But for now used by gtk/tests/textbuffer.c and modules/printbackends/cups/gtkprintbackendcups.c.
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-4/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Fix compilation warning: Disable unused functionJavier Jardón2009-11-091-0/+4
| | | | Use #if 0 to disable unused gtk_text_btree_node_invalidate_downward()
* Bug 551567 – DND mark brokenChristian Dywan2008-09-111-1/+3
| | | | | | | * gtk/gtktextbtree.c (redisplay_mark): invalidate mark properly Patch by Yevgen Muntyan. svn path=/trunk/; revision=21342
* gtk/gtkaccellabel.c gtk/gtkaction.c gtk/gtkclist.c gtk/gtkcolorbutton.cSven Neumann2008-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 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
* new functions _gtk_text_btree_get_insert() andYevgen Muntyan2007-11-151-0/+12
| | | | | | | | | | | | | | 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
* sort returned tags array by tags priority (#497102).Yevgen Muntyan2007-11-151-0/+6
| | | | | | | | | | | | 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
* Pay attention to tags that turn invisibility off as well as tags that turnOwen Taylor2007-10-261-3/+3
| | | | | | | | | | 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
* Avoid recreating pangolayouts in GtkTextView on cursor movement (#435405,Yevgen Muntyan2007-06-011-29/+47
| | | | | | | | | | | | | | | | | | | | | | | 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
* Allow to separate GtkTextMark creation from buffer insertion. (#132818,Matthias Clasen2007-05-261-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Free the lines even if there are no views. (#408018, Albert Huang)Matthias Clasen2007-02-151-4/+11
| | | | | | | | | | | 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
* avoid memory corruption (#357050).Paolo Borelli2006-11-071-0/+1
| | | | | | | 2006-11-07 Paolo Borelli <pborelli@katamail.com> * gtk/gtktextbtree.c (_gtk_text_btree_delete): avoid memory corruption (#357050).
* Move some asserts to the right place. (#341661, #341665, Pascal Terjan)Matthias Clasen2006-05-141-7/+5
| | | | | | | | 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)
* Fix a warning.Matthias Clasen2006-04-031-1/+1
| | | | | | | | | | | | | | | * 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.
* Fix the buildMatthias Clasen2006-02-221-0/+2
|
* Minor optimizations. (#332059, Arnaud Charlet)Matthias Clasen2006-02-221-9/+3
| | | | | | | 2006-02-22 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextbtree.c: * gtk/gtktextiter.c: Minor optimizations. (#332059, Arnaud Charlet)
* some more slice allocationMatthias Clasen2005-12-271-13/+5
|
* Some more slice allocationMatthias Clasen2005-12-271-14/+10
|
* Use the slice allocator for some other small auxiliary structures as well.Matthias Clasen2005-12-271-2/+2
| | | | | | | 2005-12-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextbtree.c: Use the slice allocator for some other small auxiliary structures as well.
* Forgotten fileMatthias Clasen2005-12-271-2/+2
|
* Speed up stepping backwards. (#320638, Larry Ewing, Paolo Borelli)Matthias Clasen2005-12-121-1/+6
| | | | | | | | 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)
* Replace manual offset calculations by g_utf8_offset_to_pointer().Matthias Clasen2005-11-021-9/+4
| | | | | | | | | 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)
* Only use text segments when determining text direction. (#319065, TommiMatthias Clasen2005-10-261-1/+1
| | | | | * gtk/gtktextbtree.c (gtk_text_btree_resolve_bidi): Only use text segments when determining text direction. (#319065, Tommi Komulainen)
* Try to match an off toggle here with the matching on toggle if itMatthias Clasen2005-10-111-9/+30
| | | | | | | | | | | | | | 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.
* Various cleanups. (#315360, Kjartan Maraas)Matthias Clasen2005-09-131-13/+0
| | | | | | 2005-09-13 Matthias Clasen <mclasen@redhat.com> * gtk/*.c: Various cleanups. (#315360, Kjartan Maraas)
* Small cleanup. (#305539, Paolo Borelli)Matthias Clasen2005-06-091-7/+2
| | | | | | | 2005-06-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible): Small cleanup. (#305539, Paolo Borelli)
* Queue the redisplay after modifying the tag in the btree, otherwise we endMatthias Clasen2005-05-261-0/+2
| | | | | | | | | 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)
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-2/+3
| | | | | | | | | | | | | | | | | | 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.
* Redisplay the new selection.Matthias Clasen2004-10-301-0/+2
| | | | | | | | | | 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().
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't iterate too far up. (#147965, Olivier Sessink)Matthias Clasen2004-07-231-7/+6
| | | | | | | 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)