Commit Graph

32 Commits

Author SHA1 Message Date
89ec4e5af6 Fixed some warnings.
2001-03-01  Christopher James Lahey  <clahey@ximian.com>

	* e-cell-pixbuf.c: Fixed some warnings.

	* e-table-subset.c, e-table-subset.h: Added
	e_table_subset_print_debugging.

2001-02-27  Christopher James Lahey  <clahey@ximian.com>

	* e-table-sorted-variable.c: Moved etsv_compare to etsu_compare in
	e-table-sorting-utils.c.  Moved most of the contents of etsv_add
	to e_table_sorting_utils_insert in e-table-sorting-utils.c and
	call the function.

	* e-table-sorted.c: Rewrote ets_proxy_row_changed,
	ets_proxy_row_inserted, and ets_proxy_row_deleted.

	* e-table-sorting-utils.c, e-table-sorting-utils.h (etsu_compare,
	e_table_sorting_utils_insert): Added e_table_sorting_utils_insert.

	* e-table-subset-variable.c: Changed this implementation to be
	slightly more consistent with other code.

svn path=/trunk/; revision=8453
2001-03-01 17:52:12 +00:00
40d58afa7c Added e-table/e-table-sorting-utils.lo.
2001-02-23  Christopher James Lahey  <clahey@ximian.com>

	* gal/Makefile.am (libgal_la_LIBADD): Added
	e-table/e-table-sorting-utils.lo.

From gal/e-table/ChangeLog:

2001-02-23  Christopher James Lahey  <clahey@ximian.com>

	* Makefile.am (libetable_la_SOURCES): Added
	e-table-sorting-utils.c.
	(libetableinclude_HEADERS): Added e-table-sorting-utils.h.

	* e-table-group-container.c: Implemented add_array method.  Use
	add_array to implement add_all instead of using add.  Did some
	general clean up.

	* e-table-group-leaf.c, e-table-group-leaf.h: Implemented
	add_array method.  Changed everything to use an ETableSubset
	variable instead of an ETableSortedVariable.  Implemented it as
	ETableSortedVariable if there's grouping involved and ETableSorted
	if there isn't.

	* e-table-group.c, e-table-group.h: Added add_array method.  Added
	unused get_position code.

	* e-table-sorted-variable.c, e-table-sorted-variable.h: Moved a
	lot of the actual implementation of sorting to
	e-table-sorting-utils.c.  Got rid of the signal handlers here
	since we weren't using them and ETableSubset has the proxy virtual
	methods.

	* e-table-sorted.c, e-table-sorted.h: Completely replaced these
	files with a variation on ETableSortedVariable that doesn't have
	the add methods and such but instead just mimics the source
	model's set of rows completely.

	* e-table-sorter.c, e-table-sorter.h: Added functions to get at
	the arrays here.

	* e-table-sorting-utils.c, e-table-sorting-utils.h: Utility
	functions for doing sorting.

	* e-table-subset-variable.c, e-table-subset-variable.h: Added
	add_array method.

	* e-table-subset.c, e-table-subset.h: Made it so that the signal
	hookups to the source model's signals are virtual methods.

	* e-table.c, e-table.h: Don't call add_all and add and remove type
	functions if not grouped.  Don't rebuild for sort changes unless
	it was either grouped before or will be grouped now.

svn path=/trunk/; revision=8374
2001-02-23 23:00:09 +00:00
ac063e3d36 Rename from Helix Code -> Ximian
svn path=/trunk/; revision=7520
2001-01-15 23:32:09 +00:00
dcd4f31223 Set the minimum width of newly created children.
2000-12-19  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-group-container.c (etgc_add): Set the minimum width of
	newly created children.
	(e_table_group_container_construct): Use function
	e_table_header_get_column_by_col_idx instead of
	e_table_header_get_column since we're passing in a col_idx.

	* e-table-header.c, e-table-header.h: New function
	e_table_header_get_column_by_col_idx which searches for a column
	in the ETableHeader with a certain model column (col_idx).

	* e-table-sorted-variable.c (etsv_compare),
	(etsv_sort), e-table-sorter.c (ets_sort): Use function
	e_table_header_get_column_by_col_idx instead of
	e_table_header_get_column since we're passing in a col_idx.

