Commit Graph

684 Commits

Author SHA1 Message Date
7530d8bb88 Added bounds checking in a number of places. (etta_init): Initialize all
2001-10-16  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-table-adapter.c (find_next_node_maybe_deleted,
	find_first_child_node_maybe_deleted, find_next_node,
	find_first_child_node, find_row_num): Added bounds checking in a
	number of places.
	(etta_init): Initialize all the fields here.

svn path=/trunk/; revision=13712
2001-10-16 23:27:58 +00:00
a5931319b6 Use new e_table_header_prioritized_column field.
2001-10-12  Christopher James Lahey  <clahey@ximian.com>

	* e-table-click-to-add.c (set_initial_selection): Use new
	e_table_header_prioritized_column field.

	* e-table-header.c, e-table-header.h
	(e_table_header_prioritized_column): New function.  Refactors the
	code from ETableClickToAdd to find the column with the highest
	priority.

	* e-table-selection-model.c, e-table-selection-model.h
	(model_changed_idle): Changed this function to use the
	e_table_header_prioritized_column function.  Added an argument to
	set the "header" on this selection model.

	* e-table-utils.h: Indentation cleanup.

	* e-table.c (et_real_construct): Set the "header" argument on the
	selection model here.

	* e-table.h: #include <gal/e-table/e-table-sorter.h>

svn path=/trunk/; revision=13633
2001-10-12 21:52:49 +00:00
6445c55f20 Copy the can group state on the sort info here.
2001-10-12  Christopher James Lahey  <clahey@ximian.com>

	* e-table-state.c (e_table_state_duplicate): Copy the can group
	state on the sort info here.

svn path=/trunk/; revision=13625
2001-10-12 20:25:21 +00:00
484c8193e1 Implement these functions as pass through to the child cell.
2001-10-10  Christopher James Lahey  <clahey@ximian.com>

	* e-cell-popup.c (ecp_get_bg_color), e-cell-tree.c
	(ect_get_bg_color): Implement these functions as pass through to
	the child cell.

	* e-cell-text.c, e-cell-text.h (ect_get_bg_color): Implemented
	this using a bg_color_column which can be set through the argument
	of the same string.

	* e-cell.c, e-cell.h (e_cell_get_bg_color): Added this function to
	allow background color to change by cell.

	* e-table-item.c (eti_get_cell_background_color): Call
	e_cell_get_bg_color to allow background color to change by cell.

svn path=/trunk/; revision=13566
2001-10-10 20:44:25 +00:00
cd18ff4f51 Added this function.
2001-10-10  Christopher James Lahey  <clahey@ximian.com>

	* e-table.c, e-table.h (e_table_get_selection_model): Added this
	function.

svn path=/trunk/; revision=13548
2001-10-10 11:22:19 +00:00
a191834cb1 Final un-bit rotting. Now actually works.
svn path=/trunk/; revision=13504
2001-10-08 18:39:28 +00:00
482567f1c7 More bit-rot fighting in example.
svn path=/trunk/; revision=13502
2001-10-08 17:07:52 +00:00
7d5b83061f Partial bit-rot fight. Sample still does not work.
svn path=/trunk/; revision=13498
2001-10-08 14:17:54 +00:00
90daf11b95 Check that cell views are realized before doing anything here. Fixes
2001-10-06  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_show_cursor, eti_check_cursor_bounds): Check
	that cell views are realized before doing anything here.  Fixes
	Ximian bug #11919.
	(eti_check_cursor_on_screen): If the cursor values are all set to
	-1, don't do anything.

svn path=/trunk/; revision=13488
2001-10-06 17:43:47 +00:00
c87ef08b95 Handle row and cell changes properly in the uniform_row_height case.
2001-10-06  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_table_model_row_changed,
	eti_table_model_cell_changed): Handle row and cell changes
	properly in the uniform_row_height case.

svn path=/trunk/; revision=13485
2001-10-06 16:52:08 +00:00
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
7547460503 Got rid of the misused button variable here.
2001-10-05  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_event): Got rid of the misused button
	variable here.

svn path=/trunk/; revision=13468
2001-10-05 20:47:54 +00:00
cb48c65b20 Sort the list of categories. (Bug 8088)
2001-10-05  Jon Trowbridge  <trow@ximian.com>

        * gal/widgets/e-categories-master-list-combo.c
        (ecmlc_ecml_changed): Sort the list of categories.
        (Bug 8088)

