aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-sorted-variable.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagGNOME_LIBS_1_4_1_4nobody2001-05-231-210/+0
| | | | | | 'GNOME_LIBS_1_4_1_4'. svn path=/tags/GNOME_LIBS_1_4_1_4/; revision=9929
* Fixed some warnings.Christopher James Lahey2001-03-021-80/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Added e-table/e-table-sorting-utils.lo.Christopher James Lahey2001-02-241-382/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Rename from Helix Code -> XimianMiguel de Icaza2001-01-161-1/+1
| | | | svn path=/trunk/; revision=7520
* Set the minimum width of newly created children.Christopher James Lahey2000-12-191-6/+4
| | | | | | | | | | | | | | | | | | | | | 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
* Unref the object instead of destroying it.Federico Mena Quintero2000-12-101-1/+1
| | | | | | | | | | | | | | | 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
* Made it so that rows inserted with their children nodes already in theChristopher James Lahey2000-10-221-1/+3
| | | | | | | | | | 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
* remove timeouts on destroy so they don't try to write to freed dataDan Winship2000-10-201-0/+3
| | | | svn path=/trunk/; revision=6032
* Changed to take into account the sort group, if the table has one.xNot Zed2000-10-041-10/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Moved files, fixed header files and paths - FedericoFederico Mena Quintero2000-09-201-1/+1
| | | | svn path=/trunk/; revision=5513
* Fixed e-table #includes so that it would compile.Chris Lahey2000-09-181-1/+1
| | | | svn path=/trunk/; revision=5482
* Made background colors alternate.Christopher James Lahey2000-08-201-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a handler for "model_pre_change" and properly stop editing.Christopher James Lahey2000-08-031-2/+10
| | | | | | | | | | | | | | | | | | 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
* From mail:Christopher James Lahey2000-06-301-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Removed the freeze/thaw stuff for the model. As Chris wisely pointed out,Federico Mena Quintero2000-06-131-15/+11
| | | | | | | | | | | | | | | | | | | | | | 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
* Added a right click signal.Christopher James Lahey2000-06-061-1/+1
| | | | | | | | | | | | 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
* Fixed the multiple copies of rows in ETable bug.Christopher James Lahey2000-06-021-1/+1
| | | | | | | | | 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
* Made the sort when inserting a signal row be syncronous.Christopher James Lahey2000-06-021-5/+44
| | | | | | | | | 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
* Added right click menus to the table header items.Christopher James Lahey2000-05-241-2/+3
| | | | | | | | | | | 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
* Changed sorting to be at priority level 30.Christopher James Lahey2000-05-161-1/+1
| | | | | | | | | | | | | 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
* Fixed a FIXME comment.Christopher James Lahey2000-05-161-1/+1
| | | | | | | | | | | | | | | | | | 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
* Handle row_inserted and row_deleted signals properly.Christopher James Lahey2000-05-081-1/+10
| | | | | | | | | | | | | | | 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
* use rows here instead of E_TABLE_SUBSET(etsv)->n_map, since the table canChris Toshok2000-05-051-1/+1
| | | | | | | | | * 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
* Add an e_table_group_add_all function and implement it in the differentChristopher James Lahey2000-05-051-0/+25
| | | | | | | | | | | | | | | | | | | | | 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
* Load all the data to be sorted by before actually doing the sort.Christopher James Lahey2000-05-041-17/+47
| | | | | | | | | 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
* Add back in main loop calls during sorting.Christopher James Lahey2000-05-041-0/+2
| | | | | | | | | 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
* Replace insert sort completely with a qsort.Christopher James Lahey2000-05-041-77/+62
| | | | | | | | | 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
* Changed the insert sort to be binary instead of linear.Christopher James Lahey2000-05-041-29/+52
| | | | | | | | | 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
* Made this more reentrant.Christopher James Lahey2000-05-011-0/+49
| | | | | | | | | | | | | | 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
* Got rid of some warnings.Christopher James Lahey2000-04-061-15/+35
| | | | | | | | | | | | | | | 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
* Fix indentationMiguel de Icaza2000-03-301-21/+21
| | | | svn path=/trunk/; revision=2252
* Have identical values get sorted by their actual row.Christopher James Lahey2000-03-061-0/+3
| | | | | | | | | 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
* Added duplicate_value and add_value. Use the new compare functions. MadeChristopher James Lahey2000-02-251-0/+148
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