svn path=/trunk/; revision=7079
2000-12-19 15:58:24 +00:00
9cf73d61eb Unref the object instead of destroying it.
2000-12-09  Federico Mena Quintero  <federico@helixcode.com>

	* e-table-sorted.c (e_table_sorted_new): Unref the object instead
	of destroying it.

	* e-table-sorted-variable.c (e_table_sorted_variable_new): Likewise.

	* e-table-subset.c (e_table_subset_new): Likewise.

	* e-table-subset-variable.c (e_table_subset_variable_new): Likewise.

svn path=/trunk/; revision=6888
2000-12-09 20:04:18 +00:00
e4e6331ee5 Made it so that rows inserted with their children nodes already in the
2000-10-21  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c: Made it so that rows inserted with
	their children nodes already in the tree get placed before their
	children nodes instead of after.

svn path=/trunk/; revision=6101
2000-10-22 02:11:38 +00:00
79d19f353c remove timeouts on destroy so they don't try to write to freed data
svn path=/trunk/; revision=6032
2000-10-19 16:41:07 +00:00
58eba683f8 Changed to take into account the sort group, if the table has one.x
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
2000-10-04 15:51:35 +00:00
a3de274f7c Moved files, fixed header files and paths - Federico
svn path=/trunk/; revision=5513
2000-09-19 22:57:58 +00:00
8c99725b91 Fixed e-table #includes so that it would compile.
svn path=/trunk/; revision=5482
2000-09-17 20:29:14 +00:00
862d1f25de Made background colors alternate.
2000-08-19  Christopher James Lahey  <clahey@helixcode.com>

	* e-cell-text.c: Made background colors alternate.

	* e-table-click-to-add.c: Made tabbing off the right edge of the
	click to add commit the new values.

	* e-table-group-container.c, e-table-group-leaf.c,
	e-table-group.c, e-table-group.h, e-table-sorted-variable.c,
	e-table-subset-variable.c, e-table-subset-variable.h: Added a
	decrement method.  Made the add and remove methods not
	automatically increment and decrement.

	* e-table-item.c: Fixed some view vs model issues for both rows
	and columns.

	* e-table-model.c: Added debugging code.  Removed automatic
	signalling of changes by the ETableModel set_value_at function
	(the model should send these signals itself.)

	* e-table.c: Added increment and decrement calls when a row is
	removed or added from the source model.

svn path=/trunk/; revision=4881
2000-08-19 23:32:50 +00:00
5fbcc4828e Add a handler for "model_pre_change" and properly stop editing.
2000-08-02  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-item.c, e-table-item.h: Add a handler for
	"model_pre_change" and properly stop editing.

	* e-table-model.c, e-table-model.h: Added a "model_pre_change"
	signal that gets sent before any row numbers are changed.

	* e-table-sorted-variable.c, e-table-subset-variable.c: Emit
	"model_pre_change" signals as appropriate.

	* e-table-subset.c, e-table-subset.h: Proxy "model_pre_changed"
	signals.

svn path=/trunk/; revision=4472
2000-08-02 16:56:26 +00:00
3649d5dc6d From mail:
2000-06-29  Christopher James Lahey  <clahey@helixcode.com>

	* message-list.c, mail-ops.c: Changed the name of
	e_table_select_row to e_table_set_cursor_row.

From widgets/e-table:

2000-06-29  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-click-to-add.c: Made this appear a bit better.

	* e-table-defines.h: Cleaned this up a bit, added
	ETableForeachFunc.

	* e-table-group-container.c, e-table-group-leaf.c,
	e-table-group.c, e-table-group.h, e-table-item.c, e-table-item.h,
	e-table.c, e-table.h: Changed e_table_select_row to
	e_table_set_cursor_row.  Changed e_table_get_selected_view_row to
	e_table_get_cursor_row.  Added e_table_selected_row_foreach.

	* e-table-header-item.c: Fixed some warnings.

	* e-table-sorted-variable.c: Removed some unneeded debugging print
	statments.

	* e-tree-example-1.c: Changed e_table_get_selected_view_row to
	e_table_get_cursor_row.

