2007-07-19 Kristian Rietveld <kris@imendio.com>
* gtk/gtk.symbols:
* gtk/gtktreeprivate.h:
* gtk/gtktreeview.[ch] (gtk_tree_view_get_tooltip_context),
(gtk_tree_view_[sg]et_tooltip_column): add more convenience API.
* tests/testtooltip.c (query_tooltip_tree_view_cb): use
gtk_tree_view_get_tooltip_context().
* demos/gtk-demo/demo.ui: add a tooltip column to the list store,
set tooltip-column on the tree view.
svn path=/trunk/; revision=18496
2007-07-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c: Correct some mistakes in the
documentation of the test-expand/collapse-row signals.
(#457774, Olivier Andrieu)
svn path=/trunk/; revision=18489
2007-07-13 Kristian Rietveld <kris@imendio.com>
#408327, improve tooltip positioning.
* gtk/gtk.symbols: updated.
* gtk/gtktooltip.[ch] (gtk_tooltip_position): factor out
positioning code in here,
(gtk_tooltip_set_tip_area): new function to set the tooltip
area,
(gtk_tooltip_reset), (_gtk_tooltip_handle_event): hide tooltip
once the pointer leaves the tip area.
* gtk/gtktreeview.[ch] (gtk_tree_view_set_tooltip_row),
(gtk_tree_view_set_tooltip_cell): convenience functions to set
tip area for row/column/cell.
* tests/testtooltips.c (query_tooltip_tree_view_cb): use
gtk_tree_view_set_tooltip_row.
svn path=/trunk/; revision=18464
2007-07-11 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_*_to_*_coords): x should be
changed when converting widget <=> bin_window coordinates, not
when bin_window <=> tree_window.
svn path=/trunk/; revision=18446
2007-07-02 Kristian Rietveld <kris@gtk.org>
* gtk/gtk.symbols:
* gtk/gtktreeview.[ch] (gtk_tree_view_is_rubber_banding_active): new
function to check whether a rubber banding operation is currently
active. (#393579, Christian Neumair).
svn path=/trunk/; revision=18344
2007-06-13 Kristian Rietveld <kris@imendio.com>
Audit of GtkTreeView coordinate system usage. (#142494).
* gtk/gtktreeview.[ch]: general documentation updates,
(gtk_tree_view_scroll_to_cell), (gtk_tree_view_get_dest_row_at_pos):
update coordinate translations,
(gtk_tree_view_tree_to_widget_coords),
(gtk_tree_view_widget_to_tree_coords): Deprecated,
(gtk_tree_view_convert_.*_coords): 6 new functions for doing
transformations between coordinate systems.
* gtk/gtk.symbols: updated.
* tests/testtooltips.c (query_tooltip_tree_view_cb): fix testcase
with new gtk_tree_view_convert_widget_to_bin_window_coords().
* docs/reference/gtk/Makefile.am
* docs/reference/gtk/images/tree-view-coordinates.png: add new image.
* docs/reference/gtk/tmpl/gtktreeview.sgml: eloborate on the
different coordinate systems.
svn path=/trunk/; revision=18119
2007-06-06 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_unrealize): also remove the
auto expand timeout if it exists.
svn path=/trunk/; revision=18048
2007-05-02 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_grab_notify): stop the rubber band
if it's active.
svn path=/trunk/; revision=17770
2007-04-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_style_set): Set the background
of the header window again. (#431067, Benjamin Berg)
svn path=/trunk/; revision=17640
2007-03-20 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c:
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_focus_area().
* gtk/gtktreeview.c (gtk_tree_view_clamp_column_visible): add
focus_to_cell parameter, rework to handle clamping columns which
are bigger than the available page size better,
(gtk_tree_view_key_press): remove code handling moving the focus
to other column headers,
(gtk_tree_view_header_focus): add clamp_column_visible parameter,
fix RTL support, don't wrap around when moving focus to other
column headers, call gtk_tree_view_clamp_column_visible() instead
of duplicating code,
(gtk_tree_view_focus): only clamp the column visible when we are
explicitly moving to another column header (fixes#399555, Charles
Kerr),
(gtk_tree_view_move_cursor_left_right): update call to
gtk_tree_view_clamp_column_visible().
svn path=/trunk/; revision=17546
2007-03-10 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_search_dialog_hide): only
hide the search dialog and send focus events if the search dialog
is currently visible.
svn path=/trunk/; revision=17464
2007-02-16 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeprivate.h: add cursor_offset field.
* gtk/gtktreeview.c (gtk_tree_view_init),
(gtk_tree_view_move_cursor_page_up_down): fix off by one error
in page up/down handling by memorizing the offset into the cursor
row. (Fixes#399809, reported by Bruce Bowler).
svn path=/trunk/; revision=17316
2007-02-16 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_search_dialog_hide): send
a focus-in event to the tree view after hiding the search dialog.
(#356515, Rich Burridge, Peter Parente).
svn path=/trunk/; revision=17314
2007-01-18 Michael Natterer <mitch@imendio.com>
* gtk/gtkcheckbutton.c
* gtk/gtkdnd.c
* gtk/gtkentry.c
* gtk/gtkmenu.c
* gtk/gtktreeview.c
* gtk/gtkviewport.c: pass more clip rectangles to gtk_paint_foo()
functions. Based on a patch from maemo-gtk (bug #398023).
svn path=/trunk/; revision=17183
2007-01-13 Hans Breuer <hans@breuer.org>
* gtk/gtkimmulticontext.c : don't include "gtkprivate.h" to avoid
differing definitions of GTK_LOCALEDIR (bug #396175).
* gtk/gtktreeview.c : use g_snprintf instead of snprintf, which is
not available everywhere
* gtk/makefile.msc.in : updated
svn path=/trunk/; revision=17137
2007-01-05 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_dy_to_top_row): handle tree
== NULL. (Fixes#392259, reported by Christian Persch).
svn path=/trunk/; revision=17092
2007-01-05 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_row_changed): do allow for
invalidated nodes if the tree view is not realized. (#363147,
Carlos Garnacho, Miguel Cabrera).
svn path=/trunk/; revision=17089
2006-12-26 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_search_init): fix typo causing
the search dialog timeout never to be refreshed. (#389581,
Andrzej Szombierski).
2006-12-26 Kristian Rietveld <kris@gtk.org>
Lots of scrolling fixes. Made scrolling work properly in not fully
validated tree views; fixed a bunch of corner cases.
* gtk/gtktreeview.c (validate_visible_area): if a row's dy is past
upper - page_size, we know it is located at the end so the test for
dy + height has been dropped.
In the same case if area_below < 0, we know this is the last node
in the tree view so area_above is page_size - height of this row.
(validate_visible_area): got rid of subtracting new_height -
old_height from area_{below,above}, it didn't make any sense at
all and the full height of the row should be subtracted instead.
(validate_visible_area): when scrolling to a given path, set the
top row directly together with the dy offset, then sync that top_row
to the dy.
(gtk_tree_view_set_top_row): new function to directly set a top_row.
(gtk_tree_view_dy_to_top_row): refactored to use
gtk_tree_view_set_top_row().
(gtk_tree_view_top_row_to_dy): make sure dy >= 0 when done.
(gtk_tree_view_adjustment_changed): only update our dy and
top_row if the adjustment's dy actually changed.
2006-12-03 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): when not using an
explicit alignment, use the full area of the row (not just dy)
to determine how to implicitly align it. (Fixes#363191, reported
by Federico Mena Quintero).
2006-11-24 Michael Natterer <mitch@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_up_down): if we
can't go up/down, consult gtk_widget_keynav_failed() and leave the
widget if it returns FALSE (bug #322640).
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.
2006-11-09 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_up_down): disable
don't move cursor case for SELECTION_NONE. (#371756, John Ellis).
2006-10-30 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): don't
forget to queue a draw for the new cursor node. (Fixes#366548,
reported by Sven Herzberg).
2006-10-30 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_class_init): change left/right
keybindings to collapse/expand rows instead of moving the focus
cursor. (#105895, Brian Bober and others).
2006-10-29 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): guard against
child removal in row-expanded callback. (#366782, John Ellis).
2006-10-27 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): rework the area_above == 0
case to not overwrite the variables in the lower scope (which are
used later on ...), get the path correctly and bail out when there
isn't a node above us. (#359231).
2006-10-08 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.[ch] (gtk_tree_view_set_property),
(gtk_tree_view_set_show_expanders),
(gtk_tree_view_get_show_expanders): add getter/setter for
show-expanders property, queue a redraw when this property
is toggled (#351167, Martin Ejdestig),
(gtk_tree_view_set_level_indentation),
(gtk_tree_view_get_level_indentation): also add getter/setter
and docs for level-indentation property.
2006-09-25 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): if the tree view
has already been realized; scroll to background area instead of
cell area. (Fixes#330683, Johan Dahlin, Tommi Komulainen).
2006-09-25 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_grid_lines): only attempt
to create the GCs if the widget is realized. (Fixes#357578).
2006-09-15 Michael Natterer <mitch@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_key_press): refactored column
header navigation/resizing/reordering to be more readable and lose
one level of nesting.
2006-09-15 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_key_press): actually directly
return after handling column button focus; we disable wrap around
with this (which actually happened via a really weird code path).
(Michael Natterer)
2006-09-15 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_key_press): make column resizing
code RTL aware, also break from the loops after we have seen the
focussed column button (Michael Natterer).