Commit Graph

324 Commits

Author SHA1 Message Date
d7c03c7ff0 Make saving state work properly.
2000-10-11  Christopher James Lahey  <clahey@helixcode.com>

	* e-table.c: Make saving state work properly.

svn path=/trunk/; revision=5859
2000-10-11 19:37:46 +00:00
6a93e105a2 Fixed the parity on the cursor-mode check.
2000-10-11  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-specification.c: Fixed the parity on the cursor-mode
	check.

svn path=/trunk/; revision=5847
2000-10-11 12:08:55 +00:00
8d310c47bd Changed these to use the default cells.
2000-10-11  Christopher James Lahey  <clahey@helixcode.com>

	* tests/test-tree-1.c, tests/test-tree-2.c, tests/test-tree-3.c:
	Changed these to use the default cells.

From gal/e-table/ChangeLog:

2000-10-11  Christopher James Lahey  <clahey@helixcode.com>

	* e-cell-text.c, e-cell-text.h, e-cell-tree.c, e-cell-tree.h: Got
	rid of the model parameter to e_cell_text_new and e_cell_tree_new
	as they aren't used.

	* e-table-extras.c: Added default "integer" compare and default
	"tree-string", "string", and "checkbox" cells.

	* e-table.c: Made this use the draw-grid, cursor-mode, and
	_click-to-add-message fields from the xml.

svn path=/trunk/; revision=5841
2000-10-11 09:40:22 +00:00
dabe67e33c Example spec file. Not used. Just an example of what you can do.
2000-10-11  Christopher James Lahey  <clahey@helixcode.com>

	* spec.xml: Example spec file.  Not used.  Just an example of what
	you can do.

svn path=/trunk/; revision=5839
2000-10-11 08:43:20 +00:00
e16e25daa7 Changed these to match the new ETable system.
2000-10-11  Christopher James Lahey  <clahey@helixcode.com>

	* tests/test-tree-1.c, tests/test-tree-2.c, tests/test-tree-3.c:
	Changed these to match the new ETable system.

	* gal/Makefile.am: Added e-table-column-specification.lo,
	e-table-extras.lo, e-table-specification.lo, and e-table-state.lo.

From gal/e-table/ChangeLog:

2000-10-11  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Added e-table-column-specification.c,
	e-table-column-specification.h, e-table-extras.c,
	e-table-extras.h, e-table-specification.c,
	e-table-specification.h, e-table-state.c, and e-table-state.h.
	Removed some duplicated .h files.

	* e-cell-tree.c: Ref, sink, and unref the subcell instead of destroying
	it when done.

	* e-table-column-specification.c, e-table-column-specification.h:
	New class which describes a column without having a table get
	instantiated.

	* e-table-config.c: Changed get_specification to get_state to get
	this to compile.

	* e-table-defines.h, e-table-item.h: Moved the definition of
	ETableCursorMode from e-table-item.h to e-table-defines.h.

	* e-table-extras.c, e-table-extras.h: New class which acts as a
	set of 3 hash tables.  All from char * and to alternately, ECells,
	GCompareFuncs, and GdkPxibufs.

	* e-table-scrolled.c, e-table-scrolled.h: Changed this to match
	the new ETable function declarations.

	* e-table-sort-info.c, e-table-sort-info.h: Added functions for
	saving to and loading from xml.

	* e-table-specification.c, e-table-specification.h: New class
	which describes a table without having to instantiate it.

	* e-table-state.c, e-table-state.h: New class which describes the
	state of a table without having to instantiate the table.

	* e-table.c, e-table.h: Changed this to accept both a state and a
	specification instead of just a specification.  You then save only
	the state.  The specification stays exactly the same.  Also, you
	no longer need to pass in an ETableHeader.  Most of the
	information contained in the ETableHeader are in the
	specification.  However you may need to translate some of the
	strings in the specification to objects.  If you need anything
	other than the builtin choices, you need to create an ETableExtras
	and pass it in.

	* e-tree-model.c: Removed an unused variable.