svn path=/trunk/; revision=3799
2000-06-29 19:22:24 +00:00
9de25e88aa Removed the freeze/thaw stuff for the model. As Chris wisely pointed out,
2000-06-12  Federico Mena Quintero  <federico@helixcode.com>

	* e-table-model.[ch]: Removed the freeze/thaw stuff for the model.
	As Chris wisely pointed out, having freeze/thaw on the model makes
	its state inconsistent from the perspective of the views.

	* e-table-sorted-variable.c: Do not check for a frozen model.
	* e-table-subset.c: Likewise.
	* e-table-subset-variable.c: Likewise.

	* e-table-example-1.c: Removed the ETableModel thaw handler.
	* e-table-example-2.c: Likewise.
	* e-table-simple.c: Likewise.
	* e-table-size-test.c: Likewise.
	* test-check.c: Likewise.
	* test-cols.c: Likewise.
	* test-table.c: Likewise.

svn path=/trunk/; revision=3543
2000-06-13 00:41:47 +00:00
06978bc736 Added a right click signal.
2000-06-06  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-group-container.c, e-table-group-leaf.c,
	e-table-group.c, e-table-group.h, e-table-item.c, e-table-item.h,
	e-table.c, e-table.h: Added a right click signal.

	* e-table-sorted-variable.c: Fixed a buffer overrun.

svn path=/trunk/; revision=3437
2000-06-06 05:50:12 +00:00
85e4486c1c Fixed the multiple copies of rows in ETable bug.
2000-06-02  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c: Fixed the multiple copies of rows in
	ETable bug.

svn path=/trunk/; revision=3386
2000-06-02 08:14:47 +00:00
2b418bb61a Made the sort when inserting a signal row be syncronous.
2000-06-01  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c: Made the sort when inserting a signal
	row be syncronous.

svn path=/trunk/; revision=3358
2000-06-02 01:52:27 +00:00
4670021197 Added right click menus to the table header items.
2000-05-23  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-header-item.c: Added right click menus to the table
	header items.

	* e-table-sort-info.c: Fixed a small bug.

svn path=/trunk/; revision=3184
2000-05-23 18:38:21 +00:00
1a38235e40 Changed sorting to be at priority level 30.
2000-05-16  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c: Changed sorting to be at priority
	level 30.

	* e-table.c: Changed rebuild of the table to be at priority level
	20.  This gives it an advantage over pretty much everything,
	including e-table-sorted-variable sorting and canvas redraw.

svn path=/trunk/; revision=3082
2000-05-16 10:51:33 +00:00
18fa92ee1d Fixed a FIXME comment.
2000-05-16  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c: Fixed a FIXME comment.

	* e-table-header.c, e-table-header.h: Added code to put off size
	calculation to the idle loop.  Added code to not resize columns
	with 0 expansion.  Removed the set_width function; it's been
	replaced with a Gtk+ arg.

	* Makefile.am: Added e-table-defines.h to the Makefile.am.

	* e-table-defines.h: A new file containing some #defines for use
	in ETable.

svn path=/trunk/; revision=3077
2000-05-16 09:06:26 +00:00
56f9196ac4 Handle row_inserted and row_deleted signals properly.
2000-05-07  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-item.c, e-table-item.h, e-table.c, e-table.h: Handle
	row_inserted and row_deleted signals properly.

	* e-table-model.c, e-table-model.h: Created the row_inserted and
	row_deleted signals.

	* e-table-sorted-variable.c, e-table-subset-variable.c: Emit the
	row_inserted and row_deleted signals as appropriate.

svn path=/trunk/; revision=2879
2000-05-07 20:49:02 +00:00
4a6a526998 use rows here instead of E_TABLE_SUBSET(etsv)->n_map, since the table can
* e-table-sorted-variable.c (etsv_sort): use rows here instead of
	E_TABLE_SUBSET(etsv)->n_map, since the table can be populated by
	the gtk_main_iteration above.  otherwise the vals_closure may not
	be fully populated.

svn path=/trunk/; revision=2809
2000-05-05 06:49:40 +00:00
ccd8e1fedd Add an e_table_group_add_all function and implement it in the different
2000-05-04  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-group-container.c, e-table-group-leaf.c,
	e-table-group.c, e-table-group.h: Add an e_table_group_add_all
	function and implement it in the different ETableGroup classes.

	* e-table-sort-info.c: Make set_nth not call changed twice if it
	needs to allocate more space.

	* e-table-sorted-variable.c, e-table-subset-variable.c,
	e-table-subset-variable.h: Add and implement an
	e_table_subset_variable_add_all command.

	* e-table.c: Use e_table_group_add_all as appropriate.  Fix ETable
	grouping xml to work if there is a text element at the bottom of
	the grouping tree.

