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.