2008-05-28 Kristian Rietveld <kris@imendio.com>
Refactor expand/collapse timeout handling (amendment to bug 511217).
* gtk/gtktreeview.c (add_expand_collapse_timeout),
(remove_expand_collapse_timeout): new functions, the remove function
also clears expanded_collapsed_node,
(cancel_arrow_animation): moved to be next to the add/remove timeout
functions,
(gtk_tree_view_unrealize),
(gtk_tree_view_row_deleted),
(gtk_tree_view_set_model),
(cancel_arrow_animation),
(gtk_tree_view_real_expand_row),
(gtk_tree_view_real_collapse_row): use the new add/remove functions.
svn path=/trunk/; revision=20205
* gtk/gtktreeview.c (cancel_arrow_animation): Reset
expanded_collapsed_node when canceling the animation.
Patch by Nicholas Setton.
svn path=/trunk/; revision=20201
2008-03-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_ensure_interactive_directory):
Set window type hint on the search popup. (#522279, Danny Baumann)
svn path=/trunk/; revision=19880
2008-02-13 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_stop_rubber_band): only
queue a redraw if the rubber banding has actually been active.
svn path=/trunk/; revision=19556
2008-02-12 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row): guard against people
deleting the row in question in the selection-changed callback.
(#514621, Andreas Koehler).
svn path=/trunk/; revision=19530
2008-02-12 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c: Unify the handling of various "Enter" keysyms
all over the place. (#515047, Christian Persch)
svn path=/trunk/; revision=19528
2008-01-10 Kristian Rietveld <kris@imendio.com>
Fix#477175, reported by Juri Pakaste.
* gtk/gtktreeprivate.h:
* gtk/gtktreeview.c (gtk_tree_view_top_row_to_dy): do not set
tree_view->priv->dy here directly, just calculate the new value
and set it on the adjustment,
(gtk_tree_view_adjustment_changed): add guards to not call
gtk_tree_view_dy_to_top_row() if we are currently in
gtk_tree_view_top_row_to_dy(),
(gtk_tree_view_put): fix coordinate annotation: these are bin_window
coordinates, not tree coordinates,
(gtk_tree_view_real_start_editing): add cast.
* gtk/tests/treeview-scrolling.c: add an assertion for checking the
position of the editable in the "create new row and start editing"
tests.
svn path=/trunk/; revision=19331
2007-10-09 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): make
sure the new cursor node is visible when we are done. (Fixes#472965,
Carlos Garnacho).
svn path=/trunk/; revision=18899
2007-10-09 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_up_down): we should
only "don't move the cursor, but just select the current node" if the
cursor node is actually selectable. (Fixes#483730, reported by
Geoff Bache).
svn path=/trunk/; revision=18898
2007-09-14 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_get_property): the tooltip-column
property getter needs to set an integer, not a boolean. (#476689,
spotted and patch by Christian Persch).
svn path=/trunk/; revision=18818
2007-09-13 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_set_toooltip_cell): if cell
is set, always pass in path to gtk_tree_view_get_cell_area() whether
it is NULL or set. Added explanatory comment and added this
side case to the API documentation.
svn path=/trunk/; revision=18812
2007-09-10 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_key_press): only start
typeahead search if tree_view has focus (and not one of the column
buttons).
svn path=/trunk/; revision=18779
2007-09-09 Kristian Rietveld <kris@gtk.org>
Reverted r16699:
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).
svn path=/trunk/; revision=18768
2007-08-22 Kristian Rietveld <kris@imendio.com>
Do not allow the cursor to go to a separator row. Fixes#441219,
modified patch by Carlos Garnacho.
* gtk/gtktreeview.c (row_is_separator): new inline function
for calling the row-separator-func, made all of gtktreeview.c use
this function instead of calling the func themselves,
(gtk_tree_view_button_press): treat a click on a separator like
a click on empty space,
(gtk_tree_view_update_rubber_band_selection_rage): skip
non-selectable rows,
(search_first_focusable_path),
(gtk_tree_view_focus_to_cursor),
(gtk_tree_view_move_cursor_up_down),
(gtk_tree_view_move_cursor_page_up_down),
(gtk_tree_view_move_cursor_start_end): skip separators,
(gtk_tree_view_real_set_cursor): do not allow setting the cursor
on a separator.
svn path=/trunk/; revision=18672
2007-08-14 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_up_down): make
sure we fail keynav if the only item in the list is already selected.
(Fixes#465039, reported by Fernando Herrera).
svn path=/trunk/; revision=18610
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).
2006-08-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_grid_lines)
(gtk_tree_view_set_enable_tree_lines): Be more careful
when creating gcs, also emit change notification.
(gtk_tree_view_unrealize): Free the gcs here. (#349834,
Chris Wilson)
2006-07-18 Kristian Rietveld <kris@imendio.com>
Fix for #335012, reported by Matteo Nastasi.
* gtk/gtktreeview.c (gtk_tree_view_real_start_editing): if the
requested space of the editable is smaller than the cell area,
put it up above the middle of the cell area.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing):
configure the inner border to cover the cell area if the
entry requisition is smaller than the cell_area.
2006-07-18 Kristian Rietveld <kris@imendio.com>
Another fix for #164884.
* gtk/gtktreeprivate.h: add in_grab field.
* gtk/gtktreeview.c (gtk_tree_view_button_press): only save press
to possibly begin a drag when there's no grab pending,
(gtk_tree_view_grab_notify): toggle in_grab field.
2006-07-18 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_realize): use MAX
priv->width, alloc.width when allocating the bin_window,
(gtk_tree_view_bin_expose): don't overrun bin_window when drawing
the flat box.
2006-07-17 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_build_tree): check if the iter
still has children after running the test-expand-row func,
(gtk_tree_view_real_expand_row): ditto. (#302127, Billy Biggs).
2006-06-27 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_model): cancel the
expand collapse timeout when unsetting the model (Fixes#327164,
reported by Daichi Kawahata).
2006-06-21 Kristian Rietveld <kris@imendio.com>
Allocate space for the grid lines when they are enabled.
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): make sure the cell
area does not overlap with the grid lines, also draw the line for
"the next cell" in the last loop iteration, make sure the cursor falls
in between the grid lines,
(validate_row): request extra space for the grid lines.
2006-06-02 Kristian Rietveld <kris@imendio.com>
Rubber banding for GtkTreeView, #80127. Uses same method as
GtkIconView.
* gtk/gtktreeview.c (gtk_tree_view_class_init),
(gtk_tree_view_init), (gtk_tree_view_get_property),
(gtk_tree_view_set_property), (gtk_tree_view_set_rubber_banding),
(gtk_tree_view_get_rubber_banding): add property,
(gtk_tree_view_button_press): start rubber banding if enabled and
press is on a non-selected node,
(gtk_tree_view_button_release): stop rubber banding,
(gtk_tree_view_motion_bin_window), (scrool_row_timeout): enable/update
the rubber band,
(gtk_tree_view_bin_expose): draw rubber band if active,
(gtk_tree_view_stop_rubberband),
(gtk_tree_view_update_rubber_band_selection_range),
(gtk_tree_view_update_rubber_band_selection),
(gtk_tree_view_update_rubber_band),
(gtk_tree_view_paint_rubber_band): new functions.
* gtk/gtktreeview.h: add new set/get function for rubber banding
property.
* gtk/gtktreeprivate.h: add a bunch of new private fields.
2006-06-02 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_leave_notify)P: revert fix of
#164884 because it's not a problem in gtk+ but in applications and
it breaks starting drags from the edge of a row.
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-05-29 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_up_down): select
the current focus row if nothing is selected and ctrl is not pressed.
(Fixes#324480, Murray Cumming/Srirama Sharma).
2006-05-28 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_cell_focus): refactor
to work correctly in RTL mode.
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): make
cursor movement to left/right work correctly in RTL mode.
2006-05-28 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_insert_column): set the sizing
type of the new column to FIXED,
(gtk_tree_view_insert_column_with_attributes): likewise. (#341898,
Dan Winship).
2006-05-26 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_queue_draw_arrow): queue a redraw
for the full width of the row, not just the width we got allocated.
(Fixes#333284, reported by Benjamin Berg).
2006-05-26 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_top_row_to_dy): set dy to
page_size + height in the event dy + page_size is about to become
bigger than height.
2006-05-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): Fix
an RTL problem with toggles in expander columns.
(#341896, Roozbeh Pournader)
Mon May 15 15:12:05 2006 Søren Sandmann <sandmann@redhat.com>
* gtk/gtklayout.c (gtk_layout_realize),
* gtk/gtkiconview.c (gtk_icon_view_realize),
* gtk/gtktreeview.c (gtk_tree_view_realize): Set the background of
the clip windows to NULL, since they are generally invisible and
don't have EXPOSURE set, which means they temp-unvlicker code
doesn't apply to them.
* gdk/x11/gdkgeometry-x11.c (_gdk_window_move_resize_child): Unset
the background of the parent window during resizing. Invalidate
the uncoered area of the parent window. Bug 341332.
2006-05-02 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_row_inserted): set tmpnode to
the return value of the _gtk_rbtree_insert* functions, since that
is the node we really want to check for visibilty.
2006-04-30 Kristian Rietveld <kris@imendio.com>
Fix for #340200, spotted by Torsten Schoenfeld.
* gtk/gtktreeview.c (gtk_tree_view_get_cell_area): fix up logic
calculating the level indentation,
(gtk_tree_view_start_editing): remove code calculating the
level indentation, since _get_cell_area() takes care of this for us.
2006-04-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_drag_begin): Don't force
the standard DND icon if the user has a custom DND source.
(#339522, Joe Wreschnig)
2006-04-26 Kristian Rietveld <kris@imendio.com>
* gtk/gtktreeview.c (node_is_visible): new function,
(validate_visible_area): when a node is validated, only queue a
redraw for that node, not for the entire widget (a redraw for the
entire widget is only needed when the sizes change, and
_queue_resize() will take care of that),
(do_validate_rows): do not queue a redraw, redraws are only needed
for changes in the visible area and validate_visible_area() takes
care of that,
(gtk_tree_view_row_inserted): for fixed height mode, only queue
a resize and redraw if the node is visible, else no redraw is needed.
2006-04-26 Kristian Rietveld <kris@imendio.com>
If this new "row-ending-details" property is turned on, more
detailed "details" will be passed to the theme engine for drawing
the background, drop indicator and focus rectangle. Requirement is
that the theme engine supports these details. (#333760).
* gtk/gtktreeview.c (gtk_tree_view_class_init): add row-ending-details
style property,
(gtk_tree_view_bin_expose): pass more detailed detail to
gtk_paint_flat_box() if the property is turned on,
(gtk_tree_view_bin_expose): likewise for the drop indicator,
(gtk_tree_view_bin_expose): likewise for the focus rectangle.
2006-04-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (selection_motion_event_handler): Remove
some unused variables.
* gtk/gtktreeview.c ((gtk_tree_view_search_position_func): Apply
a patch from David Trowbridge to improve the positioning of the
search popup. (#338047)
2006-03-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Use fg_gc to
draw the inter-row drop highlight. Also draw the line all the
way across, and flip it in RTL mode. (#334906, Ian McDonald)
2006-03-10 Federico Mena Quintero <federico@novell.com>
Make Shift-P and Shift-N activate typeahead in GtkTreeView
(i.e. they are just normal capital letters). Fixes bug #334098.
* gtk/gtktreeview.c (gtk_tree_view_add_move_binding): Add an
"add_shifted_binding" argument which determines whether we'll add
the same binding with GDK_SHIFT_MASK.
(gtk_tree_view_class_init): Use add_shifted_binding=FALSE for GDK_p
and GDK_n; use TRUE for all the rest.
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.
2006-01-24 Kristian Rietveld <kris@gtk.org>
#322591, Jonathan Blandford.
* gtk/gtktreeview.[ch] (gtk_tree_view_get_search_entry),
(gtk_tree_view_set_search_entry),
(gtk_tree_view_get_search_position_func),
(gtk_tree_view_set_search_position_func): New functions,
and small adaptions to the tree view code to allow for setting
the entry and search position function.
* gtk/gtktreeprivate.h: Removed GtkTreeViewSearchDialogPositionFunc
typedef, which is now in gtktreeview.h as
GtkTreeViewSearchPositionFunc. Add/update fields.
* gtk/gtk.symbols: Add new functions.
* tests/testtreesort.c: Add a little test for _set_search_entry().
2006-01-22 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Revert previous
commit after more searching in the bugzilla archives (see #309221).
2006-01-22 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Remove second call
to gtk_tree_view_column_cell_set_cell_data, since we also set the
cell data before iterating over the columns for exposure. (Fixes
#322471, Duncan Coutts).
2006-01-14 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate),
(validate_visible_area): fixup adjustments and top_row if the
current dy + page_size exceeds the new tree view height. (Fixes
#316689, reported by Chris Lord).
2006-01-13 Michael Natterer <mitch@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_real_expand_row)
(gtk_tree_view_real_collapse_row): don't animate the expander
arrows if gtk-enable-animations is FALSE (bug #142582).
2005-12-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_key_press): Use the correct
window when synthesizing the key event. (#323077,
Sadrul Habib Chowdhury)
(gtk_tree_view_search_key_press_event): Also listen for
GDK_ISO_Left_Tab. (#323077, Sadrul Habib Chowdhury)
2005-12-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_key_press): Free new_event
after sending it to the search entry. (#323209, Crispin Flowerday)
2005-11-29 Matthias Clasen <mclasen@redhat.com>
Properly handle model changes in GtkTreeSelection: (#322569,
Milosz Derezynski)
* gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach):
Get a reference to the model, and stop the iteration if the model
of the treeview is changed on the way.
* gtk/gtktreeprivate.h:
* gtk/gtktreeselection.c (_gtk_tree_selection_emit_changed): New
private function to emit the GtkTreeSelection::changed signal.
* gtk/gtktreeview.c (gtk_tree_view_set_model): Call
_gtk_tree_selection_emit_changed() when the model changes.
2005-11-27 Matthias Clasen <mclasen@redhat.com>
Fix two memory handling problems in GtkTreeView: (#322350,
Søren Sandmann)
* gtk/gtktreeview.c (gtk_tree_view_destroy)
(gtk_tree_view_set_model): Remove all references to nodes in
the old model.
(gtk_tree_view_real_collapse_row): Unmark expanded_collapsed_node
before removing the children.
2005-10-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): Handle
Shift-G to go to the previous match, like firefox. (#320061, Christian
Neumair)
2005-10-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_button_press): Be more
careful about initializing cell_area. (#319382, Tommi
Komulainen)
2005-10-22 Michael Natterer <mitch@imendio.com>
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
widget being realized, in addition to being visible, to avoid
running into precondition check in gtk_tree_view_get_cell_area().
(approved by Kris).
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().