gtk_tree_selection_real_modify_range() has a g_return_if_fail() if the
start or end paths passed to it do not correspond to real tree nodes.
However, GtkTreePaths inherently do not have to be valid, so it should
be acceptable to call gtk_tree_selection_select_range() with
non-existent paths. Replace the g_return_if_fail() by a silent return,
and add a unit test.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
_gtk_rbtree_first() can potentially return NULL if the RB tree is empty,
which would result in NULL pointer dereferences in the GtkTreeSelection
code. Gracefully handle them.
Found by scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
This commit exposes the get_type() functions and standard
headers for accessible implementations. This makes it possible
to derive from the GTK accessible implementations without
GType magic tricks. This is necessary, because we require the
a11y type hierarchy to be parallel to the widget type hierarchy.
So, if you derive a widget and need to adjust its a11y implementation,
you have to be able to derive its accessible implementation.
This commit probably exposes more than is absolutely necessary,
it also exposes accessibles of widgets that are unlikely candidates
for deriving from.
_gtk_tree_view_find_path() was not a name that not really described what
the function does. And I kept forgetting it. Also, it took the tree view
as an argument and that was completely unnecessary.
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.
2006-10-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected_rows):
Set model in all cases. (#357791, Andreas Köhler)
2006-06-02 Kristian Rietveld <kris@imendio.com>
Separate sensitive/selectable properties.
* gtk/gtktreeselection.c (tree_column_is_sensitive): remove,
(_gtk_tree_selection_row_is_selectable): remove checks to see if at
least one column is sensitive,
(gtk_tree_selection_real_select_node): remove code which enables
insensitive rows to always be unselected.
* gtk/gtktreeview.c (gtk_tree_view_row_changed): remove code
that unselects a node if it just became insensitive.
* gtk/gtkcombobox.c (gtkcombo_box_list_select_func): new function,
based on the at least one column sensitive check from
_gtk_tree_selection_row_is_selectable(),
(gtk_combo_box_list_setup): set selection function on tree selection.
2006-03-01 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeselection.c (row_is_selectable): rename to
_gtk_tree_selection_row_is_selectable and export internally,
(gtk_tree_selection_real_select_node): changed so it is always
possible to unselect insensitive nodes, changed the logic a bit to
be more clear.
* gtk/gtktreeprivate.h: add _gtk_tree_selection_row_is_selectable.
* gtk/gtktreeview.c (gtk_tree_view_row_changed): Unselect a row if
it became insensitive.