svn path=/trunk/; revision=5837
2000-10-11 08:16:37 +00:00
3012f7b1f2 Removed the assertion that there must be at least 1 column. No way to
2000-10-06  Not Zed  <NotZed@HelixCode.com>

        * e-table-item.c (eti_header_structure_changed): Removed the
        assertion that there must be at least 1 column.  No way to remove
        all columns otherwise (which the header allows).

        * e-table.c (et_xml_config_header): Reconfigure header based on
        xml nodes for header.
        (et_real_set_specification): Just configure the header only, dont
        try to recreate everything.

2000-10-05  Not Zed  <NotZed@HelixCode.com>

        * e-table-scrolled.c (e_table_scrolled_set_specification): Set the
        spec on a scrolled etable.
        (e_table_scrolled_load_specification): Likewise for load.

        * e-table.c (et_real_set_specification): Allow you to set the
        specification after the widget was created.
        (et_real_construct): Changed to use et_real_set_specification to
        set the spec.
        (e_table_load_specification): New frunction, load the
        speficication from a specific file.
        (e_table_set_specification): NEw function to set the specification
        from a string.

svn path=/trunk/; revision=5795
2000-10-09 12:24:54 +00:00
af89b25190 Emit the selection/cursor "changed" signals.
2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>

	* e-table-selection-model.c
	(e_table_selection_model_invert_selection): Emit the
	selection/cursor "changed" signals.
	(e_table_selection_model_select_all): Same.

svn path=/trunk/; revision=5724
2000-10-04 22:36:49 +00:00
60b04c2ac5 Select all elements of the etable.
2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>

	* e-table-selection-model.c (e_table_selection_model_select_all):
	Select all elements of the etable.
	(e_table_selection_model_invert_selection): Invert the current
	selection.

	* e-table.c (e_table_select_all): New convenience function to
	select all elements in an e-table.
	(e_table_invert_selection): New convenience function to invert the
	current selection in an e-table.

svn path=/trunk/; revision=5719
2000-10-04 21:40:08 +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
6e713aeab6 Put in 3 more dialog boxes in these files.
Tue Oct  3 18:28:09 2000  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-config.glade, e-table-config.glade.h: Put in 3 more
	dialog boxes in these files.

svn path=/trunk/; revision=5696
2000-10-03 22:27:58 +00:00
4dd58b9823 change/add prototypes and a typedef for ETreePathCompareFunc.
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
2000-10-02 22:10:13 +00:00
9f50c83ac5 don't screw things up if we sort a collapsed node.
2000-10-02  Chris Toshok  <toshok@helixcode.com>

	* e-tree-model.c (e_tree_model_node_sort): don't screw things up
	if we sort a collapsed node.

svn path=/trunk/; revision=5673
2000-10-02 21:13:43 +00:00
fbbaa67b5f nuke
2000-10-02  Chris Toshok  <toshok@helixcode.com>

	* gal/e-table/e-tree-example-1.c: nuke

	* gal/e-table/e-tree-example-2.c: nuke

	* tests/test-tree-1.c: move gal/e-table/e-tree-example-1.c here.

	* tests/test-tree-2.c: move gal/e-table/e-tree-example-2.c here.

	* tests/Makefile.am: new file.

	* tests/.cvsignore: same.

	* configure.in: AC_OUTPUT (tests/Makefile)

	* Makefile.am (SUBDIRS): add tests dir.

svn path=/trunk/; revision=5671
2000-10-02 20:26:30 +00:00
a36a52e0de flip black and gray, the way i intended them to be.
2000-10-02  Chris Toshok  <toshok@helixcode.com>

	* tree-unexpanded.xpm: flip black and gray, the way i intended them to be.

	* tree-expanded.xpm: same.

