aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree-table-adapter.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tag 'GHEX_2_0_0'.GHEX_2_0_0nobody2002-12-281-1183/+0
| | | | svn path=/tags/GHEX_2_0_0/; revision=19188
* remove ref/unref G_OBJECT masks ditto ditto ditto ditto ditto ditto dittoMike Kestner2002-11-061-2/+2
| | | | | | | | | | | | | | | | 2002-11-05 Mike Kestner <mkestner@ximian.com> * e-cell-text.c : remove ref/unref G_OBJECT masks * e-table-extras.c : ditto * e-table-header-item.c : ditto * e-table-item.c : ditto * e-table-memory-store.c : ditto * e-table-one.c : ditto * e-tree-sorted.c : ditto * e-tree-table-adapter.c : ditto * e-tree.c : ditto svn path=/trunk/; revision=18572
* use GObject api for models GObjectify GObjectify GObjectify GObjectifyMike Kestner2002-11-051-59/+55
| | | | | | | | | | | | | | | | | | | | | 2002-11-05 Mike Kestner <mkestner@ximian.com> * e-table-item.c : use GObject api for models * e-table-memory-callbacks.[ch] : GObjectify * e-table-memory-store.[ch] : GObjectify * e-table-memory.[ch] : GObjectify * e-table-model.[ch] : GObjectify * e-table-one.[ch] : GObjectify * e-table-simple.[ch] : GObjectify * e-tree-memory.[ch] : GObjectify * e-tree-model.[ch] : GObjectify * e-tree-selection-model.c : use GObject api for models * e-tree-simple.[ch] : GObjectify * e-tree-sorted.[ch] : GObjectify * e-tree-table-adapter.[ch] : GObjectify * e-tree.c : use GObject api for models svn path=/trunk/; revision=18553
* merging the gal-2 branch back to the trunk.Mike Kestner2002-11-011-4/+12
| | | | | | merging the gal-2 branch back to the trunk. svn path=/trunk/; revision=18471
* And finally here.Jeffrey Stedfast2002-08-071-19/+2
| | | | | | | | | | | | | | | | | | | 2002-08-06 Jeffrey Stedfast <fejj@ximian.com> * e-tree-table-adapter.c (e_tree_table_adapter_save_expanded_state): And finally here. * e-table-state.c (e_table_state_save_to_file): Same here. * e-table-specification.c (e_table_specification_save_to_file): No need to save to a temp file first here either since e_xml_save_file now does that for us. * e-table.c (e_table_save_specification): No need to handle writing to a temp file first anymore, since I've updated e_xml_save_file() to handle that for us. svn path=/trunk/; revision=17724
* #include <string.h> for memsetJeffrey Stedfast2002-08-071-7/+29
| | | | | | | | | | | | | | | | | | | | 2002-08-06 Jeffrey Stedfast <fejj@ximian.com> * e-cell-progress.c: #include <string.h> for memset * e-table.c (e_table_save_specification): Updated to use e_xml_save_file() instead of xmlSaveFile(). Also fixed to save to a tmp file first. * e-table-specification.c (e_table_specification_save_to_file): Same as above. * e-table-state.c (e_table_state_save_to_file): Same here. * e-tree-table-adapter.c (e_tree_table_adapter_save_expanded_state): And here too. svn path=/trunk/; revision=17717
* Made these able to find the potential row for a new node which will be theChristopher James Lahey2002-07-191-3/+8
| | | | | | | | | | | | 2002-07-19 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (find_next_node, find_first_child_node): Made these able to find the potential row for a new node which will be the last row. (find_row_num): Made this handle find_next_node and find_first_child_node returning n_map. svn path=/trunk/; revision=17517
* Added debugging printfs.Christopher James Lahey2002-06-051-1/+3
| | | | | | | | | | | | | | | | 2002-06-05 Christopher James Lahey <clahey@ximian.com> * e-tree-model.c (d): Added debugging printfs. * e-tree-sorted.c (ets_proxy_node_changed, ets_proxy_node_data_changed, ets_proxy_node_col_changed, ets_proxy_node_inserted): Added a bunch of e_tree_model_no_change signals where appropriate. * e-tree-table-adapter.c (etta_proxy_node_changed): Added an e_table_model_no_change signal where appropriate. svn path=/trunk/; revision=17116
* Added would_be_expanded refactoring code out of is_expanded.Christopher James Lahey2002-05-251-16/+22
| | | | | | | | | | | | 2002-05-24 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (e_tree_table_adapter_node_would_be_expanded, e_tree_table_adapter_node_is_expanded): Added would_be_expanded refactoring code out of is_expanded. (find_first_child_node_maybe_deleted): Use the new function. svn path=/trunk/; revision=17016
* Check for path being NULL.Christopher James Lahey2002-05-211-1/+14
| | | | | | | | | | | | | 2002-05-21 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c (ets_proxy_node_request_collapse): Check for path being NULL. * e-tree-table-adapter.c (e_tree_table_adapter_load_expanded_state): Rebuild the tree after loading the state. svn path=/trunk/; revision=16963
* Changed a lot of direct uses in this file of node->is_expanded to call theChristopher James Lahey2002-05-141-70/+76
| | | | | | | | | | | | | | | | 2002-05-13 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c: Changed a lot of direct uses in this file of node->is_expanded to call the function e_tree_table_adapter_node_is_expanded instead. (e_tree_table_adapter_node_is_expanded): Improved this function to know if the root node is visible and always return it as being expanded if it's not. It also doesn't bother creating nodes if they don't exist yet, and instead figures out whether they would be expanded if they were to be created and returns that value instead. svn path=/trunk/; revision=16768
* Bump file version to 2. (This will make older versions of gal ignore theDan Winship2002-05-101-4/+12
| | | | | | | | | | | | | | * e-tree-table-adapter.c (e_tree_table_adapter_save_expanded_state): Bump file version to 2. (This will make older versions of gal ignore the file, fixing the problem where going from evo HEAD to evo 1.0.x makes the folder tree disappear.) Store the default expanded state in the file now to prevent this from happening again in the future. (e_tree_table_adapter_load_expanded_state): Deal with version 2. If the model's default expansion state doesn't match the saved state, ignore the save file. svn path=/trunk/; revision=16736
* Ansification patch from danw.Christopher James Lahey2002-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 2002-04-25 Christopher James Lahey <clahey@ximian.com> * e-cell-checkbox.c, e-cell-combo.c, e-cell-date.c, e-cell-float.c, e-cell-number.c, e-cell-pixbuf.c, e-cell-popup.c, e-cell-size.c, e-cell-spin-button.c, e-cell-text.c, e-cell-toggle.c, e-cell-tree.c, e-cell.c, e-cell.h, e-table-click-to-add.c, e-table-col.c, e-table-column-specification.c, e-table-config-field.c, e-table-config.c, e-table-extras.c, e-table-field-chooser-dialog.c, e-table-field-chooser-item.c, e-table-field-chooser.c, e-table-group-container.c, e-table-group-leaf.c, e-table-group.c, e-table-header-item.c, e-table-header.c, e-table-item.c, e-table-memory-callbacks.c, e-table-model.c, e-table-scrolled.c, e-table-selection-model.c, e-table-sort-info.c, e-table-sorted-variable.c, e-table-sorted.c, e-table-sorter.c, e-table-specification.c, e-table-state.c, e-table-subset-variable.c, e-table-subset.c, e-table-without.c, e-table.c, e-table.h, e-tree-scrolled.c, e-tree-selection-model.c, e-tree-sorted-variable.c, e-tree-sorted.c, e-tree-table-adapter.c, e-tree.c: Ansification patch from danw. svn path=/trunk/; revision=16586
* Handle a collapse request by marking all descendents of that node asChristopher James Lahey2002-03-091-30/+43
| | | | | | | | | | | | | | | | | | | | 2002-03-08 Christopher James Lahey <clahey@ximian.com> * e-tree-memory.c (etmm_node_request_collapse): Handle a collapse request by marking all descendents of that node as needing their children recomputed. * e-tree-model.c, e-tree-model.h (e_tree_model_node_request_collapse): Added this signal to request that the view of your tree collapse this node. * e-tree-selection-model.c (etsm_selected_count): Pass the root of the sorted model here instead of the root of the base model. * e-tree-table-adapter.c (etta_proxy_node_request_collapse): Handle a collapse request by collapsing the node in the tree. svn path=/trunk/; revision=15990
* Added frozen_count variable to know not to show the cursor while a changeChristopher James Lahey2001-10-311-13/+49
| | | | | | | | | | | | | | | | | | | | | | | 2001-10-31 Christopher James Lahey <clahey@ximian.com> * e-table-item.c, e-table-item.h: Added frozen_count variable to know not to show the cursor while a change is going on. * e-table-model.c, e-table-model.h, e-tree-model.c, e-tree-model.h: Added a model_no_change signal to pair with a pre_change if there's no change. * e-table-selection-model.h: Removed an unused frozen field here. * e-table-sorted.c, e-table-subset.c, e-table-subset.h, e-table-without.c, e-tree-memory.c, e-tree-sorted.c, e-tree-table-adapter.c: Made sure pre_changes were all matched by some change. Proxy no_change signal where appropriate. * e-tree-selection-model.c: Keep track of the frozen_count variable to know whether a change is going on. svn path=/trunk/; revision=14523
* Don't go outside the table looking for matches when doing the last_accessChristopher James Lahey2001-10-301-2/+3
| | | | | | | | | | | 2001-10-29 Christopher James Lahey <clahey@ximian.com> * e-table-subset.c (etss_get_view_row), e-tree-sorted.c (check_last_access), e-tree-table-adapter.c (find_row_num): Don't go outside the table looking for matches when doing the last_access search. svn path=/trunk/; revision=14359
* Changed the license announcement at the top of these files.Christopher James Lahey2001-10-271-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-26 Christopher James Lahey <clahey@ximian.com> * e-cell-checkbox.c, e-cell-checkbox.h, e-cell-combo.c, e-cell-combo.h, e-cell-date.c, e-cell-date.h, e-cell-number.c, e-cell-number.h, e-cell-pixbuf.c, e-cell-pixbuf.h, e-cell-popup.c, e-cell-popup.h, e-cell-size.c, e-cell-size.h, e-cell-spin-button.c, e-cell-spin-button.h, e-cell-string.c, e-cell-text.c, e-cell-text.h, e-cell-toggle.c, e-cell-toggle.h, e-cell-tree.c, e-cell-tree.h, e-cell.c, e-cell.h, e-table-click-to-add.c, e-table-click-to-add.h, e-table-col-dnd.h, e-table-col.c, e-table-col.h, e-table-column-specification.c, e-table-column-specification.h, e-table-column.c, e-table-config-field.c, e-table-config-field.h, e-table-config.c, e-table-config.h, e-table-defines.h, e-table-example-1.c, e-table-example-2.c, e-table-extras.c, e-table-extras.h, e-table-field-chooser-dialog.c, e-table-field-chooser-dialog.h, e-table-field-chooser-item.c, e-table-field-chooser-item.h, e-table-field-chooser.c, e-table-field-chooser.h, e-table-group-container.c, e-table-group-container.h, e-table-group-leaf.c, e-table-group-leaf.h, e-table-group.c, e-table-group.h, e-table-header-item.c, e-table-header-item.h, e-table-header-utils.c, e-table-header-utils.h, e-table-header.c, e-table-header.h, e-table-item.c, e-table-item.h, e-table-memory-callbacks.c, e-table-memory-callbacks.h, e-table-memory.c, e-table-memory.h, e-table-model.c, e-table-model.h, e-table-one.c, e-table-one.h, e-table-scrolled.c, e-table-scrolled.h, e-table-selection-model.c, e-table-selection-model.h, e-table-simple.c, e-table-simple.h, e-table-size-test.c, e-table-sort-info.c, e-table-sort-info.h, e-table-sorted-variable.c, e-table-sorted-variable.h, e-table-sorted.c, e-table-sorted.h, e-table-sorter.c, e-table-sorter.h, e-table-sorting-utils.c, e-table-sorting-utils.h, e-table-specification.c, e-table-specification.h, e-table-state.c, e-table-state.h, e-table-subset-variable.c, e-table-subset-variable.h, e-table-subset.c, e-table-subset.h, e-table-tooltip.h, e-table-tree.h, e-table-utils.c, e-table-utils.h, e-table-without.c, e-table-without.h, e-table.c, e-table.h, e-tree-memory-callbacks.c, e-tree-memory-callbacks.h, e-tree-memory.c, e-tree-memory.h, e-tree-model.c, e-tree-model.h, e-tree-scrolled.c, e-tree-scrolled.h, e-tree-selection-model.c, e-tree-selection-model.h, e-tree-simple.c, e-tree-simple.h, e-tree-sorted-variable.c, e-tree-sorted-variable.h, e-tree-sorted.c, e-tree-sorted.h, e-tree-table-adapter.c, e-tree-table-adapter.h, e-tree.c, e-tree.h, table-test.c, table-test.h, test-check.c, test-cols.c, test-table.c: Changed the license announcement at the top of these files. * e-cell-string.c: Removed unused file. svn path=/trunk/; revision=14154
* Make this check immediately for whether to show the cursor, instead of inChristopher James Lahey2001-10-231-0/+1
| | | | | | | | | | | | | 2001-10-22 Christopher James Lahey <clahey@ximian.com> * e-table-item.c (eti_idle_maybe_show_cursor): Make this check immediately for whether to show the cursor, instead of in the idle handler. * e-tree-table-adapter.c (e_tree_table_adapter_node_set_expanded): Added a pre_change here since we send two changes. svn path=/trunk/; revision=13931
* Added bounds checking in a number of places. (etta_init): Initialize allChristopher James Lahey2001-10-171-17/+41
| | | | | | | | | | | | 2001-10-16 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (find_next_node_maybe_deleted, find_first_child_node_maybe_deleted, find_next_node, find_first_child_node, find_row_num): Added bounds checking in a number of places. (etta_init): Initialize all the fields here. svn path=/trunk/; revision=13712
* *.c s/->childs/->xmlChildrenNode/g;Michael Meeks2001-10-051-1/+1
| | | | | | | | 2001-10-06 Michael Meeks <michael@ximian.com> * *.c s/->childs/->xmlChildrenNode/g; svn path=/trunk/; revision=13431
* Bumped version number to 0.11.99.4.Christopher James Lahey2001-09-171-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-16 Christopher James Lahey <clahey@ximian.com> * configure.in: Bumped version number to 0.11.99.4. * gal/e-text/e-completion-view.c (e_completion_view_construct), tests/test-table-1.c (create_table): Changed the parameters to e_table_simple_new here to adjust to changes in the interface. * gal/widgets/e-categories-master-list-array.c (ecmla_default): Fixed a memory leak here. * gal/widgets/e-categories.c (e_categories_get_save_id): Added get_save_id here so that selection would be maintained across changes. From gal/e-table/ChangeLog: 2001-09-16 Christopher James Lahey <clahey@ximian.com> * e-table-model.c, e-table-model.h (e_table_model_class_init): Rearranged order of has_save_id and get_save_id to be more consistent with ETree. * e-table-selection-model.c, e-table-selection-model.h: Turned on the code to maintain selection and cursor across changes if the model supports get_save_id. * e-table-simple.c, e-table-simple.h: Changed this interface to take all of the ETableModel functions in the _new function. * e-table-subset.c (etss_has_save_id, etss_get_save_id): Added these to properly proxy the save_id functionality. * e-tree-memory-callbacks.c, e-tree-memory-callbacks.h, e-tree-model.c, e-tree-model.h, e-tree-sorted.c: Made the save_id parameter to get_node_by_id be const char * instead of char *. * e-tree-table-adapter.c (etta_class_init): Rearranged some assignments here to be more consistent. svn path=/trunk/; revision=12869
* Rename these functions from ecn_get_text and ecn_free_text.Christopher James Lahey2001-09-011-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-01 Christopher James Lahey <clahey@ximian.com> * e-cell-float.c (ecf_get_text, ecf_free_text): Rename these functions from ecn_get_text and ecn_free_text. * e-cell-tree.c (ect_height): Make sure the height is a multiple of two here. * e-table-header-item.c, e-table-header-item.h: Added a "tree" argument so that the sorting can be set by right clicking on the header item. * e-table-item.c (eti_table_model_rows_deleted): Added some assertions here. * e-tree-selection-model.c (etsm_find_node_unless_equals): Fixed indentation. * e-tree-table-adapter.c (etta_proxy_node_changed): Rewrote this to be more readable. (e_tree_table_adapter_node_set_expanded): Added an assertion. * e-tree.c, e-tree.h (e_tree_get_spec): Added this function. (e_tree_setup_header): Set the tree argument on the ETableHeaderItem here. svn path=/trunk/; revision=12553
* e_tree_table_adapter_node_at_row would have pulled data from one past theChristopher James Lahey2001-08-041-6/+8
| | | | | | | | | | | 2001-08-03 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (e_tree_table_adapter_node_at_row): e_tree_table_adapter_node_at_row would have pulled data from one past the end of its array if you asked it to and the root was hidden. Fixed it. Fixes Ximian bug #4761. svn path=/trunk/; revision=11647
* Ignore set_expanded if the node is the root and root_visible is FALSE.Christopher James Lahey2001-07-131-0/+3
| | | | | | | | | | | | | 2001-07-12 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (e_tree_table_adapter_node_set_expanded): Ignore set_expanded if the node is the root and root_visible is FALSE. * e-tree.c (item_key_press): Don't call set_expanded on NULL paths. svn path=/trunk/; revision=11061
* Added checks for if row is outside of the appropriate range.Christopher James Lahey2001-07-071-0/+4
| | | | | | | | | 2001-07-06 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (e_tree_table_adapter_node_at_row): Added checks for if row is outside of the appropriate range. svn path=/trunk/; revision=10878
* Made this return -1 instead of -2 for not found if the root is notChristopher James Lahey2001-04-261-2/+7
| | | | | | | | | | | | | 2001-04-25 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (e_tree_table_adapter_row_of_node): Made this return -1 instead of -2 for not found if the root is not visible. * e-tree-selection-model.c (etsm_row_foreach_cb): Made this accept any negative number as not found instead of just -1. svn path=/trunk/; revision=9562
* Upped the version number to 0.6.99.0. Upped the so number to 6.Christopher James Lahey2001-04-131-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-12 Christopher James Lahey <clahey@ximian.com> * configure.in: Upped the version number to 0.6.99.0. Upped the so number to 6. * docs/etablexml.txt: Made some updates here. * tests/test-tree-1.c, tests/test-tree-3.c: Added NULL, NULL to the call to e_tree_memory_callbacks_new. From gal/e-table/ChangeLog: 2001-04-12 Christopher James Lahey <clahey@ximian.com> * e-table-item.c (eti_cursor_change): Only move the screen to show the cursor if there are no changes pending. Updated the commented out code for alternating colors a bit. * e-table-model.c, e-table-model.h: Added e_table_model_has_change_pending. * e-tree-memory-callbacks.c, e-tree-memory-callbacks.h: Added has_get_node_by_id and get_node_by_id. * e-tree-model.c, e-tree-model.h: Added e_tree_model_has_get_node_by_id and e_tree_model_get_node_by_id. Added e_tree_model_has_change_pending. * e-tree-selection-model.c: Handle the selection and cursor properly across the tree changing. * e-tree-sorted.c: Implemented has_get_node_by_id and get_node_by_id, and has_changes_pending. * e-tree-table-adapter.c: Implemented has_changes_pending. Fixed an array underflow. svn path=/trunk/; revision=9289
* Make it so you can switch checking around the last access on and off forChristopher James Lahey2001-04-041-0/+2
| | | | | | | | | | | | | 2001-04-04 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c: Make it so you can switch checking around the last access on and off for tuning purposes. * e-tree-table-adapter.c: Apparently, ETreeTableAdapter is much faster if the value_at function doesn't change the last_access variable. svn path=/trunk/; revision=9170
* Added e_tree_selection_model_select_single_path and made selection_startChristopher James Lahey2001-04-041-2/+18
| | | | | | | | | | | | | | | | | | | | 2001-04-04 Christopher James Lahey <clahey@ximian.com> * e-tree-selection-model.c, e-tree-selection-model.h: Added e_tree_selection_model_select_single_path and made selection_start be the path as it should be instead of the row. * e-tree-sorted.c: Added a last_access variable to speed up access. * e-tree-table-adapter.c: Made checking last_access look at the 10 values before and after the listed value to look for the value requested. * e-tree.c: Call e_tree_selection_model_select_single_path if E_TREE_USE_TREE_SELECTION. svn path=/trunk/; revision=9169
* Fix headers. Ditto. Ditto. Ditto. Ditto. Ditto. Ditto. Ditto. Ditto.Kjartan Maraas2001-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-04 Kjartan Maraas <kmaraas@gnome.org> * e-cell-date.c: Fix headers. * e-cell-number.c: Ditto. * e-cell-pixbuf.[ch]: Ditto. * e-cell-size.c: Ditto. * e-cell-text.c: Ditto. * e-cell-tree.c: Ditto. * e-table-click-to-add.[ch]: Ditto. * e-table-column-specification.h: Ditto. * e-table-config-field.c: Ditto. * e-table-config.[ch]: Ditto. * e-table-example-2.c: Ditto. * e-table-field-chooser-dialog.[ch]: Ditto. * e-table-field-chooser-item.c: Ditto. * e-table-field-chooser.h: Ditto. * e-table-group-container.c: Ditto. * e-table-item.c: Ditto * e-table-memory.c: Ditto. * e-table-selection-model.c: Ditto. * e-table-sorter.c: Ditto. * e-table-subset-variable.c: Ditto. * e-table.c: Ditto. * e-tree-memory.c: Ditto. * e-tree-model.c: Ditto. * e-tree-selection-model.[ch]: Ditto. * e-tree-sorted-variable.c: Ditto. * e-tree-sorted.c: Ditto. * e-tree-table-adapter.c: Ditto. * e-tree.[ch]: Same here. svn path=/trunk/; revision=9164
* Fixed an off by one error.Richard Hult2001-04-041-1/+1
| | | | | | | | | 2001-04-03 Richard Hult <rhult@codefactory.se> * e-tree-table-adapter.c (etta_proxy_node_inserted): Fixed an off by one error. svn path=/trunk/; revision=9157
* Don't draw the button if it's less than 1 pixel wide.Christopher James Lahey2001-04-031-1/+4
| | | | | | | | | | | | | 2001-04-03 Christopher James Lahey <clahey@ximian.com> * e-table-header-item.c (ethi_draw): Don't draw the button if it's less than 1 pixel wide. * e-tree-table-adapter.c (etta_proxy_node_inserted): Fixed a small array overrun (wasn't causing problems, but it's best to be correct.) svn path=/trunk/; revision=9120
* Fixed removing the last child of a node.Christopher James Lahey2001-03-311-4/+29
| | | | | | | | | 2001-03-30 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (etta_proxy_node_removed): Fixed removing the last child of a node. svn path=/trunk/; revision=9051
* Updated these to match the new e_tree_model_node_removed signal.Christopher James Lahey2001-03-271-1/+1
| | | | | | | | | | | | | | | | 2001-03-26 Christopher James Lahey <clahey@ximian.com> * e-tree-memory.c, e-tree-table-adapter.c: Updated these to match the new e_tree_model_node_removed signal. * e-tree-model.c, e-tree-model.h: Added an old_position parameter to the node_removed signal so that it would be completely deterministic. * e-tree-sorted.c: Changed this so that paths keep track of their original position. This makes sorting much faster. svn path=/trunk/; revision=8953
* Deal with proxy_node_changed being called on a different root node thanChristopher James Lahey2001-03-201-0/+974
2001-03-19 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c (ets_proxy_node_changed): Deal with proxy_node_changed being called on a different root node than the one we have in our tree. * e-tree-table-adapter.c: Did some general clean up here. * Merged branch: 2001-03-19 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c (find_child_path): Added this function to allow us to find paths that have been removed from the source. (ets_proxy_node_removed): Fixed the memmove here a bit. Call find_child_path. * e-tree-table-adapter.c (find_node): Check that the passed in path isn't NULL. 2001-03-19 Christopher James Lahey <clahey@ximian.com> * e-table-item.c (eti_reflow): Get width from header object instead of calculating it ourselves. * e-table-selection-model.c: Turn off selection saving since it's so slow. * e-table.c (e_table_set_state_object): Set the width of the newly created header object. * e-tree.c (e_tree_set_state_object): Set the width of the newly created header object. (tree_canvas_size_allocate): Don't bother setting the dimensions of the white background twice. 2001-03-18 Christopher James Lahey <clahey@ximian.com> * e-table-selection-model.c, e-table-selection-model.h: Made ETableSelectionModel save the cursor properly across changed signals if has_save_id is true. 2001-03-18 Christopher James Lahey <clahey@ximian.com> * e-table-selection-model.c, e-table-selection-model.h: Made ETableSelectionModel save selection properly across changed signals if has_save_id is true. * e-tree-memory.c: A couple of typos. 2001-03-18 Christopher James Lahey <clahey@ximian.com> * e-tree-memory.c, e-tree-sorted.c: Send pre_changes properly. 2001-03-18 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c: Send pre_changes when performing set_expanded or root_node_set_visible. 2001-03-18 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c (ets_is_expandable): When the API requests whether the object is expandable and it isn't, make sure to send a signal when it becomes expandable. * e-tree-table-adapter.c: Made it so that in a number of cases where it doesn't need to create an empty hash table node if the current tree node has no children, it doesn't. 2001-03-18 Christopher James Lahey <clahey@ximian.com> * e-tree-memory-callbacks.c, e-tree-memory-callbacks.h (etmc_has_save_id, etmc_get_save_id): Added has_save_id and get_save_id to the list of methods supported by e_tree_memory_callbacks. * e-tree-table-adapter.c, e-tree-table-adapter.h: Added saving of expanded nodes. 2001-03-18 Christopher James Lahey <clahey@ximian.com> * e-table-model.c, e-table-model.h (e_table_model_get_save_id): Changed row_save_id to get_save_id to be consistent with ETree. * e-tree-model.c, e-tree-model.h: Added "pre_change" signal. Added has_save_id and get_save_id methods. * e-tree-sorted.c: Proxy pre_change signal. Implemented has_save_id and get_save_id. If the base model doesn't provide has_save_id then we g_strdup_printf the pointer of the base model ETreePath as the save_id. * e-tree-table-adapter.c: Proxy pre_change signal. If base model has_save_id, then use the results of get_save_id as the key for the hash table of node attributes. Otherwise use the pointer as before. 2001-03-17 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c (ets_sort_idle): Fixed it so that all nodes get sorted properly instead of just the top node. 2001-03-17 Christopher James Lahey <clahey@ximian.com> * e-table-sorting-utils.c (e_table_sorting_utils_tree_sort): Made tree sorting faster by using a cache. * e-tree-sorted.c: Added commented out debugging g_prints. 2001-03-17 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c: Switched to using GMemChunks. 2001-03-17 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c (resort_node): Made it so that children of a node that's being sorted don't send changed signals. 2001-03-17 Christopher James Lahey <clahey@ximian.com> * e-table-sorting-utils.c, e-table-sorting-utils.h: Switched to using e_sort and e_search instead of qsort and a linear search. Added the tree functions e_table_sorting_utils_tree_sort, e_table_sorting_utils_tree_check_position, and e_table_sorting_utils_tree_insert. * e-tree-sorted.c: Made this actually do sorting. * e-tree-table-adapter.c (etta_proxy_node_changed): The old_size needs to be the number of visible children + 1 to include the top node. * e-tree.c (e_tree_set_state_object): Set the sort_info on the ETreeSorted when you get a new sort_info. 2001-03-16 Christopher James Lahey <clahey@ximian.com> * Makefile.am: Added e-tree-sorted.c and e-tree-sorted.h. * e-table-item.c (eti_realize_cell_views): Only realize the cells if they're not realized already and if the canvas is realized. * e-table-sorted.c (ets_proxy_model_cell_changed): Matched the change to the signature of e_table_sorting_utils_affects_sort. * e-table-sorting-utils.c, e-table-sorting-utils.h (e_table_sorting_utils_affects_sort): Changed the signature of this function to not take the ETableModel source since it doesn't use it and we need to use this function for ETreeSorted which doesn't have an ETableModel. * e-tree-memory.c (etmm_get_expanded_default): Actually implement the get_expanded_default for this tree. * e-tree-model.h: Cleaned up the indentation here. * e-tree-sorted.c, e-tree-sorted.h: New class meant to be used for sorting trees. It doesn't actually sort yet. It simply acts as an ETreeProxy which is the hardest part of making ETreeSorted. * e-tree.c, e-tree.h: Made this use an ETreeSorted. 2001-03-14 Christopher James Lahey <clahey@ximian.com> * e-table-item.c, e-table-item.h, e-table-selection-model.c, e-table-selection-model.h, e-table-sorted.c, e-table-sorted.h, e-table-subset.c, e-table-subset.h, e-table.c, e-table.h: Switch to handling e_table_model_rows_inserted instead of e_table_model_row_inserted and e_table_model_rows_deleted instead of e_table_model_row_deleted. * e-table-model.c, e-table-model.h: Replaced the signals "model_row_inserted" and "model_row_deleted" with "model_rows_inserted" and "model_rows_deleted" so that when multiple rows are inserted or deleted at the same time they can be handled properly. * e-tree-table-adapter.c: Call "model_rows_inserted" and "model_rows_deleted" instead of "model_changed" when inserting or deleting multiple rows. 2001-03-14 Christopher James Lahey <clahey@ximian.com> * e-table-item.c (e_table_item_row_diff): Made this not count the pixel between rows if it isn't there. 2001-03-14 Christopher James Lahey <clahey@ximian.com> * e-table-item.c (eti_header_structure_changed): Properly attach & realize cell views here. 2001-03-13 Christopher James Lahey <clahey@ximian.com> * e-tree-table-adapter.c (etta_proxy_node_removed): Check that parent_node and parent aren't NULL before making function calls on them. 2001-03-13 Christopher James Lahey <clahey@ximian.com> * e-table-item.c (confirm_height_cache): Fixed a height cache miscalculation. * e-tree-table-adapter.c (find_first_child_node): Made the semantics of this mean that find_first_child_node(adapter, -1) means return the first node in the tree. 2001-03-13 Christopher James Lahey <clahey@ximian.com> * e-table-extras.c: Added a "string-integer" comparison function to the default %ETableExtras so you can do comparisons based on integer value even if you using strings for the data (this lets you do editable numbers, for instance.) * e-table-item.c: Rearranged it a bit so that if you have draw_grid off it doesn't add space for the horizontal lines, nor leave them the background color. * e-table-model.c, e-table-model.h: Added the row_save_id and has_save_id methods to %ETableModel. * e-tree.c, e-tree.h: Replaced e_tree_compute_location with e_tree_get_cell_at. 2001-03-08 Christopher James Lahey <clahey@ximian.com> * Makefile.am: Added e-table/e-table-utils.c, e-table/e-tree-memory-callbacks.c, e-table/e-tree-memory.c, e-table/e-tree-scrolled.c, e-table/e-tree-table-adapter.c, and e-table/e-tree.c. Removed e-table/e-tree-simple.c. Added e-table/e-table-utils.h, e-table/e-tree-memory-callbacks.h, e-table/e-tree-memory.h, e-table/e-tree-scrolled.h, e-table/e-tree-table-adapter.h, and e-table/e-tree.h. Removed e-table/e-tree-simple.h. * e-cell-tree.c: Updated this for the new tree. * e-table-item.c: Added some redraw requests where appropriate. * e-table-item.h: Fixed an incorrect class method declaration. * e-table-model.c, e-table-model.h: Removed e_table_model_has_sort_group and e_table_model_row_sort_group. * e-table-scrolled.h: Removed unused headers. * e-table-simple.c, e-table-simple.h: Rearranged this a bit. * e-table-sorter.c, e-table-sorting-utils.c, e-table-sorting-utils.h: Removed sort group stuff. Added the function e_table_sorting_utils_check_position. * e-table-utils.c, e-table-utils.h: Utility functions for ETable and ETree. * e-table.c: Moved some of the functionality from here to e-table-utils.c so that it can be reused by ETree. * e-tree-memory-callbacks.c, e-tree-memory-callbacks.h: Class to implement an ETreeMemory as callbacks instead of overriding the class. * e-tree-memory.c, e-tree-memory.h: ETreeModel that stores a tree of physical nodes. * e-tree-model.c, e-tree-model.h: Removed most of the functionality from here to the classes ETreeMemory and ETreeTableAdapter. This is now just a simple virtualized tree class. * e-tree-scrolled.c, e-tree-scrolled.h: New class. An ETree in an EScrollFrame. * e-tree-simple.c: Small change. This is no longer used. * e-tree-table-adapter.c, e-tree-table-adapter.h: ETableModel that represents an ETreeModel as a table. * e-tree.c, e-tree.h: New super class kind of like ETable but for trees. End of branch svn path=/trunk/; revision=8837