summaryrefslogtreecommitdiff
path: root/gtk/gtktextbuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* Use NULL for generic marshallers in g_signal_new()Benjamin Otte2016-08-291-6/+6
| | | | | glib will use the correct marshaller automatically. And as a side effect, we also get all glib optimizations, like a va marshaller.
* text buffer: Add va marshallers for signalsMatthias Clasen2016-04-191-1/+19
|
* Typo fixesMatthias Clasen2016-03-101-1/+1
| | | | Fix s/occurence/occurrence in many places.
* introspection: This patch fixes nullable return values fixes for the ↵Alberto Ruiz2016-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | following symbols in gtk gtk_accel_group_query gtk_accel_group_from_accel_closure gtk_accel_label_get_accel_widget gtk_accessible_get_widget gtk_actionable_get_action_name gtk_app_chooser_get_app_info gtk_app_chooser_button_get_heading gtk_app_chooser_dialog_get_heading gtk_application_get_window_by_id gtk_assistant_get_nth_page gtk_binding_set_find gtk_builder_get_object gtk_builder_lookup_callback_symbol gtk_builder_get_application gtk_button_get_image gtk_cell_area_get_focus_from_sibling gtk_cell_renderer_start_editing gtk_cell_view_get_model gtk_cell_view_get_displayed_row gtk_clipboard_get_owner gtk_container_get_focus_child gtk_container_get_focus_vadjustment gtk_container_get_focus_hadjustment gtk_dialog_get_widget_for_response gtk_drag_get_source_widget gtk_drag_dest_get_target_list gtk_drag_source_get_target_list gtk_entry_completion_get_model gtk_entry_completion_compute_prefix gtk_expander_get_label_widget gtk_file_chooser_get_filename gtk_file_chooser_get_current_folder gtk_file_chooser_get_uri gtk_file_chooser_get_current_folder_uri gtk_file_chooser_get_preview_widget gtk_file_chooser_get_preview_file gtk_file_chooser_get_preview_filename gtk_file_chooser_get_preview_uri gtk_file_chooser_get_extra_widget gtk_file_chooser_get_filter gtk_file_chooser_native_get_accept_label gtk_file_chooser_native_get_cancel_label gtk_file_filter_get_name gtk_font_chooser_get_font_family gtk_font_chooser_get_font_face gtk_font_chooser_get_font gtk_font_chooser_get_font_desc gtk_font_chooser_get_font_map gtk_frame_get_label gtk_gesture_get_device gtk_gesture_get_window gtk_gl_area_get_error gtk_header_bar_get_title gtk_header_bar_get_subtitle gtk_header_bar_get_custom_title gtk_icon_info_get_filename gtk_icon_view_get_path_at_pos gtk_icon_view_get_model gtk_image_get_pixbuf gtk_image_get_animation gtk_label_get_mnemonic_widget gtk_label_get_attributes gtk_check_version gtk_menu_button_get_popup gtk_menu_button_get_menu_model gtk_menu_button_get_align_widget gtk_menu_button_get_popover gtk_menu_item_get_submenu gtk_menu_item_get_accel_path gtk_native_dialog_get_title gtk_native_dialog_get_transient_for gtk_notebook_get_nth_page gtk_notebook_get_tab_label_text gtk_notebook_get_menu_label gtk_notebook_get_menu_label_text gtk_notebook_get_group_name gtk_notebook_get_action_widget gtk_offscreen_window_get_surface gtk_offscreen_window_get_pixbuf gtk_paned_get_child1 gtk_paned_get_child2 gtk_places_sidebar_get_location gtk_places_sidebar_get_nth_bookmark gtk_plug_get_socket_window gtk_popover_get_default_widget gtk_progress_bar_get_text gtk_recent_filter_get_name gtk_recent_manager_lookup_item gtk_settings_get_default gtk_socket_get_plug_window gtk_stack_sidebar_get_stack gtk_stack_switcher_get_stack gtk_style_context_get_section gtk_style_context_get_parent gtk_style_context_get_frame_clock gtk_test_find_widget gtk_text_buffer_get_mark gtk_text_tag_table_lookup gtk_text_view_get_tabs gtk_text_view_toggle_cursor_visible gtk_text_view_get_window gtk_toolbar_get_nth_item gtk_tool_button_get_label gtk_tool_button_get_icon_name gtk_tool_button_get_label_widget gtk_tool_button_get_icon_widget gtk_tool_palette_get_drop_item gtk_tool_palette_get_drop_group gtk_tree_model_filter_convert_child_path_to_path gtk_tree_model_filter_convert_path_to_child_path gtk_tree_model_sort_convert_child_path_to_path gtk_tree_model_sort_convert_path_to_child_path gtk_tree_view_get_column gtk_tree_view_get_bin_window gtk_tree_view_column_get_widget gtk_tree_view_column_get_tree_view gtk_widget_get_frame_clock gtk_window_group_get_current_device_grab GtkTextBufferSerializeFunc
* textbuffer: nicer get_iter functions, without return valuesSébastien Wilmet2015-11-121-10/+51
| | | | | | | | | | | | | Avoid crashes when passing an invalid location to a gtk_text_buffer_get_iter_at_*() function. A first attempt added boolean return values to know if @iter has been set to the exact location, but it breaks Python and JS bindings because the out parameter is already a return value in those languages. Unit tests are added. https://bugzilla.gnome.org/show_bug.cgi?id=735341
* Revert "textbuffer: nicer get_iter functions"Matthias Clasen2015-11-121-75/+20
| | | | | | | | This reverts commit a9a1c00cc9255ee9a7f73695f69abe172cde7bfa. Unfortunately, adding the boolean return broke both the python and javascript bindings, since they now return a tuple consisting of the boolean and the out argument.
* Don't use g_slist_next in gtktextbuffer.cMatthias Clasen2015-10-201-3/+3
| | | | We generally use ->next directly.
* textbuffer: nicer get_iter functionsSébastien Wilmet2015-10-161-20/+75
| | | | | | | | | | | | Avoid crashes when passing an invalid location to a gtk_text_buffer_get_iter_at_*() function. A boolean is returned to know if @iter has been set to the exact location. Unit tests are added. https://bugzilla.gnome.org/show_bug.cgi?id=735341
* 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-2/+2
| | | | | | Following a similar change in GLib a while ago. 'bla' may by stupid, but it looks less dumb than `bla'.
* text buffer: Convert to g_object_notify_by_pspecMatthias Clasen2015-09-061-54/+53
| | | | This avoids pspec lookup overhead in g_object_notify.
* Code cleanupMatthias Clasen2015-07-311-3/+1
| | | | | | Use g_slist_free_full more consistently. This commit just converts the obvious cases where g_slist_forall is directly followed by g_slist_free.
* GtkTextView: Support font featuresMatthias Clasen2015-07-291-0/+4
| | | | | Add a ::font-features attribute to GtkTextTag, and support font features when inserting Pango markup into a text buffer.
* gtktextbuffer: small cleanup in clipboard handlingPaolo Borelli2015-04-051-18/+14
| | | | | | | Make code shorter and also more efficient since we move the selection check out of the loop https://bugzilla.gnome.org/show_bug.cgi?id=747096
* textview: add support for underline and strikethrough colorsChristian Hergert2015-03-171-0/+28
| | | | | | | | | | | | | | | | | | | | This commit adds the GtkTextTag:underline-rgba and :strikethrough-rgba properties and the necessary plumbing to apply these colors in GtkTextLayout. With this change, you can alter the color of underlines including those of type PANGO_UNDERLINE_ERROR. You might want to alter the underline color to differentiate between spelling and grammer mistakes. In code editors, it is convenient to differentiate between errors and warnings. Note that the GtkTextAppearance struct is public ABI and has no spare room for new fields, so we are resorting to some tricky packing to store the colors in the unused pixel field of the fg_color and bg_color structs. This packing is accomplished by the macros in gtktextattributesprivate.h. Signed-off-by: Christian Hergert <christian@hergert.me> https://bugzilla.gnome.org/show_bug.cgi?id=402168
* Allow inserting Pango markup in text buffersMatthias Clasen2014-12-041-0/+179
| | | | | | This has been a very long-standing feature request. https://bugzilla.gnome.org/show_bug.cgi?id=59390
* 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
|