2004-03-05 Federico Mena Quintero <federico@ximian.com>
Fixes#136082 and #135265, patch by Morten Welinder.
* configure.in: Use AC_SYS_LARGEFILE.
* */*.c: #include <config.h>
Tue Mar 2 16:18:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_reorder)
* gtk/gtkliststore.c (gtk_list_store_reorder): Fix
up the interpretation of new_order to match what
it means elsewhere, document the meaning of new_order.
* gtk/gtkcombobox.c (gtk_combo_box_model_rows_reordered):
Fix interpretation of new_order.
* tests/testcombochange.c (on_reorder): Fix interpretation
of new_order.
* tests/testcombochange.c (on_reorder): Fix hitting
"reorder" with an empty list.
Wed Sep 10 01:06:44 2003 Kristian Rietveld <kris@gtk.org>
Big TreeView DnD fixage, makes drops on empty models work, makes
TreeStore DnD work and gets rid of gtk-tree-model-drop-append.
Related bugs #95362 and #113314. I don't want to touch this code
ever again.
* gtk/gtktreeprivate.h (GtkTreePrivate): add empty_view_drop field.
* gtk/gtktreednd.c (gtk_tree_get_row_drag_data): add check
for selection_data->length.
* gtk/gtktreeview.c (struct DestRow), (dest_row_free),
(set_dest_row), (get_dest_row): we don't store just the row ref
anymore, but a struct with the row ref and additional info,
(set_destination_row): handle drops on empty space and some
style fixes,
(get_logical_dest_row): also return path_down_mode/drop_append_mode
flags, handle dropping childs on their new parents, rewrite
drop append handling into something saner,
(gtk_tree_view_drag_motion): show a "drop possible arrow" on empty
spaces,
(gtk_tree_view_drag_drop): updates for updated backend,
(gtk_tree_view_drag_data_received): updates for updated backend,
path down mode (treestore DnD) handling,
(gtk_tree_view_set_drag_dest_row): set empty_view_drop flag,
when we are trying to drop a row on an empty model,
(gtk_tree_view_get_drag_dest_row): handle empty_view_drop flag.
* gtk/gtkliststore.c (gtk_list_store_drag_data_received),
(gtk_list_store_row_drop_possible): style and drop-append fixes.
* gtk/gtktreestore.c (gtk_tree_store_drag_data_received): ditto.
2002-12-29 Murray Cumming <murrayc@usa.net>
Fixes#102168.
* gtk/gtkliststore.c, gtktreednd.c, gtktreestore.c:
Actually implement the GtkTreeDragSource::row_draggable virtual
function in GtkListStore and GtkTreeStore instead of just checking
whether it's implemented at all. This means that DnD isn't broken by
gtkmm's virtual function wrappers. The alternative would be to
hard-code the TRUE return value into gtkmm's wrappers, but that's
part of GTK+'s implementation, not it's API.
annoying everybody I will write a short summary here.
Fixes for: #102890, #103198, #102618, #93629, #100172, #101235, #96650,
#102379.
Other than that also a ListStore fix and a TreeView scrolling fix.
Those interested in the hairy details can checkout gtk+/ChangeLog.
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
Wed Nov 20 19:29:50 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkrbtree.c (gtk_rbtree_reorder_sort_func): return a value
in the range of [-1, 1] instead [0, 1],
(gtk_rbtree_reorder_invert_func): ditto,
This makes treeview reordering working on platforms as FreeBSD and
solaris, thanks go to Heiner Eichmann for finding this out and
sending in a patch (#98251).
Wed Nov 20 19:27:07 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreestore.c (node_free): only free the data list if
node->data is not NULL,
(gtk_tree_store_remove): free the data list from the node if
needed. (#94728, pointed out by Peter Bloomfield).
Wed Nov 20 19:23:13 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_remove_column): stop editing
and set the edited_column to NULL if edited_column is set.
(#91288, modified patch from Josh Parsons).
Wed Nov 20 19:20:34 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): do a full
redraw if vadjustment->value is bigger than tree_view->priv->height,
(gtk_tree_view_row_deleted): free the row ref if it isn't valid
anymore. (#83726, reported by Robert Kinsella).
Mon Nov 18 20:42:27 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_expand_to_path): modify and
free tmp instead of path ... (patch from #97927).
Mon Nov 18 20:31:20 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing):
only _set_text if celltext->text is not NULL. (#97815, reported
and testcase provided by Vitaly Tishkov).
Mon Nov 18 20:28:28 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeselection.c (gtk_tree_selection_real_modify_range):
also update the anchor_path, makes behaviour consistent with the
other selection modification functions. (#96801, reported and
testcase provided by Vitaly Tishkov).
Mon Nov 18 20:17:56 2002 Kristian Rietveld <kris@gtk.org>
Hrm, this fixes up lots of mistakes in my swap/move code ... Some
of these mistakes where pointed out by Vitaly Tishkov in bugs
#97403, #97404, #97412, #97618.
* gtktreestore.[ch]: gtk_tree_store_move is now private, use
gtk_tree_store_move_{before,after} instead now. Lots of fixes
(more like a rewrite :) in the _move and _swap functions.
* gtkliststore.[ch]: likewise.
Tue Oct 15 00:53:14 2002 Kristian Rietveld <kris@gtk.org>
Behaviour change, apply changes if the entry of the editable gets
a focus out event (#82405).
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
new function,
(gtk_cell_renderer_text_start_editing): stop editing and apply
changes on focus-out.
Tue Oct 15 00:47:35 2002 Kristian Rietveld <kris@gtk.org>
Fixes an *evil* GtkTreeModelSort bug, #93629.
* gtk/gtktreemodel.c (release_row_references): return if the
refs->list is NULL.
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_changed): if we
are swapping two rows (re-insertion on row_changed), also *emit*
a rows_reordered signal. oops.
Tue Oct 15 00:45:03 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_remove_silently): free
the actual link after the node has been removed (#92014).
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_column_finalize):
free the cell_list and the child if the exists (#92014).
Tue Oct 15 00:40:25 2002 Kristian Rietveld <kris@gtk.org>
Don't accept drops if the model has been sorted, #93758)
* gtk/gtkliststore.c (gtk_list_store_row_drop_possible): return
FALSE if the list has been sorted.
* gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): check
if drag_dest is a TreeStore, return FALSE if the tree has been
sorted.
Tue Oct 15 00:33:59 2002 Kristian Rietveld <kris@gtk.org>
Compiler warning fixage, (#85858, #85859, #85860, #85872)
* gtk/gtkcellrendererpixbuf (gtk_cell_renderer_pixbuf_render):
s/guint/GtkCellRendererState/.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
ditto.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render),
(gtk_cell_renderer_toggle_activate): ditto.
* gtk/gtkliststore.c (gtk_list_store_get_flags): a
s/guint/GtkTreeModelFlags/ on the return type.
Fri Jul 26 22:53:37 2002 Kristian Rietveld <kris@gtk.org>
API additions: _move, _reorder and _swap for stores, path
constructor.
* gtk/gtktreemodel.[ch] (gtk_tree_path_new_from_indices): new function.
* gtk/gtkliststore.[ch]: added gtk_list_store_reorder_func (private),
gtk_list_store_reorder, gtk_list_store_swap, gtk_list_store_move.
* gtk/gtktreestore.[ch]: added gtk_tree_store_reorder_func (private),
gtk_tree_store_reorder, gtk_tree_store_swap, gtk_tree_store_move.
Fri Jul 26 22:32:57 2002 Kristian Rietveld <kris@gtk.org>
Merge from stable:
* gtk/gtktreestore.c (node_free): return FALSE,
(gtk_tree_store_finalize): use g_node_traverse instead of
g_node_children_foreach, so the whole tree will be freed (#88854,
patch from Emmanuel Briot).
Fri Jul 26 22:32:24 2002 Kristian Rietveld <kris@gtk.org>
Merge from stable:
* gtk/gtktreeview.c (gtk_tree_view_button_press): fix some memleaks,
(#84426, patch from Matthias Clasen).
Fri Jul 26 22:31:25 2002 Kristian Rietveld <kris@gtk.org>
Merge from stable:
* gtk/gtktreeview.c (gtk_tree_view_unref_tree_helper): _iter_children
check shouldn't be in g_return_return_val_if_fail (pointed out by
Josh Green, #88997),
(gtk_tree_view_set_model): call _gtk_tree_view_column_unset_model
for each column when we unset the model (part of #82484),
(gtk_tree_view_get_cell_area): return if we ran out of tree or
if we got an invalid path (#82376).
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_unset_model.
* gtk/gtktreeviewcolumn.c: implement _gtk_tree_view_column_unset_model
which disconnects the sort_column_changed_signal (part of #82484).
* gtk/gtkliststore.c (gtk_list_store_insert): append row if the
given postion is off the end of the tree (#85813).
* gtk/gtkentry.c (gtk_cell_editable_key_press_event): let's use
2-space indent, commit changes if up/down keys has been pressed,
this overrides the focus key foo so the user won't be surprised
(#84665).
Mon Jul 1 17:04:09 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_real_set_value): sync up
white space/variable names to match tree_store equiv.
* gtk/gtktreestore.c (gtk_tree_store_real_set_value): sort if we
set the value.
Thu Jun 13 16:42:40 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreestore.c (gtk_tree_store_finalize): traverse all nodes,
not just the leafs (pointed out by Josh Parsons)
Tue Jun 4 19:24:41 2002 Kristian Rietveld <kris@gtk.org>
Discussed in #76249.
* gtk/gtkliststore.[ch]: made gtk_list_store_remove return a gboolean,
added gtk_list_store_iter_is_valid.
* gtk/gtktreestore.[ch]: made gtk_tree_store_remove return a gboolean,
added gtk_tree_store_iter_is_valid.
* gtk/gtktreemodelsort.[ch]: added VALID_ITER macro as in liststore
and treestore sources, added gtk_tree_model_sort_iter_is_valid.
Thu May 16 23:59:56 2002 Kristian Rietveld <kris@gtk.org>
Merged from gtk-2-0.
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed): set the prev
of the next node correctly, so we don't corrupt the list and cause
bad things. (fixes#71374)
Fri Mar 8 20:41:51 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreestore.c (gtk_tree_store_drag_data_received): handle
gtk-tree-model-drop-append like the ListStore, includes some
tweaks to work right with trees
Thu Mar 7 21:32:01 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed): increase
value of new_location by one if cmp_a > 0 and we hit the end of
the list.
Thu Mar 7 02:58:16 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/tmpl/gtkliststore.sgml: start implementing
* gtk/question_index.sgml: "I can set with the tree, but not
get???!?!"
Wed Mar 6 23:20:51 2002 Jonathan Blandford <jrb@redhat.com>
and Kristian Rietveld <kris@gtk.org>
Finishing touch for 2.0.0 release, fixes#70782, #72729, the
'stealth' bug and other last-minute minor issues.
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): set dnd dest line
drawing right. We can't draw the line at the position of the next
row, because that one still has to be drawn. So draw everthing at
a -1 offset.
(validate_visible_area): add check for invalid descendants and
NULL scroll_to_path path, get scrolling right. Also, fix the
area_above value. Pretty amazing I got it wrong.
(get_logical_dest_row): add gtk-tree-model-drop-append magic, so
dragging a row to the end of the model works right.
(gtk_tree_view_get_dest_row_at_pos): minor floating point fix
(gtk_tree_view_start_editing): add call to validate_row
(gtk_tree_view_tree_to_widget_coords): Never subtract
HEADER_HEIGHT from y values anymore!!!
(gtk_tree_view_widget_coords_to_tree): ditto.
(gtk_tree_view_scroll_to_point): allow -1 as values for the
scroll_to coords
(gtk_tree_view_move_cursor_page_up_down): Don't need scroll_to_y
as clamp_node_visible will make it work.
* gtk/gtktreestore.c (gtk_tree_store_drag_data_received): also check
path depth, as we can't get iters from empty paths
* gtk/gtkliststore.c (gtk_list_store_drag_data_received): handle
gtk-tree-model-drop-append
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): free path_str
* tests/testtreeflow.c (main): select path where we are scrolling to
Sun Mar 3 06:39:19 2002 Tim Janik <timj@gtk.org>
* gtk/gtkfilesel.c: added compile time switch to put the tree views
into a hpaned for owen to play with.
* gtk/gtktreedatalist.c (_gtk_tree_data_list_header_free):
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_cell_data_func),
(gtk_tree_view_column_finalize):
* gtk/gtktreestore.c (gtk_tree_store_set_default_sort_func),
(gtk_tree_store_set_sort_func), (gtk_tree_store_finalize):
* gtk/gtktreeselection.c (gtk_tree_selection_finalize):
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func),
(gtk_tree_model_sort_set_default_sort_func),
(gtk_tree_model_sort_set_sort_func):
* gtk/gtkliststore.c (gtk_list_store_set_default_sort_func),
(gtk_list_store_set_default_sort_func),
(gtk_list_store_set_sort_func), (gtk_list_store_finalize):
add reentrancy protection around destroy() function invocation.
* gtk/gtktreeselection.c (gtk_tree_selection_set_select_function): fix
destroy function invocation (which was missing).
Fri Feb 15 19:38:00 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreestore.c (gtk_tree_store_clear_traverse): new function
(gtk_tree_store_clear): traverse the tree, so we emit row_deleted
for every node. This way we don't have confused row refs crashing the
application. (#70631)
Wed Jan 30 20:15:49 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_set_valist): save last minute
changes before committing.
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the
signal if an interesting column changes.
* gtk/gtktreestore.c: ditto.
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so
that it no longer grabs
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreestore.c: add some more stamp checks (pointed out
by Anders Carlsson)
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
assume _row_changed will insert sort (because _row_changed doesn't
need to follow this signal), so apply insert sort here
(gtk_tree_model_sort_level_find_insert): header doesn't need to be
set here, so use a return instead of g_return_val_if_fail.
Tue Jan 8 18:39:23 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): wow!
Am I a moron or what 0 < 1 is not equivalent to strcmp ("a", "b")
Tue Nov 13 21:00:59 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_class_init): new
"model" construct property for language bindings.
* gtk/gtktreestore.c (gtk_tree_store_set_column_types): New
function to let you set the column types of a GtkTreeStore for
language bindings.
* gtk/gtkliststore.c (gtk_list_store_set_column_types): ditto.
Mon Nov 5 22:34:29 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreednd.[ch] (struct _GtkTreeDragSourceIface):
Add row_draggable() vfunc, and wrapper function.
* gtk/gtktreednd.[ch] (struct _GtkTreeDragDestIface): Make
row_drop_possible take a GtkSelectionData, rather than
model/row pair.
* gtk/gtktreestore.c gtk/gtkliststore.c: Update for
new DND interfaces.
* gtk/gtktreeview.[ch]: Remove the row_draggable_func
location_dropable_func from gtk_tree_view_set_rows_drag_source/dest.
and rename them to enable_model_drag_source/dest.
* gtk/treeviewcolumn.c: Add DND of columns between rows.
Still can't drop _to_ the left tree, but other places
work.
* gtk/gtktreeview.c (unset_reorderable): Unset the
reorderable property if unset/enable_model_drag_source/dest
are called manually.
* gtk/gtktreestore.c (gtk_tree_store_row_drop_possible):
Correct for change in depth count handling.
* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
Pass in a expose area to gtk_tree_view_column_cell_render()
Wed Oct 31 16:53:48 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreednd.c (gtk_tree_set_row_drag_data): rename
gtk_selection_data_set_tree_row, #60218
(gtk_tree_get_row_drag_data): rename
gtk_selection_data_get_tree_row, #60218
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): Actually
get this right, after the third try, #63122.
2001-10-27 Hans Breuer <hans@breuer.org>
* gtk/gtkbbox.c gtk/gtkctree.c gtk/gtkhbbox.c
gtk/gtkimmulticontext.c gtk/gtklabel.c gtk/gtkliststore.c
gtk/gtkmenu.c gtk/gtkpaned.c gtk/gtkrc.c gtk/gtkscale.c
gtk/gtkstyle.c gtk/gtktextbuffer.c gtk/gtktextlayout.c
gtk/gtktexttag.c gtk/gtktexttagtable.c gtk/gtktextview.c
gtk/gtktreestore.c gtk/gtkvbbox.c :
to simplify parsing for exported functions:
- made implementation signature static, when the local
prototype already was
- put the functions return value on it's own line
- added as space between the function name and the
opening bracket
* gtk/gtk.def : added the remaining exported functions
Mon Oct 22 15:17:05 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_iter_depth): Realized
g_node_depth is broken, and that it's not worth being consistent
with it.
Thu Oct 18 14:22:10 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_remove): fix small bug
reported by (Oleg Maiboroda), #62600
Tue Oct 9 17:40:24 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_finalize): We're a gobject,
not a GtkObject. Thanks andersca.
* gtk/gtkliststore.c (gtk_list_store_finalize): ditto