summaryrefslogtreecommitdiff
path: root/gtk/gtktextbuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* Simplify _gtk_text_buffer_get_line_log_attrs()Sébastien Wilmet2014-08-211-22/+4
| | | | | | | | | | | | | | | | NULL was returned in case of an empty last line. Every users needed to special-case this. Now it will return the expected result: char_len of 0 with one PangoLogAttr. In compute_log_attrs(), 'paragraph' will be the empty string "" with 'char_len' == 0. pango_get_log_attrs() works fine with an empty string, it will return one correct PangoLogAttr (because there is one text position for the empty string). It fixes the unit tests for gtk_text_iter_is_cursor_position(). https://bugzilla.gnome.org/show_bug.cgi?id=156164
* GtkTextView: various code clean-upsSébastien Wilmet2014-08-201-29/+22
| | | | | | | | - only one blank line is enough to separate code sections. - the 'signals' variable was in the middle of function prototypes. - compare pointers to NULL in some conditions ("if(blah) should be used only if blah is a boolean variable). It makes the code clearer. - various other things.
* Replace uses of g_memmove() by memmove()Sébastien Wilmet2014-08-161-3/+3
| | | | | | | g_memmove() is deprecated, it is a simple macro that just calls memmove() with the same parameters. Reviewed by Paolo Borelli on IRC.
* textbuffer: emit notify signal for the "text" propertySébastien Wilmet2014-07-291-2/+2
| | | | | | | | | | | | Although there is the "changed" signal, it is more correct to notify the "text" property too. It can be useful for a small text view, where the text is saved e.g. to gsettings with a binding to the text property. The "text" property includes only the text, not child widgets or images, so the notify signal is sent too many times (also for child widgets and images), but it's not a big problem. https://bugzilla.gnome.org/show_bug.cgi?id=624791
* GtkTextView: use GSliceSébastien Wilmet2014-07-201-10/+16
| | | | | | GSlice is better for allocating structs. https://bugzilla.gnome.org/show_bug.cgi?id=733407
* textbuffer: Do not unset selection if failing to update the primary selectionCarlos Garnacho2014-07-021-7/+6
| | | | | | This is expected to happen on wayland and other platforms with no primary selection, and just leads to the selected text being cleared after any attempt to change the text selection itself through either mouse/keyboard.
* gtk_text_buffer_create_tag(): returns NULL on failureSébastien Wilmet2014-05-121-1/+5
| | | | | | | | Returns NULL in case of a duplicated tag name in the tag table. It is still a programmer error to duplicate a name, but if it happens the behavior is a little nicer (and hopefully doesn't crash). https://bugzilla.gnome.org/show_bug.cgi?id=614717
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-23/+23
| | | | Instead of Return value:
* docs: use apostrophe in *'reWilliam Jon McCann2014-02-071-2/+2
|
* docs: use apostrophe in *'llWilliam Jon McCann2014-02-071-1/+1
|
* docs: use apostrophes in *n'tWilliam Jon McCann2014-02-071-7/+7
|
* docs: use proper apostropheWilliam Jon McCann2014-02-071-9/+9
| | | | https://wiki.gnome.org/Design/OS/Typography
* docs: Use markup for linksWilliam Jon McCann2014-02-071-2/+3
|
* docs: use proper quotesWilliam Jon McCann2014-02-051-22/+22
|
* docs: list items require blank linesWilliam Jon McCann2014-02-011-2/+2
|
* docs: don't use <emphasis>William Jon McCann2014-01-281-6/+6
| | | | It is a little heavy handed. The text can speak for itself.
* Improve doc of gtk_text_buffer_paste_clipboard()Sébastien Wilmet2013-09-161-6/+8
| | | | | | | It didn't explain the behavior when there is a non-empty buffer selection. https://bugzilla.gnome.org/show_bug.cgi?id=339539
* textbuffer: fix selection replacement when pastingSébastien Wilmet2013-09-161-30/+19
| | | | | | | | | | | It is more logical to first delete the selection and then pasting the text. When the selection and the text contain tags, the new behavior is more natural. A segfault in paste_from_buffer() is also avoided. The segfault occurs when the text to paste is deleted because it is the selection. https://bugzilla.gnome.org/show_bug.cgi?id=339539
* Doc: small fixes in GtkTextViewSébastien Wilmet2013-09-141-9/+10
| | | | | | | | | | | | | Move GtkWrapMode from GtkTextTag to the GtkTextView section. The wrap mode property is in the text view. Links to the "mark-set" and "mark-deleted" signals. Add a precision about gtk_text_buffer_get_iter_at_line(). Fix typo in gtk_text_tag_set_priority(). https://bugzilla.gnome.org/show_bug.cgi?id=708076
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-7/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* Fix a couple documentation warningsWilliam Jon McCann2013-06-251-0/+1
|
* Doc: various small fixesSébastien Wilmet2013-05-121-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=700007
* Small API doc fixesSébastien Wilmet2013-03-161-1/+1
| | | | | | For gtk_text_iter_get_char(), due to the "Returns" at the beginning of the description, the description was not visible. So the first sentence has been reworded.
* Add custom va_marshallers in some placesAlexander Larsson2012-03-051-0/+2
| | | | This is a slight performance optimization in the common case.
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* Documentation fixesMatthias Clasen2011-09-251-4/+4
| | | | | Mostly making sure that return values and varargs don't loose their docs.
* GtkTextBuffer: Add accessible apiMatthias Clasen2011-07-051-0/+299
| | | | | | These functions match closely to the AtkText interface; they will be used in the GtkTextView accessible implementation. Keep them private for now.
* Move documentation to inline comments: GtkTextBufferJavier Jardón2011-04-181-0/+12
|
* GtkTextBufferPrivate: Improve struct packingMatthias Clasen2011-04-121-3/+2
|
* Remove gtk_paste_point_override mark if we don't insert any text.Ignacio Casal Quinteiro2011-01-281-3/+13
| | | | This patch fixes bug #590459.
* [GI] Add missing (transfer) annotationsPavel Holejsovsky2011-01-201-2/+2
|
* gtktexttag: Move public members to private headerJavier Jardón2011-01-031-4/+5
| | | | And fix gail to not poke at GtkTextTag internals
* gtk/gtktextbuffer: Use accessor functions to access GtkSelectionDataJavier Jardón2010-12-151-14/+13
|
* Normalize boolean.Ignacio Casal Quinteiro2010-11-011-2/+1
|
* Do not use gbooleans to save some bits.Ignacio Casal Quinteiro2010-11-011-4/+4
|
* Tons of transfer annotationsMatthias Clasen2010-09-211-8/+7
|
* The 'len' argument of gtk_text_buffer_insert and ↵Tomeu Vizoso2010-08-171-2/+2
| | | | gtk_text_buffer_insert_at_cursor isn't really the length of the 'text' argument
* Annotate GtkTextBuffer insert methodsPaolo Borelli2010-08-041-2/+2
|
* gtktextbuffer: Remove GET_PRIVATE macroJavier Jardón2010-07-191-3/+3
| | | | It's only needed one time and should not be used again in the code.
* Move GtkTextBuffer sealed attributes to private struct.Ignacio Casal Quinteiro2010-07-171-68/+99
|
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-4/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Bind get_bounds and use out instead of out caller-allocates.Ignacio Casal Quinteiro2010-07-051-12/+12
| | | | There is no need to use caller-allocates if the scanner already detects it.
* Fix GtkTextBuffer annotations.Ignacio Casal Quinteiro2010-06-261-10/+10
|
* Annotate the methods to get TextBuffer itersPaolo Borelli2010-06-141-10/+10
|
* [gtktextbuffer] Annotate gtk_text_buffer_create_mark()Steve Frécinaux2010-06-081-1/+1
| | | | | | Add (transfer none) to the return value of gtk_text_buffer_create_mark(), as the documentation clearly states the caller doesn't have ownership of the returned value.
* gtk: remove begin-user-action/end-user-action around copyingMichael Natterer2010-03-071-2/+0
| | | | | | | | Copying to the clipboard is not a buffer mutation, so calling gtk_text_buffer_begin_user_action() and _end_user_action() is only confusing apps which connect to these signals in order to build undo stacks or otherwise track buffer changes. Most likely, these apps either didn't notice the bugus undo step or simply work around it.
* [annotations] Add allow-noneJohan Dahlin2010-02-191-3/+3
| | | | | | | | This commit was created using a script that searched for all docstrings containing a parameter and the string 'or %NULL'. Gdk backends and demos excluded as they are not part of a public API https://bugzilla.gnome.org/show_bug.cgi?id=610474
* [introspection] Merge in Gtk-custom.c annotationsColin Walters2009-12-161-7/+7
| | | | | | | | The Gtk-custom.c file in gir-repository contained a number of introspection annotations. Merge those into the GTK source files. Some documentation was moved from the tmpl/ files to accomodate the addition of annotations.
* Remove unneeded call of begin/end user actionPaolo Borelli2009-08-311-5/+1
| | | | delete_interactive already uses them so no need to wrap the call.
* buffer_backspace should delete \r\n in one goPaolo Borelli2009-08-291-2/+3
| | | | | | Special case \r\n in gtk_text_buffer_backspace since \r should not be reinserted even if we are deleting one char at a time. Also add corresponding unit test. Fixes bug #544724.