2001-10-05  Jon Trowbridge  <trow@ximian.com>

        * e-table-without.c (e_table_without_show_all): We need to take
        the row count from the source model, not from the ETableWithout.
        This typo is why contacts kept disappearing in the SelectNames
        dialog. (Bugs 9326, 10916)

2001-10-04  Jon Trowbridge  <trow@ximian.com>

        * e-icon-bar.c (e_icon_bar_add_item): Don't call gdk_pixbuf_ref
        if image is NULL.

        * e-shortcut-model.c (e_shortcut_model_real_get_item_info): Check
        to make sure we don't call gdk_pixbuf_ref on NULL, which causes a
        warning.

svn path=/trunk/; revision=13465
2001-10-05 20:29:31 +00:00
b459329067 Fixed the uniform_row_height + confirm_row_hieght_cache crash.
2001-10-05  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_set_arg): Fixed the uniform_row_height +
	confirm_row_hieght_cache crash.

svn path=/trunk/; revision=13452
2001-10-05 18:49:52 +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
bdc4787aef *.c s/->childs/->xmlChildrenNode/g;
2001-10-06  Michael Meeks  <michael@ximian.com>

	* *.c s/->childs/->xmlChildrenNode/g;

svn path=/trunk/; revision=13431
2001-10-05 01:48:39 +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
86ec9f6f49 Sometimes put off maybe showing the cursor until an idle callback.
2001-10-04  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_idle_maybe_show_cursor): Sometimes put off
	maybe showing the cursor until an idle callback.

	* e-tree-selection-model.c (add_model): Use connect_after to
	connect to all the signals.  This means we can assume the sorted
	tree and table adapters are both done.  This also means that those
	objects cannot assume that the selection is already changed.

svn path=/trunk/; revision=13406
2001-10-04 09:42:53 +00:00
c228df2b30 Initialize the hash field. (model_changed_idle): Send cursor changed and
2001-10-03  Christopher James Lahey  <clahey@ximian.com>

	* e-table-selection-model.c (e_table_selection_model_init):
	Initialize the hash field.
	(model_changed_idle): Send cursor changed and selection changed signals.
	(model_pre_change): If there's no cursor here, make sure to set
	the cursor_id to NULL.

svn path=/trunk/; revision=13373
2001-10-03 15:03:05 +00:00
2e93b3da0b Pick which field of the row to select based on priority.
2001-10-03  Christopher James Lahey  <clahey@ximian.com>

	* e-table-click-to-add.c (set_initial_selection): Pick which field
	of the row to select based on priority.

	* e-table-col.c, e-table-col.h: Added the priority field to this
	class.  Adapted the _new functions appropriately.

	* e-table-column-specification.c, e-table-column-specification.h:
	Added the priority field to this class.

	* e-table-utils.c (et_col_spec_to_col): Handle the priority field here.

svn path=/trunk/; revision=13370
2001-10-03 13:47:56 +00:00
ce45d995aa Only show the cursor during changes if it was already shown. Fixes Ximian
2001-10-02  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c, e-table-item.h: Only show the cursor during
	changes if it was already shown.  Fixes Ximian bug #9810 and
	Ximian bug #4048.

svn path=/trunk/; revision=13297
2001-10-02 11:13:47 +00:00
ec852ee1f9 Stop the sort idle if the root node gets changed.
2001-09-28  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-sorted.c (ets_proxy_node_changed): Stop the sort idle if
	the root node gets changed.

svn path=/trunk/; revision=13227
2001-09-28 20:45:06 +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
820fc32eb4 Set cursor_path = NULL here.
2001-09-26  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-selection-model.c (etsm_node_changed, etsm_destroy): Set
	cursor_path = NULL here.

svn path=/trunk/; revision=13144
2001-09-26 10:17:29 +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
78dc7a128a Attach to the resorted signal instead of the changed signal on the sorted
2001-09-24  Christopher James Lahey  <clahey@ximian.com>

	* e-tree-selection-model.c (etsm_sorted_node_resorted): Attach to
	the resorted signal instead of the changed signal on the sorted
	model.

	* e-tree-sorted.c, e-tree-sorted.h (e_tree_sorted_node_resorted):
	Added this signal.

