Add a function to obtain the effective context id, and reset the slave
only when the effective context id is different from the current context
id, when setting a client window and on focus in. This might fix
bug 593868 and bug 567124.
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.
Likewise to other cell renderers, GtkCellRendererToggle now properly
follows the insensitive state of the widget requesting rendering. It
does this by checking the state of the widget pointer, not by using
GtkCellRendererFlags (there exists an insensitive flags). Later on, I
think we should move to using GtkCellRendererFlags and not the state of
the widget requesting rendering. Patch merged from maemo-gtk.
If the cell view is insensitive, it needs to properly propagate this
insensitive state to the cell renderers using cell renderer flags.
Merged from maemo-gtk.
This was removed long ago by the patch in bug 101235. On a hindsight,
all other scrollable widgets are processing exposes at this point, which
completely makes sense to me, so I am putting it back.
Special case \r\n in gtk_text_buffer_backspace since \r should not be
reinserted even if we are deleting one char at a time. Also add
corresponding unit test. Fixes bug #544724.
Such paths (eg. a child node that is collapsed) should be ignored. This
is fixed by checking the return value of _gtk_tree_view_find_node(),
which returns a partial return value (the parent node) when it returns
TRUE. Also added a unit test.
Reorder drawing in gtk_tree_view_bin_expose() so that the tree lines are
drawn after the cells have been drawn. This is because cell-background
is handled in the cell renderer, so the tree lines need to be drawn
after this.
Contrary to what was believed before, do_validate_rows() does need to
queue a normal resize (including a redraw) when it has to. The redraw
is required because of the size of the tree has changed because new
row(s) have been validated.
Block 2BUTTON and 3BUTTON press events using a button press event
handler in GtkCellRendererSpin, so that they won't be eaten and
processed by tree view.
Previously the rightmost button with a proper response id was activated,
this is now only done if there is no default button set.
With this patch the right widget gets activated when there are multiple
widgets wth response ids conforming to is_stock_accept_response_id() as
the selected widget is made the new default widget before showing the
overwrite confirmation dialog.
In validate_visible_area() it was assumed that gtk_tree_path_prev()
would always return the correct path of the preceding node. This is
obviously not true. The if-clause has been removed so that we now
always use _gtk_tree_view_find_path() to get the path from the tree,
node.