svn path=/trunk/; revision=5665
2000-10-02 19:43:43 +00:00
1c2eec1fd4 reinstate file.
2000-10-02  Chris Toshok  <toshok@helixcode.com>

	* tree-expanded.xpm: reinstate file.

	* tree-unexpanded.xpm: same.

	* e-tree-example-1.c (main): remove calls to e_cursor_*, and don't
	create pixbufs.  let's the tree give us the defaults.

	* e-tree-model.c (e_tree_model_node_changed): call
	e_table_model_row_changed on the node's row (if it's visible).
	(e_tree_model_node_inserted): call e_table_model_row_inserted on
	the new node's row, if it's visible.
	(e_tree_model_node_removed): call e_table_model_row_removed on the
	old node's row, if it was visible.

	* e-cell-tree.c (e_cell_tree_construct): allow open_pixbuf and
	closed_pixbuf to be NULL, and default them to the xpm data in
	rtee-{un}expanded.xpm.
	(ect_destroy): call gdk_pixbuf_unref on our open/closed pixbufs.

	* tree-expanded.xpm, tree-unexpanded.xpm: make the + and - a
	little lighter than straight black.

svn path=/trunk/; revision=5660
2000-10-02 18:02:53 +00:00
95412cfb13 Changed.
Fri Sep 29 10:05:58 2000  Christopher James Lahey  <clahey@helixcode.com>

	* e-table.dia: Changed.

svn path=/trunk/; revision=5635
2000-09-29 14:05:00 +00:00
df3d5547e5 New file. Approximate UML description of ETable.
Thu Sep 28 20:01:53 2000  Christopher James Lahey  <clahey@helixcode.com>

	* e-table.dia: New file.  Approximate UML description of ETable.

svn path=/trunk/; revision=5628
2000-09-29 00:01:19 +00:00
dac353c097 Fudge the location of a click in the tooltip, so that it selects the
2000-09-27  Iain Holmes  <iain@helixcode.com>

        * e-cell-text.c: Fudge the location of a click in the tooltip, so
        that it selects the current cell.
        Pass keyboard events to the e-table.

        * e-table-item.c: Don't show the tooltip if the cell is being editted.
        Also don't destroy the tooltip until the button release event (other
        wise the e-table-item starts a select)

2000-09-25  Iain Holmes  <iain@helixcode.com>

        * e-table-header-item.c (draw_button): Calculate the vertical
        offset correctly to centre text.

2000-09-25  Iain Holmes  <iain@helixcode.com>

        * e-table-header-item.c (ethi_popup_best_fit): Fill this out
        to call the "request_width" signal and set the new size.

svn path=/trunk/; revision=5599
2000-09-26 23:38:22 +00:00
ed86d76a07 drag/drop signals need to be added to the same object that is passed to
2000-09-26  Chris Toshok  <toshok@helixcode.com>

	* gal/e-table/e-table.c (e_table_setup_table): drag/drop signals need to be
	added to the same object that is passed to gtk_drag_begin in
	e_table_drag_begin.  namely, the ETable.
	(et_drag_data_received): fix typo - should emit
	TABLE_DRAG_DATA_RECEIVED, not TABLE_DRAG_MOTION.

svn path=/trunk/; revision=5590
2000-09-26 17:10:59 +00:00
1084ed7340 add save_state stuff to ETreeModel, and prototypes for the public methods.
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
2000-09-25 19:02:44 +00:00
b846b91082 Fix include typo.
2000-09-24  Ariel Rios <ariel@arcavia.com>

        * e-tree-model.c: Fix include typo.

svn path=/trunk/; revision=5566
2000-09-25 04:04:17 +00:00
f5ad2892d1 fix sorting - need to update the row_array as well as the actual structure
2000-09-24  Chris Toshok  <toshok@helixcode.com>

	* e-tree-model.c (e_tree_model_node_sort): fix sorting - need to
	update the row_array as well as the actual structure of the
	GNodes.

