aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree-model.h
Commit message (Collapse)AuthorAgeFilesLines
* Consolidate base utility libraries into libeutil.Matthew Barnes2012-12-131-294/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Evolution consists of entirely too many small utility libraries, which increases linking and loading time, places a burden on higher layers of the application (e.g. modules) which has to remember to link to all the small in-tree utility libraries, and makes it difficult to generate API documentation for these utility libraries in one Gtk-Doc module. Merge the following utility libraries under the umbrella of libeutil, and enforce a single-include policy on libeutil so we can reorganize the files as desired without disrupting its pseudo-public API. libemail-utils/libemail-utils.la libevolution-utils/libevolution-utils.la filter/libfilter.la widgets/e-timezone-dialog/libetimezonedialog.la widgets/menus/libmenus.la widgets/misc/libemiscwidgets.la widgets/table/libetable.la widgets/text/libetext.la This also merges libedataserverui from the Evolution-Data-Server module, since Evolution is its only consumer nowadays, and I'd like to make some improvements to those APIs without concern for backward-compatibility. And finally, start a Gtk-Doc module for libeutil. It's going to be a project just getting all the symbols _listed_ much less _documented_. But the skeletal structure is in place and I'm off to a good start.
* Coding style and whitespace cleanup.Matthew Barnes2011-01-301-5/+5
|
* libetable cleanups.Matthew Barnes2011-01-171-149/+214
|
* Fix excessive whitespace.Matthew Barnes2009-07-131-4/+0
|
* Prefer GLib basic types over C types.Matthew Barnes2009-05-291-26/+26
|
* Remove trailing whitespace, again.Matthew Barnes2009-05-291-1/+1
|
* ** BUGFIX: 569696 – Memory leak in message-listSrinivasa Ragavan2009-05-041-0/+2
| | | | | Not exactly a leak, but a build-up over a period of time. Clear the internal gnode on regen.
* License ChangesSankarasivasubramanian Pasupathilingam2008-08-271-17/+17
| | | | svn path=/trunk/; revision=36116
* updated novell copyright notices (left others alone)Jeffrey Stedfast2008-06-211-1/+1
| | | | svn path=/trunk/; revision=35665
* ** Remove trailing whitespace from source code.Matthew Barnes2007-11-151-2/+2
| | | | | | | | | 2007-11-14 Matthew Barnes <mbarnes@redhat.com> ** Remove trailing whitespace from source code. svn path=/trunk/; revision=34537
* Update FSF address in header comments (#469886). Patch from TobiasMatthew Barnes2007-09-021-2/+2
| | | | | | | | | | 2007-09-02 Matthew Barnes <mbarnes@redhat.com> * Update FSF address in header comments (#469886). Patch from Tobias Mueller. svn path=/trunk/; revision=34151
* Add support for GMail like sortingSrinivasa Ragavan2007-05-171-0/+4
| | | | svn path=/trunk/; revision=33553
* use GObject api for models GObjectify GObjectify GObjectify GObjectifyMike Kestner2002-11-051-8/+9
| | | | | | | | | | | | | | | | | | | | | 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-3/+4
| | | | | | merging the gal-2 branch back to the trunk. svn path=/trunk/; revision=18471
* Handle a collapse request by marking all descendents of that node asChristopher James Lahey2002-03-091-38/+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
* New function to do a search through a tree in one direction or the other.Christopher James Lahey2002-01-311-89/+92
| | | | | | | | | | 2002-01-31 Christopher James Lahey <clahey@ximian.com> * e-tree-model.c, e-tree-model.h (e_tree_model_node_find): New function to do a search through a tree in one direction or the other. svn path=/trunk/; revision=15536
* Bumped the version number to 0.16.99.0 and GAL_CURRENT to 17.Christopher James Lahey2001-11-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-31 Christopher James Lahey <clahey@ximian.com> * configure.in: Bumped the version number to 0.16.99.0 and GAL_CURRENT to 17. From gal/e-table/ChangeLog: 2001-10-31 Christopher James Lahey <clahey@ximian.com> * e-table-item.c (eti_unfreeze): Check for unfreezing past 0 here and give a warning. (eti_add_table_model): Call eti_freeze here since eti_table_model_changed will call unfreeze. * e-tree-memory.c (e_tree_memory_node_remove): Send deleted signal after freeing the child. * e-tree-model.c, e-tree-model.h: Added node_deleted signal. removed/deleted signals will always come in pairs in that order with a single pre_change for both of them. * e-tree-selection-model.c (etsm_node_deleted): Clear the tree on deleted here instead of on removed. * e-tree-sorted.c (ets_proxy_node_deleted): Chain deleted here. Chains to NULL node which is fine for now. svn path=/trunk/; revision=14557
* Added frozen_count variable to know not to show the cursor while a changeChristopher James Lahey2001-10-311-6/+8
| | | | | | | | | | | | | | | | | | | | | | | 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
* Changed the license announcement at the top of these files.Christopher James Lahey2001-10-271-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bumped version number to 0.11.99.4.Christopher James Lahey2001-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Upped the version number to 0.6.99.0. Upped the so number to 6.Christopher James Lahey2001-04-131-0/+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
* Add argument to get the table adapter. (et_set_arg): Add arguments forRichard Hult2001-04-041-1/+5
| | | | | | | | | | | | | | | 2001-04-03 Richard Hult <rhult@codefactory.se> * e-tree.c (et_get_arg): Add argument to get the table adapter. (et_set_arg): Add arguments for setting drawing of the grid and focus. * e-tree-model.c, e-tree-model.h (e_tree_model_node_traverse): Fill in missing implementation. (e_tree_model_node_traverse_preorder): Likewise, but preorder traversal. svn path=/trunk/; revision=9156
* Updated these to match the new e_tree_model_node_removed signal.Christopher James Lahey2001-03-271-2/+3
| | | | | | | | | | | | | | | | 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
* Bumped the version number to 05.99.9.Christopher James Lahey2001-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-20 Christopher James Lahey <clahey@ximian.com> * configure.in: Bumped the version number to 05.99.9. From gal/e-table/ChangeLog: 2001-03-20 Christopher James Lahey <clahey@ximian.com> * e-table-click-to-add.c: Turn on the vertical grid. * e-table-group-container.c, e-table-group-container.h, e-table-group-leaf.c, e-table-group-leaf.h, e-table-item.c, e-table-item.h: Replaced the "drawgrid" argument with "horizontal_draw_grid" and "vertical_draw_grid" arguments. * e-table-specification.c, e-table-specifcation: Replaced the draw_grid setting with the horizontal_draw_grid and vertical_draw_grid settings. If the draw-grid property is set in a ETableSpecification it is still obeyed and overrides the vertical-draw-grid and horizontal-draw-grid properties. * e-table.c, e-table.h, e-tree.c, e-tree.h: Deal with the horizontal_draw_grid and vertical_draw_grid changes. * e-tree-model.h: Added a missing include. svn path=/trunk/; revision=8846
* Deal with proxy_node_changed being called on a different root node thanChristopher James Lahey2001-03-201-90/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* From a patch submitted by Murray Cumming <Murray.Cumming@mybau.com>Christopher James Lahey2001-02-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 2001-02-17 Christopher James Lahey <clahey@ximian.com> From a patch submitted by Murray Cumming <Murray.Cumming@mybau.com> * e-cell-checkbox.h, e-cell-date.h, e-cell-number.h, e-cell-size.h, e-cell-text.h, e-cell-toggle.h, e-cell-tree.h, e-cell.h, e-table-click-to-add.h, e-table-col-dnd.h, e-table-col.h, e-table-column-specification.h, e-table-config-field.h, e-table-config.h, e-table-defines.h, e-table-extras.h, e-table-field-chooser-item.h, e-table-group-container.h, e-table-group-leaf.h, e-table-group.h, e-table-header-item.h, e-table-header-utils.h, e-table-header.h, e-table-item.h, e-table-model.h, e-table-one.h, e-table-selection-model.h, e-table-simple.h, e-table-sort-info.h, e-table-sorted-variable.h, e-table-sorted.h, e-table-sorter.h, e-table-specification.h, e-table-state.h, e-table-subset-variable.h, e-table-subset.h, e-table-tooltip.h, e-table-tree.h, e-tree-model.h, e-tree-simple.h, e-tree-sorted-variable.h: Added GNOME_DECLS. svn path=/trunk/; revision=8265
* Added this function. Made frozen an int so that recursive freezes andChristopher James Lahey2001-02-091-0/+2
| | | | | | | | | | 2001-02-08 Christopher James Lahey <clahey@ximian.com> * e-tree-model.c, e-tree-model.h (e_tree_model_show_node): Added this function. Made frozen an int so that recursive freezes and thaws behaves properly. svn path=/trunk/; revision=8106
* Updated version number.Christopher James Lahey2000-11-141-0/+4
| | | | | | | | | | | | | 2000-11-13 Christopher James Lahey <clahey@helixcode.com> * configure.in: Updated version number. * gal/e-table/e-tree-model.c, gal/e-table/e-tree-model.h: Added freeze and thaw functions. * gal/menus/gal-define-views-dialog.c: Fixed some warnings. svn path=/trunk/; revision=6563
* make ETreeModel opaque, and switch from using g_new0 and g_free forChris Toshok2000-10-251-9/+5
| | | | | | | | | | | | | | | 2000-10-24 Chris Toshok <toshok@helixcode.com> * e-tree-model.c: make ETreeModel opaque, and switch from using g_new0 and g_free for ETreePath's to using g_mem_chunk routines. (e_tree_model_node_remove): free the path's save_id. * (e_tree_model_set_expanded_default): add method to add default expanded status for parent nodes. (etree_set_expanded_recurse): make this more efficient. e-tree-model.h: make ETreeModel opaque. add prototype for e_tree_model_set_expanded_default. svn path=/trunk/; revision=6156
* get rid of ENode type, as everything in it is now in ETreePath, and addChris Toshok2000-10-161-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-15 Chris Toshok <toshok@helixcode.com> * e-tree-model.c: get rid of ENode type, as everything in it is now in ETreePath, and add parent/sibling/child pointers to ETreePath. everywhere where GNode/ENode were used, we just use ETreePath now. (e_tree_path_depth): new function. (e_tree_path_insert): new function. (e_tree_path_unlink): new function. (e_tree_model_node_traverse): new function. (etree_get_first_child): new virtual function impl. (etree_get_last_child): same. (e_tree_model_class_init): fill in function pointers for get_first_child/get_last_child. (e_tree_model_node_get_first_child): new function. (e_tree_model_node_get_last_child): new function. (e_tree_model_node_depth): g_node_depth -> e_tree_path_depth. (e_tree_model_node_insert): modify to use ETreePath and new e_tree_path functions. Prepends and appends are now both constant time. (child_remove): modify for e_tree_model_node_traverse. (e_tree_model_node_remove): same, and use e_tree_path functions. (e_tree_model_node_insert_before): add a loop here to figure out the position, since it's the only place we care about the child position. (e_tree_model_node_sort): rework to accomodate new e_tree_path functions, and put the e_tree_model_node_set_expanded calls in a separate loop after all the children have been added. * e-tree-model.h: add prototypes and virtual functions for more tree traversal operations (get_first_child, get_last_child), as well as a new function to traverse depth first the descendents of a node (e_tree_model_node_traverse), much like g_node_traverse (G_IN_ORDER). Also, ETreePath is an opaque type now, and is not a GNode. svn path=/trunk/; revision=5932
* Changed to take into account the sort group, if the table has one.xNot Zed2000-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-04 Not Zed <NotZed@HelixCode.com> * e-table-sorted-variable.c (etsv_add): Changed to take into account the sort group, if the table has one.x (etsv_insert_idle): Clear the insert count if we hit an idle loop. (etsv_sort_idle): Reset the insert count if we perform a sort. (etsv_add): If we are adding a lot (>ETSV_INSERT_MAX) items, without hitting an idle loop, assume we're better off performing a sort instead. Use another idle handler to reset the count. 2000-10-03 Not Zed <NotZed@HelixCode.com> * e-table-sorted-variable.c (etsv_sort_by_group): Sort based on the sort_group stuff. * e-tree-model.c (e_tree_init): Setup the group sort info string. (etree_destroy): And free it. (build_sort_group): Build a string for this node. 2000-09-29 Not Zed <NotZed@HelixCode.com> * e-cell-tree.c (e_cell_tree_get_node): Changed to take the source model, not the tree model. The source model may be a subset, and it needs to remap the rows for us. (ect_draw): (ect_event): (ect_max_width): (ect_print): Changed callers. * e-table-sorted-variable.c (etsv_sort_subset): (etsv_sort_build_subset): (etsv_sort_free_subset): Functions to perfom grouping of sorts for sorts that have row_sort_group returning useful info. (etsv_sort): Use the complex sort routines if we need to. * e-table-model.c (e_table_model_row_sort_group): Return a sort-id for a given row. (e_table_model_has_sort_group): Return if the sort-id provides any useful information. svn path=/trunk/; revision=5705
* change/add prototypes and a typedef for ETreePathCompareFunc.Chris Toshok2000-10-031-5/+9
| | | | | | | | | | | | | | | | | | | | | | 2000-10-02 Chris Toshok <toshok@helixcode.com> * e-tree-model.h: change/add prototypes and a typedef for ETreePathCompareFunc. * e-tree-model.c (e_tree_model_node_set_compare_function): new function, used to set the comparison function for sorted nodes. Eventually sorting entail just calling this function, with the tree maintaining the sort. (e_tree_model_node_sort): use a helper function (e_tree_model_node_compare) to allow the e-tree user's comparison function to take mode reasonable paramaters. also, fix it so the previous expanded state is kept with the node. i can't believe i wrote it the way it originally was. also, don't take the comparison function here. it's set in e_tree_model_node_set_compare_function. svn path=/trunk/; revision=5674
* add save_state stuff to ETreeModel, and prototypes for the public methods.Chris Toshok2000-09-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-25 Chris Toshok <toshok@helixcode.com> * gal/e-table/e-tree-model.h: add save_state stuff to ETreeModel, and prototypes for the public methods. * gal/e-table/e-tree-model.c: add save_id to the ENode. (expanded_remove_func): new function, iterator to delete the save id's. (etree_destroy): iterate over expanded_state. (etree_set_expanded): if the node has a save id, make sure to update both the collapsed and expanded counts. (e_tree_model_node_insert_id): convenience function that inserts a node and sets its id. (e_tree_model_node_sort): remove extra spew. (save_expanded_state_func): new function, iterator for saving expanded state. (e_tree_model_save_expanded_state): new function. (get_string_value): helper function for loading. (e_tree_model_load_expanded_state): new function. (e_tree_model_node_set_save_id): sets the save id for a node, adding it to the hashtable if it's not already there. if the id was there previously, set the expanded flag of the node accordingly. svn path=/trunk/; revision=5573
* Moved files, fixed header files and paths - FedericoFederico Mena Quintero2000-09-201-2/+2
| | | | svn path=/trunk/; revision=5513
* add signals/prototypes for e_tree_model_node_collapsed andChris Toshok2000-09-011-3/+7
| | | | | | | | | | | | | | | | | 2000-09-01 Chris Toshok <toshok@helixcode.com> * e-tree-model.h: add signals/prototypes for e_tree_model_node_collapsed and e_tree_model_node_expanded. * e-tree-model.c (etree_set_expanded): emit node_expanded/node_collapsed signals, with node_expanded happening before the expansion so it can much with the children, and collapsed being emitted after. (e_tree_model_row_of_node): remove stupid check, and g_warning. (e_tree_model_node_collapsed): new function. (e_tree_model_node_expanded): new function. svn path=/trunk/; revision=5162
* we can remove nodes with children now.Chris Toshok2000-08-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | 2000-08-21 Chris Toshok <toshok@helixcode.com> * e-tree-example-1.c (remove_node): we can remove nodes with children now. * e-tree-model.h: add prototype for e_tree_model_node_sort. * e-tree-model.c (etree_set_expanded): if the node is invisible, just set its expanded flag and return. (e_tree_model_root_node_set_visible): call set_expanded before we remove it from the row array or else the aforementioned change will result in nothing happening. (e_tree_model_node_insert): use a position of -1 as "append". (e_tree_model_node_insert): if the model was marked with root_visible == FALSE, make sure to set it's expanded flag to TRUE when the root node is inserted. (e_tree_model_node_sort): new function. svn path=/trunk/; revision=4912
* add icon_at virtual function - it was stupid to make the insert call takeChris Toshok2000-06-231-4/+4
| | | | | | | | | | | | | | | | | | | | 2000-06-23 Chris Toshok <toshok@helixcode.com> * e-tree-model.h, e-tree-model.c: add icon_at virtual function - it was stupid to make the insert call take 2 pixbufs. the model should give this information. * e-cell-tree.c: get rid of the opened/closed pixbuf stuff. call e_tree_model_icon_of_node. * e-tree-example-1.c: add my_icon_at. * e-tree-simple.c (simple_icon_at): new function (e_tree_simple_new): add icon_at parameter. * e-tree-simple.h: add SimpleIconAtFn. svn path=/trunk/; revision=3707
* use the expanded/unexpanded pixbufs as node pixbufs for the first level ofChris Toshok2000-06-231-2/+5
| | | | | | | | | | | | | | | | | | | | 2000-06-23 Chris Toshok <toshok@helixcode.com> * e-tree-example-1.c (create_tree): use the expanded/unexpanded pixbufs as node pixbufs for the first level of children, to test the drawing. * e-tree-model.c (e_tree_model_node_get_closed_pixbuf): new function. (e_tree_model_node_get_opened_pixbuf): same. (e_tree_model_node_insert): add opened/closed pixbuf argument. (e_tree_model_node_insert_before): same. * e-tree-model.h: add prototypes for opened/closed pixbuf accessors, and add them to the e_tree_model_node_insert_* calls. * e-cell-tree.c (ect_draw): add opened/closed pixbuf drawing per node. svn path=/trunk/; revision=3706
* change things so we focus the cell and select the row, and also dispatchChris Toshok2000-06-111-27/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-06-10 Chris Toshok <toshok@helixcode.com> * e-table-item.c (eti_event): change things so we focus the cell and select the row, and also dispatch the event to that row/cell. This fixes the problem with the tree where you had to click twice to activate the tree controls. * Makefile.am (libetable_a_SOURCES): remove e-tree-gnode.* and add e-tree-simple.* (icons): add tree-expanded.xpm and tree-unexpanded.xpm * e-cell-tree.c (ect_enter_edit): defer to subcell's view. (ect_leave_edit): defer to subcell's view. (visible_depth_of_node): visual depth, taking into account that the root node of the model might not be displayed. (offset_of_node): return the offset used to shift the subcell over. (ect_draw): don't draw vertical lines if we're the leftmode node (a visual root node). also, don't shift x2 by the subcell offset, so we get ellipses like we're supposed to. (ect_event): remove GDK_BUTTON_RELEASE from the list of events that we care about. * e-tree-example-1.c: lots of changes, a more dynamic UI so we can test tree model api stuff. * e-tree-gnode.c, e-tree-gnode.c: removed files, since their guts have been rolled into e-tree-model.c * e-tree-model.c, e-tree-model.h: substantially changed. too much to really describe here. this should really be considered the first revision of these files :) * e-tree-simple.c, e-tree-simple.h: analogous to e-table-simple, a subclass that allows the use of function pointers. svn path=/trunk/; revision=3519
* New files. A tree model using a GNode structure to store it's info.Chris Toshok2000-06-091-0/+72
2000-06-08 Chris Toshok <toshok@helixcode.com> * e-tree-gnode.c, e-tree-gnode.h: New files. A tree model using a GNode structure to store it's info. * e-tree-model.c, e-tree-model.h: New files. A proxy model sitting between a table model and the real tree model (of which ETreeGNode is an example). * e-cell-tree.c, e-cell-tree.h: New files. A cell renderer capable of wrapping up a subcell and drawing the tree controls for expanding/collapsing trees. * tree-expanded.xpm, tree-unexpanded.xpm: New files. the standard + and - icons. * e-tree-example-1.c: New file, giving a (pretty poor :) example of using ETreeGNode. * Makefile.am: at the tree stuff to the build, and build tree-example-1. * .cvsignore: ignore tree-example-1. svn path=/trunk/; revision=3483