summaryrefslogtreecommitdiff
path: root/gtk/gtktextview.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Bug 534463 - non-editable GtkTextView should not callCody Russell2008-05-251-5/+21
| | | | | | | | | | | | | 2008-05-25 Cody Russell <bratsche@gnome.org> Bug 534463 - non-editable GtkTextView should not call gtk_im_context_focus_in in focus event * gtk/gtktextview.c: Add checks to see if the textview is editable. Patch by Wang Diancheng. svn path=/trunk/; revision=20162
* gtk/gtkcellrenderer.c gtk/gtkcellrendererpixbuf.cMichael Natterer2008-05-191-2/+1
| | | | | | | | | | | | | | | | 2008-05-19 Michael Natterer <mitch@imendio.com> * gtk/gtkcellrenderer.c * gtk/gtkcellrendererpixbuf.c * gtk/gtkcellrenderertoggle.c * gtk/gtkimagemenuitem.c * gtk/gtkmenutoolbutton.c * gtk/gtkoptionmenu.c * gtk/gtkstatusbar.c * gtk/gtktextview.c: s/PROP_ZERO/PROP_0/g, remove LAST_PROP. svn path=/trunk/; revision=20112
* Unify the handling of various "Enter" keysyms all over the place.Matthias Clasen2008-02-121-0/+1
| | | | | | | | | | | 2008-02-12 Matthias Clasen <mclasen@redhat.com> * gtk/*.c: Unify the handling of various "Enter" keysyms all over the place. (#515047, Christian Persch) svn path=/trunk/; revision=19528
* gtk/gtktextchild.c meant to use G_STRFUNC, not G_STRLOC...Michael Natterer2008-01-281-7/+7
| | | | | | | | | | 2008-01-28 Michael Natterer <mitch@imendio.com> * gtk/gtktextchild.c * gtk/gtktextview.c: meant to use G_STRFUNC, not G_STRLOC... svn path=/trunk/; revision=19418
* gtk/gtktextchild.c use G_STRLOC instead of G_GNUC_FUNCTION (which isMichael Natterer2008-01-281-2/+2
| | | | | | | | | | | 2008-01-28 Michael Natterer <mitch@imendio.com> * gtk/gtktextchild.c * gtk/gtktextview.c: use G_STRLOC instead of G_GNUC_FUNCTION (which is deprecated now). svn path=/trunk/; revision=19416
* Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently. Fixes #5075Johan Dahlin2008-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-06 Johan Dahlin <johan@gnome.org> * gtk/gtkcellrenderercombo.c: (gtk_cell_renderer_combo_get_property), (gtk_cell_renderer_combo_set_property): * gtk/gtkcombobox.c: (gtk_combo_box_set_property): * gtk/gtkcomboboxentry.c: (gtk_combo_box_entry_set_property): * gtk/gtknotebook.c: (gtk_notebook_set_property): * gtk/gtkspinbutton.c: (gtk_spin_button_set_property): * gtk/gtktextbuffer.c: (gtk_text_buffer_set_property), (gtk_text_buffer_get_property): * gtk/gtktextview.c: (gtk_text_view_set_property): * gtk/gtktogglebutton.c: (gtk_toggle_button_set_property): * gtk/gtktoolbutton.c: (gtk_tool_button_set_property), (gtk_tool_button_get_property): * gtk/gtktoolitem.c: (gtk_tool_item_set_property), (gtk_tool_item_get_property): * gtk/gtktreeview.c: (gtk_tree_view_set_property): * gtk/gtkwidget.c: (gtk_widget_set_property): * gtk/gtkwindow.c: (gtk_window_set_property): Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently. Fixes #5075 svn path=/trunk/; revision=19311
* Use gtk_text_buffer_get_insert instead of get_mark. Fixes Bug 497164.Paolo Borelli2007-11-171-50/+30
| | | | | | | | | | | | 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
* Moved gtk_text_view_update_im_spot_location() calls into an idle, fixesYevgen Muntyan2007-11-111-2/+57
| | | | | | | | | | | | | | | | 2007-11-11 Yevgen Muntyan <muntyan@tamu.edu> * gtk/gtktextview.c: Moved gtk_text_view_update_im_spot_location() calls into an idle, fixes #494776. GtkTextViewPrivate:im_spot_idle, do_update_im_spot_location(), queue_update_im_spot_location(), flush_update_im_spot_location(): new field and functions to queue the call; (changed_handler): call queue_update_im_spot_location() instead of gtk_text_view_update_im_spot_location(); (gtk_text_view_key_press_event): flush the idle here. svn path=/trunk/; revision=18984
* merged patch from maemo-gtk which handles failed keynav correctly alsoMichael Natterer2007-09-211-6/+18
| | | | | | | | | | | | 2007-09-21 Michael Natterer <mitch@imendio.com> * gtk/gtktextview.c (gtk_text_view_move_cursor_internal) (gtk_text_view_move_viewport): merged patch from maemo-gtk which handles failed keynav correctly also when the cursor is invisible. (Tommi Komulainen) svn path=/trunk/; revision=18851
* Initialized GValues before unsetting them. (#457720)Matthias Clasen2007-07-191-0/+2
| | | | | | | | | | | 2007-07-19 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_compat_move_focus): Initialized GValues before unsetting them. (#457720) svn path=/trunk/; revision=18497
* Add docsMatthias Clasen2007-07-121-3/+144
| | | | svn path=/trunk/; revision=18455
* Implement block-cursor for overwrite mode. (#80378)Yevgen Muntyan2007-06-121-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move "move-focus" signals from several widgets to GtkWidget to enable moreMichael Natterer2007-06-041-25/+63
| | | | | | | | | | | | | | | | | | | | | | | | 2007-06-04 Michael Natterer <mitch@imendio.com> Move "move-focus" signals from several widgets to GtkWidget to enable more flexible costomization of keyboard navigation via bindings. Fixes bug #414947. * gtk/gtkwidget.c: add "move-focus" binding signal, default to calling the toplevel GtkWindow's "move-focus" vfunc. * gtk/gtktextview.[ch] * gtk/gtkwindow.[ch]: remove "move-focus" signals and add compat code that makes sure that both emitting the signal on the widget and overriding the virtual functions keeps working as before. * gtk/gtktoolbar.c: remove "move-focus" signal here too and use GtkWidget's signal. This change slightly changes keyboard navigation in toolbars. I'll fix the behavior if somebody can explain me if and how exactly the new behavior is broken. svn path=/trunk/; revision=18025
* Improve docsMatthias Clasen2007-05-281-68/+62
| | | | svn path=/trunk/; revision=17957
* Fix the buildMatthias Clasen2007-05-191-1/+1
| | | | svn path=/trunk/; revision=17870
* Add a toggle-cursor-visibility keybinding signal, and bind F7 to it.Matthias Clasen2007-05-181-3/+22
| | | | | | | | | | | 2007-05-18 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c: Add a toggle-cursor-visibility keybinding signal, and bind F7 to it. (#380048, Tim Miao) svn path=/trunk/; revision=17869
* call gdk_event_request_motions(event) so selecting works with XInputMichael Natterer2007-05-111-0/+2
| | | | | | | | | | | 2007-05-11 Michael Natterer <mitch@imendio.com> * gtk/gtktextview.c (selection_motion_event_handler): call gdk_event_request_motions(event) so selecting works with XInput devices too. Spotted by Tommi Komulainen. svn path=/trunk/; revision=17820
* Allow indents to be negative. (#Bug 434308)Matthias Clasen2007-04-301-1/+1
| | | | | | | | | 2007-04-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c: Allow indents to be negative. (#Bug 434308) svn path=/trunk/; revision=17736
* Set first_para_mark to NULL. (#396805, Colin Leroy, patch by MarianoMatthias Clasen2007-03-121-0/+1
| | | | | | | | | | | 2007-03-11 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_set_buffer): Set first_para_mark to NULL. (#396805, Colin Leroy, patch by Mariano Suárez-Alvarez) svn path=/trunk/; revision=17481
* Get rid of the unused event argument. Update all callers.Matthias Clasen2007-03-101-8/+8
| | | | | | | | | | | | | | 2007-03-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_end_selection_drag): Get rid of the unused event argument. Update all callers. * gtk/gtktextview.c (gtk_text_view_focus_out): Call gtk_text_view_end_selection_drag. (#351671, Boyd Timothy) svn path=/trunk/; revision=17449
* call gdk_event_request_motions() for new motion events after receivingTim Janik2007-02-061-3/+3
| | | | | | | | | | | | | | | | | | | | Tue Feb 6 15:53:59 2007 Tim Janik <timj@imendio.com> * gtk/gtktextview.c (gtk_text_view_motion_event): * gtk/gtkspinbutton.c (gtk_spin_button_motion_notify): * gtk/gtkaboutdialog.c (credits_motion_notify_event): * gtk/gtkhruler.c (gtk_hruler_motion_notify): * gtk/gtkvruler.c (gtk_vruler_motion_notify): * gtk/gtkentry.c (gtk_entry_motion_notify): * gtk/gtktooltip.c (_gtk_tooltip_handle_event): * gtk/gtkhsv.c (gtk_hsv_motion): call gdk_event_request_motions() for new motion events after receiving motion hints. * gdk/gdkevents.[hc]: added gdk_event_request_motions(). svn path=/trunk/; revision=17269
* Call text_window_realize() with the correct parameters. (#393813, YevgenMatthias Clasen2007-01-071-2/+2
| | | | | | | | | | | | 2007-01-07 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_set_border_window_size): Call text_window_realize() with the correct parameters. (#393813, Yevgen Muntyan) svn path=/trunk/; revision=17101
* Rework the beep-on-uninserted-text by calling the input method regardlessMatthias Clasen2007-01-041-15/+17
| | | | | | | | | | | | | 2007-01-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c: Rework the beep-on-uninserted-text by calling the input method regardless of editability, and beeping from the commit/preedit-changed handlers. (#390514, Yevgen Muntyan) svn path=/trunk/; revision=17054
* Try harder not to beep on events which are not meant to insert stuff inMatthias Clasen2007-01-021-3/+13
| | | | | | | | | | | | 2007-01-02 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextbuffer.c (gtk_text_view_key_press_event): Try harder not to beep on events which are not meant to insert stuff in the buffer. (#390514, Yevgen Muntyan) svn path=/trunk/; revision=17020
* Fix a segfault in horizontal scrollingMatthias Clasen2007-01-021-2/+2
| | | | svn path=/trunk/; revision=17011
* Remove the scroll timeout. (#390872, Yevgen Muntyan)Matthias Clasen2006-12-311-0/+6
| | | | | | | | | | | 2006-12-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_destroy): Remove the scroll timeout. (#390872, Yevgen Muntyan) svn path=/trunk/; revision=16993
* Don't install cursors on insensitive widgets. (#358864, Jan Schampera)Matthias Clasen2006-12-311-21/+33
| | | | | | | | | | | | | 2006-12-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c: * gtk/gtklabel.c: * gtk/gtkpaned.c: * gtk/gtkstatusbar.c: * gtk/gtktextview.c: Don't install cursors on insensitive widgets. (#358864, Jan Schampera) svn path=/trunk/; revision=16983
* Don't die in an assertion if focus went missing. Just warn, clean up andMatthias Clasen2006-12-291-1/+4
| | | | | | | | | 2006-12-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c (blink_cb): * gtk/gtktextview.c (blink_cb): Don't die in an assertion if focus went missing. Just warn, clean up and continue. (#374378)
* Remove debug output.Matthias Clasen2006-12-251-27/+53
| | | | | | | | | 2006-12-24 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextutil.c: Remove debug output. * gtk/gtktextview.c: Improve the DND scrolling behaviour. (#92387, Carlos Garnacho Parro)
* Replace a lot of idle and timeout calls by the new gdk_threads api.Matthias Clasen2006-12-221-29/+9
| | | | | | | 2006-12-22 Matthias Clasen <mclasen@redhat.com> * *.c: Replace a lot of idle and timeout calls by the new gdk_threads api.
* Silently return if a drag is already in progress, rather than asserting.Matthias Clasen2006-12-201-1/+2
| | | | | | | | 2006-12-20 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_start_selection_drag): Silently return if a drag is already in progress, rather than asserting. (#335622, Li Yuan, testcase by Erwann Chenede)
* remove FIXME #include that is no longer needed.Michael Natterer2006-12-031-1/+0
| | | | | | 2006-12-03 Michael Natterer <mitch@gimp.org> * gtk/gtktextview.c: remove FIXME #include that is no longer needed.
* applied patch by Colin Leroy for Control+GDK_KP_Left to move one word toTim Janik2006-11-271-1/+1
| | | | | | | Mon Nov 27 12:27:06 2006 Tim Janik <timj@imendio.com> * gtk/gtktextview.c: applied patch by Colin Leroy for Control+GDK_KP_Left to move one word to the left, #356255.
* Add new infrastructure for notifications of failed keyboard navigation andMichael Natterer2006-11-161-39/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-11-16 Michael Natterer <mitch@imendio.com> Add new infrastructure for notifications of failed keyboard navigation and navigation with restricted set of keys. The patch handles configurable beeping, navigating the GUI with cursor keys only (as in phone environments), and configurable wrap-around. Fixes bugs #322640, #70986, #318827, #334726, #334742 and #309291. * gtk/gtksettings.c: added properties gtk-keynav-cursor-only, gtk-keynav-wrap-around and gtk-error-bell. * gtk/gtkwidget.[ch]: added new signal "keynav-failed" and public API to emit it. Added New function gtk_widget_error_bell() which looks at the gtk-error-bell setting and calls gdk_window_beep() accordingly. * gtk/gtk.symbols: add the new widget symbols. * gtk/gtkcellrendereraccel.c * gtk/gtkimcontextsimple.c * gtk/gtkmenu.c * gtk/gtknotebook.c: use gtk_widget_error_bell() or look at the gtk-error-bell setting instead of calling gdk_display_beep() unconditionally. * gtk/gtkcombobox.c * gtk/gtkentry.c * gtk/gtkiconview.c * gtk/gtklabel.c * gtk/gtkmenushell.c * gtk/gtkspinbutton.c * gtk/gtktextview.c * gtk/gtktreeview.c: call gtk_widget_error_bell() on failed keynav. * gtk/gtkentry.c * gtk/gtklabel.c * gtk/gtkrange.c * gtk/gtktextview.c: consult gtk_widget_keynav_failed() on failed cursor navigation and leave the widget if it returns FALSE. * gtk/gtkmenushell.c * gtk/gtknotebook.c: only wrap around if gtk-keynav-wrap-around is TRUE. * gtk/gtkradiobutton.c: ask gtk_widget_keynav_failed() to decide whether to to wrap-around, and don't select active items on cursor navigation if gtk-keynav-cursor-only is TRUE. Should look at gtk-keynav-wrap-around too, will look into that.
* Stop cursor blinking after a configurable timeout. (#353670, #352442,Matthias Clasen2006-09-011-13/+68
| | | | | | | | | | | | | | | | | | | | | | | | Stop cursor blinking after a configurable timeout. (#353670, #352442, Arjan van de Ven, Manu Cornet) * gtk/gtksettings.c (gtk_settings_class_init): Add a gtk-cursor-blink-timeout setting, which specifies the number of seconds that the cursor should blink after a user interaction. The default value is G_MAXINT to preserve the current behaviour. * gtk/gtkentry.c (blink_cb): Stop blinking after blink-timeout seconds. * gtk/gtkentry.c (gtk_entry_completion_key_press) (gtk_entry_button_press, gtk_entry_focus_in): Reset the blink timer. * gtk/gtktextview.c (blink_cb): Stop blinking after blink-timeout seconds. * gtk/gtktextview.c (gtk_text_view_key_press_event) (gtk_text_view_button_press_event, gtk_text_view_focus_in_event): Reset the blink timer.
* do not scroll on copy. Bug #329604.Paolo Borelli2006-08-211-11/+6
| | | | | | 2006-08-22 Paolo Borelli <pborelli@katamail.com> * gtk/gtktextview.c: do not scroll on copy. Bug #329604.
* Create new PangoContexts and set them on the layout, to catch changes inMatthias Clasen2006-08-061-1/+13
| | | | | | | | 2006-08-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_style_set): Create new PangoContexts and set them on the layout, to catch changes in font options. (#348278, Behdad Esfahbod)
* Improve consistency of signal and property namesMatthias Clasen2006-07-061-2/+2
|
* revert "keep cursor visible when size changes" since it breaks thingsMichael Natterer2006-06-261-14/+4
| | | | | | | 2006-06-26 Michael Natterer <mitch@imendio.com> * gtk/gtktextview.c (gtk_text_view_size_allocate): revert "keep cursor visible when size changes" since it breaks things (#344874).
* keep the cursor visible when the size changes. Fixes bug #344874.Michael Natterer2006-06-221-4/+14
| | | | | | | 2006-06-22 Michael Natterer <mitch@imendio.com> * gtk/gtktextview.c (gtk_text_view_size_allocate): keep the cursor visible when the size changes. Fixes bug #344874.
* applied patch from Chris Wilson which replaces a useless loop withMichael Natterer2006-05-291-6/+3
| | | | | | | | | 2006-05-29 Michael Natterer <mitch@imendio.com> * gtk/gtktextview.c (gtk_text_view_target_list_notify): applied patch from Chris Wilson which replaces a useless loop with built-in access to free'd memory by a simple integer comparison. Fixes bug #342894.
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Move an assert to the right place. (#341661, Pascal Terjan)Matthias Clasen2006-05-141-2/+2
| | | | | | | 2006-05-13 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_allocate_children): Move an assert to the right place. (#341661, Pascal Terjan)
* Boilerplate reductionMatthias Clasen2006-05-021-38/+8
|
* Remove some unused variables.Matthias Clasen2006-04-121-2/+0
| | | | | | | | | | | 2006-04-11 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (selection_motion_event_handler): Remove some unused variables. * gtk/gtktreeview.c ((gtk_tree_view_search_position_func): Apply a patch from David Trowbridge to improve the positioning of the search popup. (#338047)
* Lower the window, to prevent late-constructed text windows from coveringMatthias Clasen2006-04-061-0/+1
| | | | | | | | 2006-04-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (text_window_realize): Lower the window, to prevent late-constructed text windows from covering child widgets. (#336796, Yevgen Muntyan)
* Fix drag-selection after double-click. (#323862, Benjamin Berg)Matthias Clasen2006-03-281-70/+71
| | | | | | | | | | | | | 2006-03-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_start_selection_drag): (selection_motion_event_handler): Fix drag-selection after double-click. (#323862, Benjamin Berg) * gtk/gtktextview.c (get_iter_at_pointer): Factor this out into a function and use it in move_mark_to_pointer_and_scroll, drag_scan_timeout and selection_motion_event_handler. (Paolo Borelli)
* Move the call to gtk_text_view_end_selection_drag() fromMatthias Clasen2006-03-281-4/+4
| | | | | | | | | | | | 2006-03-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_do_popup) (gtk_text_view_grab_notify): Move the call to gtk_text_view_end_selection_drag() from gtk_text_view_do_popup to gtk_text_view_grab_notify, so that it works not only for the text views own popup, but also for other ways in which we might become grab-shadowed during a selection drag. (#74620, Li Yuan)
* Don't call gdk_window_invalidate_rect() on unrealized widgets. (#335717,Matthias Clasen2006-03-241-1/+2
| | | | | | | | 2006-03-24 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (gtk_text_view_value_changed): Don't call gdk_window_invalidate_rect() on unrealized widgets. (#335717, Nicolas Setton)