Fixed issues in my previous patch for bug 626939 removing GtkRequisition
cache: these widgets monitor the previous requested size and decide whether
to queue a resize when the content changes based on it's prior request.
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.
For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.
Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
Preferrably should be made just into a local variable for libgtk like
_gdk_debug_flags for libgdk. But for now used by
gtk/tests/textbuffer.c and modules/printbackends/cups/gtkprintbackendcups.c.
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
it makes no sense to maintain this cache on the GtkWidget structure...
removing the requisition cache however does not break the old "size-request"
signal which is there for backwards compatability reasons.
In any case widget->requisition should not have been accessed,
gtk_widget_get_child_requisition() would have been the correct way
to consult the cache.
This commit also deprecates the newly added gtk_widget_get_requisition()
API and makes it fallback on gtk_size_request_get_size().
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