Also, added api to allow an input method to internally handle
key press and release events in the GtkTextView and GtkEntry
cases.
This is simply a wrapper to the gtk_im_context_filter_keypress()
function, but It's added to not access the ->im_context
directly.
Based on a Christian Dywan patch
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=163251
GtkTextView is missing accessors for its sealed hadjustment
and vadjustment members.
This patch adds gtk_text_view_get_hadjustment() and
gtk_text_view_get_vadjustment() to GtkTextView
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=616053
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.
Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.
Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.
Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.
Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.
Gail and tests are updated as well.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
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.
Also use a different means to check that the given mark is in the text
view's buffer. This will also play nice with anonymous and NULL marks.
Suggested by Paolo Borelli.
When unsetting the old buffer always set the buffer on the layout to
NULL. More importantly, clear the pending scroll. (The scroll is
handled in an idle, when not cleared an idle handler might touch the
layout later on, possibly corrupting the BTree). Unref the buffer after
removing the selection from the clipboard, not before. Patch merged
from maemo-gtk.
In gtk_text_view_queue_scroll() we need to verify if the given mark
exists in the text view's current buffer. When not done, this can
result in corruption of the BTree data structure. Patch merged from
maemo-gtk.
Updating the IM spot location in gtk_text_view_value_changed() might
invalidate the layout, so we need to make sure that we update it before
validating the layout again. Otherwise, the layout will be invalidated
right after validating it (possibly resulting in a failed
onscreen_validated assertion). Patch merged from maemo-gtk.
Shift-click inside an existing selection reduces the selection to the
range from the insert mark to the clicked point instead of removing the
selection. This makes GtkTextView more consistent with GtkEntry.
* gtk/gtktextview.c (gtk_text_view_paint): If additional areas got
invalidated, don't try to add them to the paint region: in an expose
handler, we cannot paint outside the area that was passed in, since
drawing will be clipped. So stealing the update region from the
window causes lost draws.
Patch by Owen Taylor
svn path=/trunk/; revision=22442
2009-02-27 Michael Natterer <mitch@imendio.com>
Bug 573383 – Setting a textview's buffer to NULL doesn't do a
complete job
* gtk/gtktextview.c (gtk_text_view_set_buffer): always set
text_view->layout's buffer, also if it's NULL.
svn path=/trunk/; revision=22414
setting up the im context before the widget is realized, just
reset it when the client window is set.
* gtk/gtkimmulticontext.c: Reset the slave when a client window
is set.
* gtk/gtkimmodule.c
* gtk/gtktextview.c: Revert changes for bug 567124.
svn path=/trunk/; revision=22214
* gtk/gtktextview.c: Don't set up im stuff if the widget
is not realized.
* gtk/gtkimmodule.c: Assert that we have a window.
svn path=/trunk/; revision=22193
* gtk/gtkentry.c:
* gtk/gtklabel.c:
* gtk/gtktextview.c: Correct some copy-and-paste mistakes in
keybinding signal docs. Pointed out by Pascal Terjan.
svn path=/trunk/; revision=22140
2009-01-15 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkimcontext.c: documentation description: Mention the various
properties and the environment variable, with links to their
documentation.
* gtk/gtksettings.c:
* gtk/gtktextview.c: Make the im-module property documentation more
expansive.
svn path=/trunk/; revision=22123
Requested by Daniel Elstner.
* gtk/gtk.symbols:
* gtk/gtkimmulticontext.[hc] (gtk_im_multicontext_set_context_id):
New function to set the context id on a GtkIMMulticontext.
* gtk/gtkentry.c:
* gtk/gtktextview.c: Add a ::im-module property that can be
set to override the global setting for the im module to be used.
svn path=/trunk/; revision=22113
2009-01-12 Paolo Borelli <pborelli@katamail.com>
Bug 492794 – Pasting external text at end of view yields wrong
scrolling to mark
* gtk/gtktextbuffer.[ch]:
* gtk/gtktextview.c:
Add a "paste-done" signal and use it to propelry scroll the
view at the end of the pasted text in the case of an async
paste. Patch by Ignacio Casal Quintero based on a patch by
Yevgen Muntyan.
svn path=/trunk/; revision=22100
2009-01-12 Claudio Saavedra <csaavedra@igalia.com>
Bug 567468 – no check for trailing != NULL in
gtk_text_layout_get_iter_at_position()
* gtk/gtktextlayout.c: (gtk_text_layout_get_iter_at_position):
Check for trailing to be non-NULL.
* gtk/gtktextview.c: (gtk_text_view_get_iter_at_position): document
that trailing may be NULL.
svn path=/trunk/; revision=22090
2008-12-11 Sven Herzberg <sven@imendio.com>
Document the "set-scroll-adjustments" signal
Reviewed by Kristian Rietveld.
* gtk/gtkiconview.c,
* gtk/gtklayout.c,
* gtk/gtktextview.c,
* gtk/gtktreeview.c,
* gtk/gtkviewport.c: added proper documentation for the signal
svn path=/trunk/; revision=21871
2008-08-12 Paolo Borelli <pborelli@katamail.com>
Bug 526234 - make shift+ctrl+del delete till the end of line
* gtk/gtktextview.c: add shift+ctrl+del and shift+ctrl+backspace
keyboard shortcuts to delete to the end/start of the current line.
svn path=/trunk/; revision=21103
2008-08-12 Michael Natterer <mitch@imendio.com>
* gtk/*.c: consistently chain up using
GTK_FOO_CLASS(parent_class)->bar(instance) instead of
(*GTK_FOO_CLASS(parent_class))->bar(instance).
svn path=/trunk/; revision=21085
2008-07-21 Michael Natterer <mitch@imendio.com>
* gtk/gtktoolbar.c (gtk_toolbar_class_init): use the simpler
g_signal_override_class_handler() instead of
g_signal_override_class_closure().
* gtk/gtktextview.c (gtk_text_view_class_init): ditto.
(gtk_text_view_compat_move_focus): chain up using
g_signal_chain_from_overridden_handler() instead of the generic
g_signal_chain_from_overridden() which needs manual fiddling with
millions of GValues.
svn path=/trunk/; revision=20880