svn path=/trunk/; revision=13108
2001-09-25 03:19:26 +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
40226dadd5 Assert that the virtual method is implemented instead of being forgiving.
2001-09-24  Federico Mena Quintero  <federico@ximian.com>

	* e-table-group.c (e_table_group_add): Assert that the virtual
	method is implemented instead of being forgiving.
	(e_table_group_add_array): Likewise.
	(e_table_group_add_all): Likewise.
	(e_table_group_remove): Likewise.
	(e_table_group_increment): Likewise.
	(e_table_group_decrement): Likewise.
	(e_table_group_row_count): Likewise.
	(e_table_group_set_focus): Likewise.
	(e_table_group_get_focus): Likewise.
	(e_table_group_get_focus_column): Likewise.
	(e_table_group_get_printable): Likewise.
	(e_table_group_compute_location): Likewise.
	(e_table_group_get_cell_geometry): Likewise.
	(etg_destroy): Clear the fields after we unref them.

	* e-table-group-leaf.c (etgl_destroy): Clear the fields after we
	unref them.
	(e_table_group_leaf_construct): Subsets should not be sunk.  Do
	not ref/sink the subset.

	* e-table-header.c (e_table_header_add_column): Document the fact
	that the header assumes ownership of the column.

svn path=/trunk/; revision=13102
2001-09-24 21:31:50 +00:00
12ecaf7cef Bumped the version number to 0.12.99.0.
2001-09-22  Christopher James Lahey  <clahey@ximian.com>

	* configure.in: Bumped the version number to 0.12.99.0.

	From a patch by Damian Ivereigh <damian@cisco.com>:

	* gal/util/e-util.c, gal/util/e-util.h (e_strftime_fix_am_pm): New
	function, takes the same arguments as strftime, but does some
	fixup if the given string is in 12 hour mode but the locale
	doesn't have AM/PM descriptors.

From gal/e-table/ChangeLog:

2001-09-22  Christopher James Lahey  <clahey@ximian.com>

	From a patch by Damian Ivereigh <damian@cisco.com>:

	* e-cell-date.c: Made this use e_strftime_fix_am_pm instead of
	strftime.

svn path=/trunk/; revision=13081
2001-09-22 19:03:48 +00:00
0a31aa1bf9 Remove the grab if ->grabbed.
* e-table-item.c (eti_unrealize): Remove the grab if ->grabbed.

svn path=/trunk/; revision=13024
2001-09-20 22:59:22 +00:00
cde9b85e6b Confirm row count here. (etsm_get_row_count): Make sure etsm->model isn't
2001-09-19  Christopher James Lahey  <clahey@ximian.com>

	* e-table-selection-model.c (add_model): Confirm row count here.
	(etsm_get_row_count): Make sure etsm->model isn't NULL here.
	If it is, it's not an error.  Return 0 in this case.

svn path=/trunk/; revision=12993
2001-09-19 22:10:43 +00:00
a513a5f502 Bumped version number to 0.11.99.4.
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
2001-09-17 03:57:12 +00:00
b59ff6e2f0 Changed this to change state on button down, even if we aren't editing.
2001-09-13  Christopher James Lahey  <clahey@ximian.com>

	* e-cell-toggle.c (etog_event): Changed this to change state on
	button down, even if we aren't editing.

svn path=/trunk/; revision=12803
2001-09-13 18:33:21 +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
e9ca2eea34 Fixed a silly little obvious bug.
2001-09-07  Jon Trowbridge  <trow@ximian.com>

	* e-table-without.c (e_table_without_show_all): Fixed a silly
	little obvious bug.

svn path=/trunk/; revision=12695
2001-09-07 23:43:27 +00:00
fb24d9b2a8 Added GDK_BUTTON_PRESS_MASK to our button mask. Fixes Ximian bug #8241.
2001-09-07  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_event): Added GDK_BUTTON_PRESS_MASK to our
	button mask.  Fixes Ximian bug #8241.

svn path=/trunk/; revision=12685
2001-09-07 21:05:03 +00:00
109c5702ba Don't do_something on button_release if we did something on button_press.
2001-09-07  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c, e-table-item.h (eti_event): Don't do_something
	on button_release if we did something on button_press.  Fixes
	Ximian bug #3742.