svn path=/trunk/; revision=5564
2000-09-24 22:01:03 +00:00
68f8a40e35 Typo caused readability problems with ETable.
2000-09-21  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-item.c: Typo caused readability problems with ETable.

svn path=/trunk/; revision=5536
2000-09-21 10:52:22 +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
1367922197 Better calculations for tooltip positions
svn path=/trunk/; revision=5477
2000-09-17 17:18:04 +00:00
e1e7952c86 Added some missing #includes.
2000-09-16  Christopher James Lahey  <clahey@helixcode.com>

	* e-cell-text.c: Added some missing #includes.

	* e-cell-tree.c: Removed an unused variable.

	* e-table-item.c: Added some missing casts.

svn path=/trunk/; revision=5470
2000-09-16 00:04:47 +00:00
b3d655a138 Removed g_print
svn path=/trunk/; revision=5469
2000-09-15 23:44:20 +00:00
6e4ae07fbf If the cursor is inside the subcell, call the show_tooltip on it.
2000-09-15  Iain Holmes  <iain@helixcode.com>

	* e-cell-tree.c (ect_show_tooltip): If the cursor is inside
	the subcell, call the show_tooltip on it.

	* e-table-header-item.c (draw_button): Draw the arrow first,
	then take it's size into account when calculating how to draw
	the text. Use ellipsis if the text it too long.

2000-09-15  Iain Holmes  <iain@helixcode.com>

	* e-table-header-item.c (draw_button): Fix a crash by passing
	the canvas widget to gtk_paint_box. Reported by Radek.

2000-09-14  Iain Holmes  <iain@helixcode.com>

	* e-table-header-item.c (set_cursor): The column isn't resizable
	if it is the last, or if all other columns after it are not
	resizable.

	* e-cell-text.c (ect_max_width): Correctly calculate the width
	of the line of text. Unbuild the current cell and unref the lines
	as well.
	(build_current_cell): Initialize cell->style to 0;

2000-09-14  Iain Holmes  <iain@helixcode.com>

	* e-table-item.c: Start timers for the tooltip to appear, on motion
	events.

	* e-cell.[ch]: Add a new show_tooltip method.

	* e-cell-text.c (ect_show_tooltip): Show the tooltip.

svn path=/trunk/; revision=5466
2000-09-15 21:42:38 +00:00
1cf3dc86f1 Fix a crash in draw_button.
svn path=/trunk/; revision=5444
2000-09-15 13:12:23 +00:00
a5c6e81a2c typo/compile fix
svn path=/trunk/; revision=5441
2000-09-15 01:36:14 +00:00
22f72cc08e Fix some crashes Make double clicking on the header dividers automatically
Fix some crashes
Make double clicking on the header dividers automatically size the header
to it's best fit.
When dragging onto the header check the dragged item is a header object.
Check the column is resizeable before setting the cursor to <->
Use the font and themes to draw the table and items.

svn path=/trunk/; revision=5438
2000-09-15 00:08:06 +00:00
10521ede3f Made bold text calculate widths properly.
2000-09-11  Christopher James Lahey  <clahey@helixcode.com>

	* e-cell-text.c: Made bold text calculate widths properly.

svn path=/trunk/; revision=5331
2000-09-11 18:25:14 +00:00
32496628e7 Made page up and page down active in the ETable.
2000-09-11  Christopher James Lahey  <clahey@helixcode.com>

	* e-table.c: Made page up and page down active in the ETable.

svn path=/trunk/; revision=5319
2000-09-11 11:05:31 +00:00
63292e0907 Fixed the ETableModel callbacks.
2000-09-09  Christopher James Lahey  <clahey@helixcode.com>

	* e-tree-simple.c: Fixed the ETableModel callbacks.

