2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
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
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
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
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
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
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
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
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
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
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
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
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)
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)
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.
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, 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.
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)
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).
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.
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.
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)
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)
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)
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)
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)
2006-03-22 Michael Natterer <mitch@imendio.com>
* gtk/gtktextbuffer.h (enum GtkTextBufferTargetInfo): count down
from G_MAXUINT to avoid clashes with application-added DND
targets.
* gtk/gtktextview.c (gtk_text_view_init): set an empty
GtkTargetList on the drag_dest so it is not NULL when a derived
class' init() function is called.
(gtk_text_view_target_list_notify): copy the text buffer's paste
targets into the view's destinstion target list (preserving
application-added DND targets), instead of replacing the view's
target list. Fixes bug #334399.
2006-03-07 Michael Natterer <mitch@imendio.com>
Add infrastructure for copy/paste and DND of rich text for
GtkTextBuffer. Fixes bug #324177.
* gtk/gtktextbufferrichtext.[ch]: new files implementing a
per-buffer registry of rich text formats.
* gtk/gtk.h: #include gtktextbufferrichtext.h
* gtk/gtktextbufferserialize.[ch]: new files implementing an
internal serialization format that can handle all of a text
buffer's tags and pixbufs. It's not useful for anything except
tranfer between instances of GtkTextBuffer (Anders Carlsson).
* gtk/Makefile.am: build the new files.
* gtk/gtkclipboard.[ch]: added convenience APIs for rich text,
just as they exist for plain text and pixbufs.
* gtk/gtkselection.[ch]: added rich text convenience APIs here
too. Return the target list from gtk_target_list_ref(). Register
GtkTargetList as boxed type. Added
gtk_target_table_new_from_list() and gtk_target_table_free(),
which make converting between GtkTargetList and arrays of
GtkTargetEntry considerably easier.
* gtk/gtktextutil.[ch]: added _gtk_text_util_create_rich_drag_icon()
which creates a fancy rich text icon (Matthias Clasen).
* gtk/gtktextbuffer.[ch]: use all the new stuff above and
implement copy and paste of rich text. Added APIs for getting the
target lists used for copy and paste. Added public enum
GtkTextBufferTargetInfo which contains the "info" IDs associated
with the entries of the target lists.
* gtk/gtktextview.c: use the new rich text APIs and
GtkTextBuffer's new target list API to enable DND of rich text
chunks.
* gtk/gtk.symbols: export all the new symbols added.
* tests/testtext.c: added rich text testing stuff.
2006-03-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (text_window_invalidate_cursors): Take
cursor width into account when calculating the area to
be invalidated. (#333377, #323401 Steve Frécinaux)
2005-12-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
Only scroll if we have focus. (#316310, Paolo Borelli)
2005-12-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimcontextsimple.c (gtk_im_context_simple_reset): Don't
commit from reset, it upstets GtkTextView.
* gtk/gtktextview.c (gtk_text_view_check_cursor_blink): Be more
careful when turning blinking on and off.
(gtk_text_view_focus_out_event): Make the cursor really invisible
when the focus goes away. (#323087, Sadrul Habib Chowdhury)
(cursor_blinks): Check the gtk-cursor-blink setting first.
2005-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c: Remove some g_return_if_fail() from
static functions, replace some others by g_assert().
* gtk/gtktextview.c (selection_motion_event_handler)
(gtk_text_view_start_selection_drag): Keep track of the original
selection boundaries during a drag selection, in order to correctly
decide when to extend or shrink the selection. (#320167,
reported by Arvind S N, patch by Paolo Borelli)
2005-10-24 Matthias Clasen <mclasen@redhat.com>
Add settings to hide the input method and Unicode control character
submenus in the context menus of GtkEntry and GtkTextView.
* gdk/x11/gdkevents-x11.c: Map GTK+ settings to X settings.
* gtk/gtksettings.c (gtk_settings_class_init): Declare GTK+ settings here.
* gtk/gtktextview.c (popup_targets_received):
* gtk/gtkentry.c (popup_targets_received): Use the settings here.
2005-09-09 Matthias Clasen <mclasen@redhat.com>
Stop cursor blinking in non-editable regions of a text view.
(#311508, Torbjörn Andersson)
* gtk/gtktextview.c (gtk_text_view_check_cursor_blink):
(cursor_blinks): Take editability into account when deciding
whether the cursor blinks.
(gtk_text_view_button_release_event):
(gtk_text_view_move_cursor_internal): Update cursor blinking here.
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gdk/Makefile.am:
* gtk/Makefile.am: Intern type names in code generated by
glib-mkenums, too.
* gtk/*.c:
* gdk/x11/*.c:
* gdk/*.c: Intern type names before registering the type to avoid
unnecessary copies.
2005-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Don't
ever go unconditionally to the buffer ends; that doesn't work
if the initial or final portion of the buffer are invisible.
2005-07-11 Matthias Clasen <mclasen@redhat.com>
When dragging text, use a drag icon showing the (ellipsized)
text that is being dragged: (#161132, Kevin Duffus, patch
by Carlos Garnacho Parro)
* gtk/gtktextutil.h:
* gtk/gtktextutil.c (_gtk_text_util_create_drag_icon): Add
a function to create a pixmap for use when dragging text.
* gtk/gtktextview.c (gtk_text_view_start_selection_dnd):
* gtk/gtklabel.c (gtk_label_motion):
* gtk/gtkentry.c (gtk_entry_motion_notify): Use a drag icon
showing the text being dragged.
2005-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentry.c (gtk_entry_move_forward_word)
(gtk_entry_move_backward_word): Match the text view change
to allow selecting whitespace with double-click.
2005-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (extend_selection): Make double-clicking
between words select whitespace. (#309860, Mike Miller, patch
by Paolo Borelli)
2005-06-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
jump to the next line if we are at the end of the line.
2005-06-13 Matthias Clasen <mclasen@redhat.com>
Make invisible text work a bit better (#66194, patch by
Jeroen Zwartepoorte)
* gtk/gtk.symbols:
* gtk/gtktextiter.[hc]: Add function to move by
visible lines.
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal):
Skip invisible text when moving by paragraphs.
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_visually):
Skip invisible lines here too.
2005-05-25 Michael Natterer <mitch@imendio.com>
* gtk/gtktextview.c (blink_cb): block the text_layout's "changed"
handler when changing cursor visibility because it would expose
the whole paragraph where the cursor is. Instead, expose the
cursors' areas manually. (#173047).
(text_window_invalidate_cursors): new function which exposes the
cursors.
* gtk/gtkstyle.c (draw_insertion_cursor): added comment that the
same cursor size calculation is in text_window_invalidate_cursors().
2005-05-18 Anders Carlsson <andersca@imendio.com>
* gtk/gtktextview.c: (gtk_text_view_flush_scroll),
(gtk_text_view_update_adjustments), (gtk_text_view_value_changed):
* gtk/gtktextview.h:
If the horizontal adjustment changes because of a change in the
layout width, then do a complete redraw. This is because there
might be right-aligned or centered text that needs to be redrawn.
2005-05-11 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
to draw the swatch in to avoid having an extraneous window.
* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
color when !has_opacity.
2005-05-10 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
files for Cairo convenience functionality.
* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
convenience functions to add GdkRectangle, GdkRegion to a cairo path.
* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().
* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
gdk_drawable_create_cairo_context() to gdk_cairo_create().
* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
Rename gdk_pixbuf_set_as_cairo_source() to
gdk_cairo_set_source_pixbuf().
* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
Adjust for renames.
* gdk/gdk.symbols: Update.
* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
coordinate system problem that was causing the wrong portions
to be invalidated.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
gtk/gtkcellview.c (gtk_cell_view_expose)
gtk/gtkdnd.c (gtk_drag_highlight_expose)
gtk/gtkentry.c (gtk_entry_draw_text)
gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.
* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
GTK+ style ... use instance-private data and standard names for
private structure, etc. Move function docs inline.
* gtk/gtkcalendar.[ch]: Switch to drawing everything in
expose. Switch drawing to Cairo.
* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
gtk_calendar_freeze/thaw
2005-05-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_expose_event): Propagate
the event to unanchored children in the text window.
(#302494, Stephen Kennedy)
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
their G_ counterparts, but also mark the name, nick
and blurb as static.
* gtk/*.c: Mark param spec strings as static, using
the new macros.
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.
Wed Jan 5 11:42:49 2005 Søren Sandmann <sandmann@redhat.com>
* gtk/gtkviewport.c (gtk_viewport_realize):
* gtk/gtktextview.c ((text_window_realize): Set the background of
the windows to None instead of adding EXPOSURE_MASK, as suggested
by Owen in #162112.
2004-12-08 Matthias Clasen <mclasen@redhat.com>
Fix#111031, reported by Padraig O'Briain:
* gtk/gtktextlayout.h:
* gtk/gtktextlayout.c (gtk_text_layout_get_iter_at_position):
Add a variant of gtk_text_layout_get_iter_at_pixel() which
returns the character at the position, not the closest
cursor position.
* gtk/gtktextview.h:
* gtk/gtktextview.c (gtk_text_view_get_iter_at_position):
Add a variant of gtk_text_view_get_iter_at_location() which
returns the character at the position, not the closest
cursor position.
2004-11-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_iter_by_lines): Return
a boolean indicating whether we could do the requested move.
(gtk_text_view_move_cursor_internal): For GTK_MOVEMENT_DISPLAY_LINES,
move to the beginning/end of the line if we're on the first/last
line. (#155891, Paolo Borelli)
2004-10-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkdnd.c: Document how to use info with text/image
targets.
* gtk/gtkselection.h:
* gtk/gtkselection.c (gtk_target_list_add_text_targets):
(gtk_target_list_add_image_targets): Add info argument.
* gtk/gtkcalendar.c (gtk_calendar_motion_notify):
* gtk/gtkentry.c (gtk_entry_init):
* gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.
Thu Oct 21 15:01:09 2004 Owen Taylor <otaylor@redhat.com>
#155952
* gtk/gtkentry.c: Fix checking the wrong position for
the backspace_deletes_character PangoLogAttr.
* gtk/gtktextbuffer.[ch] gtk/gtk.symbols (gtk_text_buffer_backspace):
Move backspace logic from GtkTextView to here, check
backspace_deletes_char.
* gtk/gtktextview.c: Use gtk_text_buffer_backspace().