svn path=/trunk/; revision=2806
2000-05-05 00:10:32 +00:00
cb7c636a65 Load all the data to be sorted by before actually doing the sort.
2000-05-04  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c: Load all the data to be sorted by
	before actually doing the sort.

svn path=/trunk/; revision=2793
2000-05-04 08:28:36 +00:00
8e733f8305 Add back in main loop calls during sorting.
2000-05-04  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c (qsort_callback): Add back in main
	loop calls during sorting.

svn path=/trunk/; revision=2788
2000-05-04 03:31:30 +00:00
1f89b12d0b Replace insert sort completely with a qsort.
2000-05-04  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c: Replace insert sort completely with a
	qsort.

svn path=/trunk/; revision=2786
2000-05-04 01:36:06 +00:00
f4204133d9 Changed the insert sort to be binary instead of linear.
2000-05-04  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-sorted-variable.c: Changed the insert sort to be binary
	instead of linear.

svn path=/trunk/; revision=2784
2000-05-04 00:59:10 +00:00
eb5dc08dc9 Made this more reentrant.
2000-04-30  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-header-item.c: Made this more reentrant.

	* e-table-sorted-variable.c, e-table-sorted-variable.h: Does a
	proper resort when the sorting info changes.

	* e-table.c, e-table.h: Made it so that ETable doesn't destroy and
	recreate the entire table when sorting info changes.

svn path=/trunk/; revision=2704
2000-05-01 04:01:05 +00:00
fe016cce58 Got rid of some warnings.
2000-04-06  Christopher James Lahey  <clahey@helixcode.com>

	* test-cols.c, test-table.c: Got rid of some warnings.

	* 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-sort-info.c, e-table-sort-info.h,
	e-table-sorted-variable.c, e-table-sorted-variable.h, e-table.c,
	e-table.h: Changed ETableSortInfo to not use xml internally.

svn path=/trunk/; revision=2305
2000-04-06 08:00:35 +00:00
a02608b078 Fix indentation
svn path=/trunk/; revision=2252
2000-03-30 01:35:18 +00:00
7df026ac0e Have identical values get sorted by their actual row.
2000-03-06  Christopher James Lahey  <clahey@helixcode.com>

        * e-table-sorted-variable.c: Have identical values get sorted by
        their actual row.

svn path=/trunk/; revision=2071
2000-03-06 07:41:11 +00:00
14bfde56c8 Added duplicate_value and add_value. Use the new compare functions. Made
2000-02-24  Christopher James Lahey  <clahey@helixcode.com>

        * test-table.c: Added duplicate_value and add_value.  Use the new
        compare functions.  Made it so we only create one model to better
        test model view stuff.  Changed the test to not have as many
        extra, useless, columns.

        * test-cols.c, test-check.c: Added duplicate_value and add_value.  Use the new
        compare functions.

        * e-table.c, e-table.h: Use all the new features of e-table-groups
        (sorting and grouping).  Handle on the fly reorganization of
        groups in an idle loop.  Compare functions now are to return -1 if
        the first item is greater, 0 if they are equal, or 1 if the second
        item is greater.

        * e-table-subset.c, e-table-subset.h: Made e-table-subset
        disconnect properly from its signals when it dies.

        * e-table-subset-variable.c, e-table-subset-variable.h:
        Virtualized the add and remove commands so that
        e_table_sorted_variable could override the add command to do sorting.

        * e-table-sorted.c: Fixed this to inherit properly from
        ETableSubset.

        * e-table-simple.h, e-table-simple.c: Added handling of
        duplicate_value and free_value;

        * e-table-model.c, e-table-model.h: Added duplicate_value and
        free_value for memory allocation of table elements outside the
        table.

        * e-table-item.c: Fixed a crashing bug.

        * e-table-group.c: Added sorting.  Fixed destruction to delete the
        right things.

        * e-table-group-leaf.c, e-table-group-leaf.h: Pass column and sort
        order information into the e_table_sorted_variable.  Properly
        destroy things when deleted.

        * e-table-group-container.c, e-table-group-container.h: Properly
        handle the list of subgroups.  Handle proper sorting and grouping
        of subgroups.

        * e-table-sorted-variable.c, e-table-sorted-variable.h: Files to
        do a sorted model that stays sorted as you add and remove rows.

        * Makefile.am: Added e-table-sorted-variable.c and
        e-table-sorted-variable.h.

svn path=/trunk/; revision=1930
2000-02-25 04:08:59 +00:00