svn path=/trunk/; revision=5293
2000-09-09 21:02:25 +00:00
7816388a7a Added base ETableModel functions.
2000-09-08  Christopher James Lahey  <clahey@helixcode.com>

	* e-tree-example-1.c: Added base ETableModel functions.

	* e-tree-example-2.c: Added base ETableModel functions.  Made it
	never return NULL as a string, instead return "".

	* e-tree-simple.c, e-tree-simple.h: Require base ETableModel
	functions.

svn path=/trunk/; revision=5266
2000-09-08 16:51:21 +00:00
6993fc1c57 Fixed a leak and a double unref.
2000-09-01  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-item.c, e-table.c: Fixed a leak and a double unref.

svn path=/trunk/; revision=5174
2000-09-01 22:28:55 +00:00
943c181c65 new test, a home grown 2 hour hack of a file browser. uses
2000-09-01  Chris Toshok  <toshok@helixcode.com>

	* e-tree-example-2.c: new test, a home grown 2 hour hack of a file
	browser.  uses node_collapsed/emitted signals to populate the left
	tree.

	* Makefile.am: add tree-example-2.c stuff.

	* .cvsignore: add tree-example-2

svn path=/trunk/; revision=5163
2000-09-01 09:05:56 +00:00
0a380243b1 add signals/prototypes for e_tree_model_node_collapsed and
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
2000-09-01 08:57:43 +00:00
c4982eded3 Made the selection work when shift clicking on the first row of the table.
2000-08-31  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-selection-model.c: Made the selection work when shift
	clicking on the first row of the table.

svn path=/trunk/; revision=5139
2000-08-31 13:45:02 +00:00
4b7718f894 Fix the tree example so that is doesn't show two sets of expand/unexpand
icons at tree nodes.

svn path=/trunk/; revision=5137
2000-08-31 07:01:05 +00:00
2529bb621e Make printing of groups work better and make them print headers.
2000-08-28  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-group-container.c: Make printing of groups work better
	and make them print headers.

	* e-table-item.c: Turn off alternating row support.

svn path=/trunk/; revision=5086
2000-08-28 21:21:37 +00:00
876558f75f Remove a ton of (hopefully harmless) warnings from the ETable code.
svn path=/trunk/; revision=5081
2000-08-28 15:27:38 +00:00
20925d94eb Added some g_return_if_fails and g_return_val_if_fails.
2000-08-25  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-col.c, e-table-config.c, e-table-header.c,
	e-table-text-model.c: Added some g_return_if_fails and
	g_return_val_if_fails.

svn path=/trunk/; revision=5056
2000-08-26 09:15:32 +00:00
ffc43362bc Fix an off by one error that was causing crashes.
2000-08-24  Christopher James Lahey  <clahey@helixcode.com>

	* e-table.c: Fix an off by one error that was causing crashes.

svn path=/trunk/; revision=5027
2000-08-24 23:18:08 +00:00
c99edac0b5 Set default values for all of the signal emissions.
2000-08-24  Christopher James Lahey  <clahey@helixcode.com>

	* e-table.c: Set default values for all of the signal emissions.

svn path=/trunk/; revision=5026
2000-08-24 22:24:36 +00:00
aa9505c5ae Check for selection->selection being NULL in
2000-08-24  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-selection-model.c: Check for selection->selection being
	NULL in e_table_selection_model_selected_count.

svn path=/trunk/; revision=5025
2000-08-24 22:03:48 +00:00
5722c2786e Pay attention to the return value from the click signal.
2000-08-24  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-item.c: Pay attention to the return value from the click
	signal.

svn path=/trunk/; revision=5022
2000-08-24 21:24:17 +00:00
5e1949f935 Added a click signal which gets sent if the user hits the left or middle
2000-08-24  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 click signal which gets sent if the
	user hits the left or middle mouse button on a cell.

svn path=/trunk/; revision=5020
2000-08-24 21:13:17 +00:00
3877d4077d Forgot to commit this
svn path=/trunk/; revision=5019
2000-08-24 20:47:23 +00:00