Commit Graph

307 Commits

Author SHA1 Message Date
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
ba232a706e Added g_return_if_fails.
2000-08-24  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-scrolled.c, e-table.c: Added g_return_if_fails.

svn path=/trunk/; revision=5015
2000-08-24 19:36:44 +00:00
695baf618d Added infrastructure for setting the justification of columns. Still need
2000-08-24  Christopher James Lahey  <clahey@helixcode.com>

	* e-cell-text.c, e-cell-toggle.c, e-cell-tree.c, e-cell.c,
	e-cell.h, e-table-col.c, e-table-col.h, e-table-item.c: Added
	infrastructure for setting the justification of columns.  Still
	need to change the cells to support it and need to add user
	interface to change the justification.

svn path=/trunk/; revision=5010
2000-08-24 19:06:54 +00:00
c512a22478 Fixed a bug in e_table_subset_variable_increment that causes problems with
2000-08-23  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-subset-variable.c: Fixed a bug in
	e_table_subset_variable_increment that causes problems with
	ETree's.  Specifically, when you incremented at position x, the
	row x didn't get incremented as it should (s/>/>=/.)

svn path=/trunk/; revision=4994
2000-08-23 22:59:09 +00:00
049c61546b remove tree-expanded.xpm and tree-unexpanded.xpm.
2000-08-22  Chris Toshok  <toshok@helixcode.com>

	* Makefile.am (icons): remove tree-expanded.xpm and
	tree-unexpanded.xpm.

	* e-tree-example-1.c: use art/tree-expanded.xpm and
	art/tree-unexpanded.xpm.
	(remove_node): commit the change listed below (08-21).

	* tree-expanded.xpm: removed.

	* tree-unexpanded.xpm: removed.

svn path=/trunk/; revision=4975
2000-08-23 01:48:20 +00:00
1e5ae349da Handle iso-8859-1 keys nicely in e-text and e-table. Other encodings to
come...

svn path=/trunk/; revision=4972
2000-08-23 00:22:18 +00:00
a30113eebc Moved drawing of the cell backgrounds from ECell into ETableItem.
2000-08-22  Christopher James Lahey  <clahey@helixcode.com>

	* e-cell-text.c, e-cell-toggle.c, e-cell-tree.c, e-table-item.c:
	Moved drawing of the cell backgrounds from ECell into ETableItem.

	* e-tree-model.c: Include stdlib.c.

svn path=/trunk/; revision=4915
2000-08-22 10:03:36 +00:00
a0e3d19542 Changed UTF-8 handling syntax from char based to byte based
svn path=/trunk/; revision=4913
2000-08-22 02:53:04 +00:00
95ba651873 we can remove nodes with children now.
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
2000-08-22 00:42:14 +00:00
bfd2e9c92d pass table, not site as the closure for these drag signals, since
2000-08-21  Chris Toshok  <toshok@helixcode.com>

	* e-table.c (e_table_drag_source_set): pass table, not site as the
	closure for these drag signals, since e_table_drag_source_event_cb
	assumes it's the table.

svn path=/trunk/; revision=4911
2000-08-22 00:24:03 +00:00
475a5d499c Added e_table_selection_model_selected_count.
2000-08-20  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-selection-model.c: Added
	e_table_selection_model_selected_count.

svn path=/trunk/; revision=4893
2000-08-20 23:18:45 +00:00
9a88f3d4d6 First step moving to UTF-8 strings
svn path=/trunk/; revision=4885
2000-08-20 00:02:10 +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
62ca9f5fd7 Make right click select if the current row is not selected.
2000-08-09  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-item.c, e-table-selection-model.c,
	e-table-selection-model.h: Make right click select if the current
	row is not selected.

svn path=/trunk/; revision=4658
2000-08-09 19:40:04 +00:00
92a068467b Call our parent's destroy method.
2000-07-18  Miguel de Icaza  <miguel@helixcode.com>

	* e-tree-model.c (etree_destroy): Call our parent's destroy
	method.

svn path=/trunk/; revision=4643
2000-08-09 06:33:46 +00:00
e2ad42ace2 Tag some strings for translation.
2000-08-08  Miguel de Icaza  <miguel@helixcode.com>

	* e-table-header-item.c: Tag some strings for translation.

svn path=/trunk/; revision=4642
2000-08-09 06:33:19 +00:00
a0522bcc25 Changed e_popup_menu_run call to match the new arguments.
2000-08-09  Christopher James Lahey  <clahey@helixcode.com>

	* e-table-header-item.c: Changed e_popup_menu_run call to match
	the new arguments.

svn path=/trunk/; revision=4628
2000-08-09 05:15:14 +00:00
c115cff69d Added functions to convert from view row to model row or from model row to
2000-08-05  Christopher James Lahey  <clahey@helixcode.com>

	* e-table.c, e-table.h: Added functions to convert from view row
	to model row or from model row to view row.  Also changed
	e_table_set_cursor_row and e_table_get_cursor_row to take a model
	row as this works better with the rest of the model.  Changed the
	name of e_table_get_next_row_sorted and
	e_table_get_prev_row_sorted.  (Dropped the _sorted.)

svn path=/trunk/; revision=4556
2000-08-05 23:00:41 +00:00