svn path=/trunk/; revision=12680
2001-09-07 19:04:29 +00:00
60e65ee806 Added e-table-config-no-group.glade.
2001-09-07  Christopher James Lahey  <clahey@ximian.com>

	* Makefile.am: Added e-table-config-no-group.glade.

	* e-table-config-no-group.glade, e-table-config.c,
	e-table-config.glade: Removed the fields bit of ETableConfig.

svn path=/trunk/; revision=12678
2001-09-07 18:57:34 +00:00
3f2384a872 Added this function.
2001-09-07  Christopher James Lahey  <clahey@ximian.com>

	* e-table-without.c, e-table-without.h (e_table_without_show_all):
	Added this function.

svn path=/trunk/; revision=12677
2001-09-07 18:53:35 +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
5c1e0a1d9e Strip spaces at the beginning or end as well as changing " " to " ". Fixes
2001-09-02  Christopher James Lahey  <clahey@ximian.com>

	* e-cell-date.c (ecd_get_text): Strip spaces at the beginning or
	end as well as changing "  " to " ".  Fixes Ximian bug #7683.

svn path=/trunk/; revision=12560
2001-09-02 09:26:13 +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
1273682db1 Fix this memmove. We've already subtracted the count from eti->rows.
2001-08-31  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_table_model_rows_deleted): Fix this memmove.
	We've already subtracted the count from eti->rows.

svn path=/trunk/; revision=12550
2001-09-01 01:44:58 +00:00
87b3e9277f Patch to fix few 64bit issues
Tue Aug 28 18:29:28 2001  George Lebl <jirka@5z.com>

	Patch to fix few 64bit issues

	* gal/e-table/e-table-header-item.c (ethi_draw) (ethi_start_drag)
	  gal/widgets/e-categories.c (e_categories_value_at)
	  (e_categories_value_to_string):
	  Use GINT_TO_POINTER and GPOINTER_TO_INT to cast between pointers
	  and ints to fix 64bit issues connected with that.

	* gal/e-table/e-table-sorting-utils.c
	  (e_table_sorting_utils_tree_check_position)
	  gal/util/e-sorter-array.c (e_sorter_array_append):
	  Use size_t for size not ints to fix crashes

	* gal/e-text/e-completion-match.c, gal/e-text/e-completion.c:
	  Include <string.h>

svn path=/trunk/; revision=12507
2001-08-29 01:30:26 +00:00
c4b24c895e Fixed this memmove to subtract the count as well as the row for the number
2001-08-27  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_table_model_rows_deleted): Fixed this
	memmove to subtract the count as well as the row for the number of
	rows to move.

svn path=/trunk/; revision=12482
2001-08-27 15:32:14 +00:00
d30a9fe66f Convert UTF-8 strings to locale's encoding before putting them in canvas
* e-table-group-container.c (compute_text):
Convert UTF-8 strings to locale's encoding before putting them in
canvas item.

svn path=/trunk/; revision=12472
2001-08-25 14:21:41 +00:00
59da647724 Fixed typo.
* e-table.c (e_table_init): Fixed typo.

svn path=/trunk/; revision=12467
2001-08-24 23:32:36 +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
a0bfb48ea7 We need to free_gotten_key_func key2, not key! (e_table_without_show):
2001-08-20  Jon Trowbridge  <trow@ximian.com>

	* e-table-without.c (check_with_key): We need to
	free_gotten_key_func key2, not key!
	(e_table_without_show): Renamed, used to be
	e_table_without_remove.  Double-negative function names
	are confusing!
	(e_table_without_hide_adopt): Renamed, used to be
	e_table_without_add_adopt.
	(e_table_without_hide): Renamed, used to be e_table_without_add.

2001-08-20  Jon Trowbridge  <trow@ximian.com>

	* configure.in: Increment version number to 0.10.99.5 for changes
	to ETableWithout api.

svn path=/trunk/; revision=12332
2001-08-21 00:52:33 +00:00
beba0c1009 Added these functions.
2001-08-20  Christopher James Lahey  <clahey@ximian.com>

	* e-table-subset.c, e-table-subset.h
	(e_table_subset_model_to_view_row,
	e_table_subset_view_to_model_row): Added these functions.

svn path=/trunk/; revision=12317
2001-08-20 18:22:46 +00:00