Commit Graph

52 Commits

Author SHA1 Message Date
c259b85c5d Use g_dataset_set_data_full to find out when the context is destroyed.
2001-10-06  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (context_destroyed), e-table.c (context_destroyed): Use
	g_dataset_set_data_full to find out when the context is destroyed.
	Fixes Ximian bug #8502 and Ximian bug #11691.

svn path=/trunk/; revision=13482
2001-10-06 15:47:29 +00:00
9a92cc103a Adapted height method to deal with a row of -1.
2001-10-05  Christopher James Lahey  <clahey@ximian.com>

	* e-cell-text, e-cell-pixbuf: Adapted height method to deal with a
	row of -1.

	* 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, e-table.c, e-table.h, e-tree.c: Added
	"uniform_row_height" argument.

svn path=/trunk/; revision=13440
2001-10-05 13:27:03 +00:00
c5f392ca0e add E_OBJECT_CLASS_ADD_SIGNALS and E_OBJECT_CLASS_TYPE to ease migration
2001-10-05  Michael Meeks  <michael@ximian.com>

	* gal/util/e-util.h: add E_OBJECT_CLASS_ADD_SIGNALS and
	E_OBJECT_CLASS_TYPE to ease migration to Gnome 2.0 from
	a single source base.

	* All C files:
	s/object_class->type,/E_OBJECT_CLASS_TYPE (object_class),/g;
	s/gtk_object_class_add_signals([^\(]*)\(([^,]*),([^,]*),([^\)]*)/
	E_OBJECT_CLASS_ADD_SIGNALS\1(\2,\3,\4/;

svn path=/trunk/; revision=13428
2001-10-04 23:52:20 +00:00
39e2d6d8a1 Set the step_increment on the horizontal scrollbars here to 20.
2001-09-26  Christopher James Lahey  <clahey@ximian.com>

	* e-table.c, e-tree.c: Set the step_increment on the horizontal
	scrollbars here to 20.

svn path=/trunk/; revision=13146
2001-09-26 11:22:22 +00:00
650c4690b2 Commit patch from Chris to implement e_tree_right_click_up() for
correct right-click behavior in single selection mode.

svn path=/trunk/; revision=13123
2001-09-25 21:24:22 +00:00
53e4dca70f Use the correct prototype for the signal handler.
2001-09-24  Federico Mena Quintero  <federico@ximian.com>

	* e-table.c (et_canvas_button_press): Use the correct prototype
	for the signal handler.

	* e-tree.c (et_canvas_button_press): Likewise.

svn path=/trunk/; revision=13105
2001-09-24 21:51:24 +00:00
3240dc4afc Changed which widget to connect signals to to watch for drag & drop. Fixes
2001-09-10  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (e_tree_setup_table): Changed which widget to connect
	signals to to watch for drag & drop.  Fixes Ximian bugs #7450 &
	#8732.

svn path=/trunk/; revision=12744
2001-09-10 20:52:54 +00:00
099d43d698 Remove debugging message.
* e-tree.c (e_tree_drag_unhighlight): Remove debugging message.

svn path=/trunk/; revision=12599
2001-09-04 20:54:18 +00:00
06eb6e23fb Rename these functions from ecn_get_text and ecn_free_text.
2001-09-01  Christopher James Lahey  <clahey@ximian.com>

	* e-cell-float.c (ecf_get_text, ecf_free_text): Rename these
	functions from ecn_get_text and ecn_free_text.

	* e-cell-tree.c (ect_height): Make sure the height is a multiple
	of two here.

	* e-table-header-item.c, e-table-header-item.h: Added a "tree"
	argument so that the sorting can be set by right clicking on the
	header item.

	* e-table-item.c (eti_table_model_rows_deleted): Added some
	assertions here.

	* e-tree-selection-model.c (etsm_find_node_unless_equals): Fixed
	indentation.

	* e-tree-table-adapter.c (etta_proxy_node_changed): Rewrote this
	to be more readable.
	(e_tree_table_adapter_node_set_expanded): Added an assertion.

	* e-tree.c, e-tree.h (e_tree_get_spec): Added this function.
	(e_tree_setup_header): Set the tree argument on the
	ETableHeaderItem here.

svn path=/trunk/; revision=12553
2001-09-01 08:03:44 +00:00
f7120120cd Added start_drag signals.
2001-08-24  Christopher James Lahey  <clahey@ximian.com>

	* e-table-group-container.c, e-table-group-leaf.c,
	e-table-group-leaf.h, e-table-group.c, e-table-group.h: Added
	start_drag signals.

	* e-table-item.c, e-table-item.h (eti_event): Send the start_drag
	signal.  Fixes Ximian bug #807.

	* e-table.c, e-table.h, e-tree.c, e-tree.h: Added start_drag
	signal.  Made default handler start drag & drop if we're set to
	automatically handle dnd.  Ripped out the code to handle watching
	events for dnd since start_drag does this now.

svn path=/trunk/; revision=12437
2001-08-24 16:33:30 +00:00
6d8437d4a9 Handle GDK_KP_Page_Up, GDK_KP_Page_Down, GDK_KP_Right, and GDK_KP_Left
2001-08-14  Christopher James Lahey  <clahey@ximian.com>

	* e-table.c (group_key_press), e-tree.c (item_key_press): Handle
	GDK_KP_Page_Up, GDK_KP_Page_Down, GDK_KP_Right, and GDK_KP_Left
	here.

svn path=/trunk/; revision=11996
2001-08-14 08:03:25 +00:00
1580b0527c If the sort_info can't group, hide the grouping button and label.
2001-08-10  Christopher James Lahey  <clahey@ximian.com>

	* e-table-config.c (setup_gui): If the sort_info can't group, hide
	the grouping button and label.

	* e-table-header-item.c (ethi_header_context_menu): Removed the
	Group By This Field menu item if the sort_info doesn't support
	grouping.

	* e-table-sort-info.c, e-table-sort-info.h
	(e_table_sort_info_get_can_group,
	e_table_sort_info_set_can_group): Added these functions.

	* e-tree.c (e_tree_set_state_object, et_real_construct): Set
	can_group to FALSE for all our sort infos.
	(e_tree_get_state_object): Fixed a potential gtk_object_ref (NULL)
	here.

svn path=/trunk/; revision=11896
2001-08-10 20:49:24 +00:00
70d5ead8bd Initialize ret_val. (do_drag_motion): Same.
2001-08-09  Jeffrey Stedfast  <fejj@ximian.com>

	* e-tree.c (et_drag_drop): Initialize ret_val.
	(do_drag_motion): Same.

svn path=/trunk/; revision=11861
2001-08-10 00:44:56 +00:00
f453b03db2 Make tree nodes open if you hover over them while drag & dropping.
2001-08-07  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c: Make tree nodes open if you hover over them while drag
	& dropping.

svn path=/trunk/; revision=11746
2001-08-07 22:19:39 +00:00
0cb44895c5 Added scrolling to access nodes that are scrolled off screen for drops.
2001-08-07  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (scroll_timeout): Added scrolling to access nodes that
	are scrolled off screen for drops.  Fixes Ximian bug #5645.

	* e-table.c, e-table.h (scroll_timeout): Added scrolling to access
	rows that are scrolled off screen for drops.  This doesn't work
	for some reason, but I'm checking the code in.

svn path=/trunk/; revision=11724
2001-08-07 05:55:36 +00:00
ba57a90d93 Implemented these functions.
2001-08-06  Christopher James Lahey  <clahey@ximian.com>

	* e-table.c, e-table.h (e_table_drag_highlight,
	e_table_drag_unhighlight): Implemented these functions.

	* e-tree.c (e_tree_drag_highlight, e_tree_drag_unhighlight):
	Implemented these functions.

svn path=/trunk/; revision=11713
2001-08-06 22:07:28 +00:00
966bef8c54 Change these to actually subtract the allocation as they should.
2001-08-03  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (et_drag_motion, et_drag_drop, et_drag_data_received):
	Change these to actually subtract the allocation as they should.

svn path=/trunk/; revision=11649
2001-08-04 05:38:33 +00:00
96484b3644 Subtracted 27.
2001-08-03  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (et_drag_motion, et_drag_drop, et_drag_data_received):
	Subtracted 27.

svn path=/trunk/; revision=11624
2001-08-03 21:19:53 +00:00
7b8d33db23 Set et->priv to NULL here just to be sure.
2001-08-02  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (et_destroy): Set et->priv to NULL here just to be
	sure.

svn path=/trunk/; revision=11588
2001-08-02 18:20:46 +00:00
2f2b112aec Made these functions return -1 if the x and y aren't over any cell at all.
2001-07-12  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (e_tree_get_cell_at): Made these functions return -1 if
	the x and y aren't over any cell at all.

svn path=/trunk/; revision=11077
2001-07-13 02:52:33 +00:00
4da3e76c2c Ignore set_expanded if the node is the root and root_visible is FALSE.
2001-07-12  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-table-adapter.c (e_tree_table_adapter_node_set_expanded):
	Ignore set_expanded if the node is the root and root_visible is
	FALSE.

	* e-tree.c (item_key_press): Don't call set_expanded on NULL
	paths.

svn path=/trunk/; revision=11061
2001-07-12 20:44:02 +00:00
7b9622f8e0 Created this function for key presses that move in some way other than
2001-07-11  Christopher James Lahey  <clahey@ximian.com>

	* gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h
	(e_selection_model_select_as_key_press): Created this function for
	key presses that move in some way other than just to the next or
	previous row.
	(e_selection_model_key_press): Use
	e_selection_model_select_as_key_press for handling home and end
	here.

svn path=/trunk/; revision=10993
2001-07-11 10:30:51 +00:00
0a71e607b1 Made the amount to scroll by smaller here.
2001-07-11  Christopher James Lahey  <clahey@ximian.com>

	* e-table.c (group_key_press), e-tree.c (item_key_press): Made the
	amount to scroll by smaller here.

svn path=/trunk/; revision=10992
2001-07-11 10:17:52 +00:00
73a6f3a7fa Use e_selection_model_do_something directly for page up and page down
2001-07-11  Christopher James Lahey  <clahey@ximian.com>

	* e-table.c (group_key_press), e-tree.c (item_key_press): Use
	e_selection_model_do_something directly for page up and page down
	instead of emulating a key press.

svn path=/trunk/; revision=10990
2001-07-11 09:05:09 +00:00
b0be7c3db2 Added checks that row and col are >= 0.
2001-07-05  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (e_tree_get_cell_geometry): Added checks that row and
	col are >= 0.

svn path=/trunk/; revision=10809
2001-07-05 16:38:59 +00:00
e509ad72df Handle an error in construction a little bit better here.
2001-07-05  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (e_tree_new, e_tree_new_from_spec_file): Handle an
	error in construction a little bit better here.
	(e_tree_get_cursor): Check for row == -1 here.

svn path=/trunk/; revision=10787
2001-07-05 06:42:56 +00:00
a7d41cc36e send signals even if the row/col is -1. (et_drag_drop): same.
2001-06-28  Chris Toshok  <toshok@ximian.com>

	* e-table.c (et_drag_motion): send signals even if the row/col is
	-1.
	(et_drag_drop): same.

	* e-tree.c (et_drag_motion): same.
	(et_drag_drop): same.

svn path=/trunk/; revision=10584
2001-06-29 03:09:48 +00:00
6fa46ef11d Bump version number due to incompatible changes in ETree.
2001-06-27  Peter Williams  <peterw@ximian.com>

        * configure.in: Bump version number due to incompatible changes
        in ETree.


gal/e-table:

2001-06-27  Peter Williams  <peterw@ximian.com>

        * e-tree-selection-model.c (e_tree_selection_model_add_to_selection): New function,
        heavily based on select_single_row.

        * e-tree-selection-model.h: Added prototype;

        * e-tree.c (e_tree_get_model): New accessor function.
        (e_tree_get_selection_model): Same.
        (e_tree_selected_count, e_tree_select_all, e_tree_invert_select): Removed. With
        the accessors these become pointless.

        * e-tree.h: Prototype the functions above. Remove a few functions that
        don't make sense anymore.

svn path=/trunk/; revision=10543
2001-06-27 21:11:34 +00:00
2d3c06b3a4 (Make the alternating row colors a option in ETableSpecification instead
2001-04-28  Jason Leach  <jasonleach@usa.net>

	(Make the alternating row colors a option in ETableSpecification
	instead of a compiled in #define)

	* e-table-specification.c (e_table_specification_load_from_node):
	Read in the "alternating-row-colors=bool" option for
	ETableSpecifications.  Default value is true so unless it is
	specified to be false, row colors will alternate.
	(e_table_specification_save_to_node): Save the alternating row
	color options here.

	* e-table.c (et_build_groups): Pass down the alternating row
	colors through to the ETableGroup.

	* e-table-group-container.[ch]: Handle the new alternating row
	colors
	option here, passing it to ETableItem.

	* e-table-group-leaf.[ch]: Here too.

	* e-table-item.c (eti_get_cell_background_color): Got rid of the
	#define ALTERNATE_COLORS, replaced with truth check for
	ETableItem::alternating_row_colors.

	* e-tree.c: Make ETree recognize alternating row color options as
	well.

svn path=/trunk/; revision=9622
2001-04-29 01:14:50 +00:00
e37b58efec Documented this function properly.
2001-04-23  Christopher James Lahey  <clahey@ximian.com>

	* e-table.c (e_table_get_cell_geometry): Documented this function
	properly.

	* e-tree.c, e-tree.h (e_tree_get_cell_geometry): Added this
	function.

svn path=/trunk/; revision=9533
2001-04-24 02:23:47 +00:00
270a8bdda8 Submit a signal even if there are no extras.
2001-04-19  Christopher James Lahey  <clahey@ximian.com>

	* e-table-header.c (eth_calc_widths): Submit a signal even if
	there are no extras.

	* e-table-item.c (eti_request_column_width): Don't compute widths
	if our cells aren't realized yet.

	* e-tree.c: Call e_table_header_update_horizontal whenever our
	data changes.

svn path=/trunk/; revision=9465
2001-04-20 02:00:23 +00:00
d9dc354180 Free some things that weren't getting freed.
* e-table.c (et_destroy): Free some things that weren't getting
        freed.

        * e-tree.c (et_destroy): Free some things that weren't getting
        freed.
        (e_tree_set_state_object): Don't ref the return value of
        e_table_state_to_header.

svn path=/trunk/; revision=9448
2001-04-18 17:53:14 +00:00
bf3357b91e Set the background color to the specified tooltip->background. Set the
2001-04-15  Christopher James Lahey  <clahey@ximian.com>

	* e-cell-text.c (ect_show_tooltip): Set the background color to
	the specified tooltip->background.  Set the foreground color to
	the specified tooltip->foreground.

	* e-table-item.c (eti_get_cell_background_color,
	eti_get_cell_foreground_color): Added these functions.
	(eti_draw, _do_tooltip): Use these new functions.

	* e-table-tooltip.h: Added foreground and background colors to
	this structure.

	* e-tree.c, e-tree.h (e_tree_get_tooltip): Added this function.

svn path=/trunk/; revision=9338
2001-04-16 02:12:44 +00:00
fa14a7fa47 Return TRUE for left and right arrows.
2001-04-11  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (item_key_press): Return TRUE for left and right
	arrows.

svn path=/trunk/; revision=9234
2001-04-11 12:05:14 +00:00
061419e7f2 Added this function.
2001-04-04  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-selection-model.c, e-tree-selection-model.h
	(e_tree_selection_model_change_cursor): Added this function.

	* e-tree.c (e_tree_set_cursor): Screwed up moving the cursor a
	small bit when I changed this to be faster before.  Fixed it.

svn path=/trunk/; revision=9171
2001-04-04 10:17:37 +00:00
91f381352f Added e_tree_selection_model_select_single_path and made selection_start
2001-04-04  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-selection-model.c, e-tree-selection-model.h: Added
	e_tree_selection_model_select_single_path and made selection_start
	be the path as it should be instead of the row.

	* e-tree-sorted.c: Added a last_access variable to speed up
	access.

	* e-tree-table-adapter.c: Made checking last_access look at the 10
	values before and after the listed value to look for the value
	requested.

	* e-tree.c: Call e_tree_selection_model_select_single_path if
	E_TREE_USE_TREE_SELECTION.

svn path=/trunk/; revision=9169
2001-04-04 08:37:14 +00:00
08940ce6f6 Fix headers. Ditto. Ditto. Ditto. Ditto. Ditto. Ditto. Ditto. Ditto.
2001-04-04  Kjartan Maraas  <kmaraas@gnome.org>

	* e-cell-date.c: Fix headers.
	* e-cell-number.c: Ditto.
	* e-cell-pixbuf.[ch]: Ditto.
	* e-cell-size.c: Ditto.
	* e-cell-text.c: Ditto.
	* e-cell-tree.c: Ditto.
	* e-table-click-to-add.[ch]: Ditto.
	* e-table-column-specification.h: Ditto.
	* e-table-config-field.c: Ditto.
	* e-table-config.[ch]: Ditto.
	* e-table-example-2.c: Ditto.
	* e-table-field-chooser-dialog.[ch]: Ditto.
	* e-table-field-chooser-item.c: Ditto.
	* e-table-field-chooser.h: Ditto.
	* e-table-group-container.c: Ditto.
	* e-table-item.c: Ditto
	* e-table-memory.c: Ditto.
	* e-table-selection-model.c: Ditto.
	* e-table-sorter.c: Ditto.
	* e-table-subset-variable.c: Ditto.
	* e-table.c: Ditto.
	* e-tree-memory.c: Ditto.
	* e-tree-model.c: Ditto.
	* e-tree-selection-model.[ch]: Ditto.
	* e-tree-sorted-variable.c: Ditto.
	* e-tree-sorted.c: Ditto.
	* e-tree-table-adapter.c: Ditto.
	* e-tree.[ch]: Same here.

svn path=/trunk/; revision=9164
2001-04-04 05:24:34 +00:00
71452a5477 Add argument to get the table adapter. (et_set_arg): Add arguments for
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
2001-04-04 00:20:16 +00:00
7e13452f20 Fixed some bugs with the privitization of ETreeSelectionModel.
2001-04-01  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-selection-model.c: Fixed some bugs with the privitization
	of ETreeSelectionModel.

	* e-tree.c: One more required change to make it work with
	E_TREE_USE_TREE_SELECTION on.

svn path=/trunk/; revision=9084
2001-04-01 11:33:03 +00:00
3de1d627a1 Added e-tree-selection-model.c. (libetableinclude_HEADERS): Added
2001-04-01  Christopher James Lahey  <clahey@ximian.com>

	* Makefile.am (libetable_la_SOURCES): Added
	e-tree-selection-model.c.
	(libetableinclude_HEADERS): Added e-tree-selection-model.h.

	* e-tree.c, e-tree.h: Added code to use ETreeSelectionModel if the
	string E_TREE_USE_TREE_SELECTION is defined.

svn path=/trunk/; revision=9082
2001-04-01 11:20:55 +00:00
57f877305c Initialize all necessary fields here.
2001-03-31  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (e_tree_init): Initialize all necessary fields here.

svn path=/trunk/; revision=9081
2001-03-31 23:25:03 +00:00
1bc755bcd9 Roll back another part of the change.
2001-03-31  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (et_real_construct): Roll back another part of the
	change.

svn path=/trunk/; revision=9080
2001-03-31 22:22:58 +00:00
f7e9c117f8 Accidently committed this with using the tree selection model turned on.
2001-03-31  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c, e-tree.h: Accidently committed this with using the
	tree selection model turned on.  Rolled back this change.

svn path=/trunk/; revision=9076
2001-03-31 20:26:01 +00:00
2e9fe25b8e Include <gal/util/e-util.h> here.
2001-03-31  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-scrolled.c: Include <gal/util/e-util.h> here.

	* e-tree-selection-model.c, e-tree-selection-model.h: Privatized
	this class.  Cleaned this up a bit.  Added handlers for signals
	from the model.

	* e-tree.c, e-tree.h: Privatized this class.

svn path=/trunk/; revision=9075
2001-03-31 20:23:20 +00:00
90ed53edb0 Made these use GTK_TYPE_GDK_EVENT whenever sending an event through the
2001-03-30  Christopher James Lahey  <clahey@ximian.com>

	* e-table-group.c, e-table-header-item.c, e-table-item.c,
	e-table.c, e-tree.c: Made these use GTK_TYPE_GDK_EVENT whenever
	sending an event through the signal system instead of
	GTK_TYPE_POINTER.

	* e-table.c, e-tree.c (set_header_canvas_width): Check that none
	of the variables we're going to need are NULL before executing
	this function.

svn path=/trunk/; revision=9042
2001-03-30 10:30:28 +00:00
0e347fdbe1 Changed the signal "table_selection_model" to just be "selection_model"
2001-03-30  Christopher James Lahey  <clahey@ximian.com>

	* 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, e-table.c, e-tree.c: Changed the signal
	"table_selection_model" to just be "selection_model" everywhere
	and made it be ESelectionModels instead of ETableSelectionModels
	for generality.

	* e-table-item.c (eti_event): Make right arrow and left arrow
	accessible as events that can be caught.

	* e-tree-sorted.c, e-tree-sorted.h (e_tree_sorted_orig_position):
	Added this function.

svn path=/trunk/; revision=9041
2001-03-30 08:52:04 +00:00
491523b07c Updated to set the width of the header canvas to be equal to the width of
2001-03-29  Christopher James Lahey  <clahey@ximian.com>

	* e-table.c, e-tree.c, e-tree.h: Updated to set the width of the
	header canvas to be equal to the width of the table canvas to
	avoid infinite loops.  Added left arrow and right arrow as tree
	collapse and expand bindings.

svn path=/trunk/; revision=9035
2001-03-30 01:27:38 +00:00
a6cc0bd7a2 un Mar 25 22:31:19 2001 George Lebl <jirka@5z.com>
* e-tree.c (e_tree_class_init):  Fix gtk_signal_new arguments, INT
	  and POINTER were switched causing my alpha to go nuts.

svn path=/trunk/; revision=8935
2001-03-26 06:38:57 +00:00
7680855427 ref the sort_info taken from the state object. Ditto. Fixes the last ETree
* e-table.c (et_real_construct): ref the sort_info taken from the
	state object.
	* e-tree.c (et_real_construct): Ditto. Fixes the last ETree
	crash-on-exit bug for me.

svn path=/trunk/; revision=8929
2001-03-25 16:55:03 +00:00
2ed07fe856 Added '=' and '-' as tree node expand and collapse
2001-03-25  Christopher James Lahey  <clahey@ximian.com>

	* e-tree.c (item_key_press): Added '=' and '-' as tree node expand
	and collapse

svn path=/trunk/; revision=8923
2001-03-25 08:10:23 +00:00