Re: resource allocation behaviour



Hi,

I would also like to extend the mrp-resource data schema with a 'maximum
allocatable
units' field definable on each resource.

What is the definition of this number of units and how does it differ
from the time that a resource has at a certain moment according to its
calendar?

When one assigns a task to a resource in the GUI, a dialog appears offering the option to assign a number of units (the default presented in the current release of planner is 100, implying 100% - this is already configurable by the user).

In the resource usage view, the number of these units assigned at any one time is added up, and if it goes over 100 (again, implying 100%), then the resource is classed as overallocated and marked in red. Here, the figure of 100 was not configurable by the user, but was hard-coded in the planner-usage-row file.

The idea, as far as I can tell from reading discussions in bugzilla, is that people should be able to choose whether or not they actually want 100(%) to be hard-coded as a maximum. Enabling this property on the resource allows a user to choose some other figure. Once set, usage would have to go above this new figure before the resource was marked red in the resource usage view and classed as overallocated. Also, different resources can be given different limits.

One example I have been using this for when talking to people is if someone only works part time, but as you say, you can already get around this by changing the calendar for the resource.

However, it is also usable to represent other circumstances - if you know one resource is more efficient than another, for example. Then resource 1, an experienced worker, could have a maximum of 100, and resource 2, an apprentice, could have a maximum of maybe 65.

Another scenario may be if you want to allocate with more precision than 1/100 units - 1/1000, say, or one in a million.

In any case, I think having something which is configurable with a sensible default is better than having something which is hard-coded, as is currently the case.

Only the option on the project to set overload behaviour is left, so I will
use a flag for now, then look at adding it to the schema when I start
introducing algorithms to choose from - at that point I will have a better
idea as to what behaviour this option will need to hold.

I'm not sure what you mean by flag. Do you mean a custom project
property?

I have been working with a #define variable in the mrp-project.h file, which if set to true turns on overload checking, and false turns it off and goes back to 'normal'. We can leave it set to false by default in any further patches I release until we feel it is time to add it to the schema. The other possibility is having it as a compile-time option, and this might be worth looking into if it looks like putting through a schema change is going to take any length of time.

I reviewed everything and in general it looks pretty good. Most of my
comments below are about rather minor issues. Most of them I would just
fix myself before committing, but I'll mention them anyway. The number
in front is the line number.

OK, thanks - I have attached revised patches for most of your comments and a changelog entry.

Further discussion:

The first is that units_in_use is sort of a caching variable. There are
times when the values stored in them are not up-to-date. Some functions
have as a precondition that those values are up-to-date, so I would like
to have them verify that precondition. To enable them to do that, some
other functions should 'invalidate' that cache somehow.

I hadn't covered this, mainly because it's not just that units_in_use is a cached variable - the larger issue is that GLists of MrpAssignmentEdges also effectively cache information. Anything one does within the project which invalidates units_in_use probably invalidates at least part of any edges GList in existence at the same time. For that reason, the life cycle of all the functions I have written is to build, analyse and then immediately free edges GLists, also freeing any cached units_in_use values. Any change to the project which requires these functions to be called again in order to recalculate units_in_use then requires a rebuilding of the edges GList. This is pretty much the same behaviour which was already present in planner in the resource usage view.

I think this problem intellectually boils down to a design choice when planner was originally written, regarding whether the edge or the task was chosen as the fundamental object detailing project entries. For whatever reason, the task won, so all this current work with edges is made more difficult, as they have to be derived from tasks when needed. On the other hand, who knows what might be made more difficult if the edge had been chosen as the fundamental object (a task becoming more of a 'container' for edge objects). In any case, planner is pretty advanced now as it is, working with tasks.

Coming back to your point, I agree, as it stands, another developer could still use the functions to build and analyse an edges GList without freeing it, then make the mistake of assuming it represented live data and not a cache. I could either get around this:

- using a similar technique to the one you describe above, although I have no feeling right now whether it would be better to store a stale-cache gboolean within the edge objects, or within some other entity (the resource?) which then acts as a cache manager. I think, to be honest, this approach would not completely remove the problem - any other developer could still accidentally ignore a stale-cache gboolean when implementing other routines.

- or, alternatively, provide for a permanent GList of edge objects to be bound to a resource, and make provision in the code for this list to be updated (presumably via signals) every time the resource's assignments are updated. This is much more work, and would require my delving further into the guts of planner, but might work out more efficient in the end since the edges list wouldn't have to be rebuilt every time a calculation is made.

I did think about doing something like this latter, but I rejected it as it felt too much like trying to rewrite planner so that edges became a more fundamental quantity, the down side being duplication of information between edges and tasks, and confusion as to which type to use in different scenarios.

mrp-assignment:

276: this function is hard to read (because of things like using the
enum in a subtraction and as a boolean condition). I think it can be
made more readable and faster at the same time by not splitting out the
'common' part of mrp_assignment_edges_remove_to_last_before and
mrp_assignment_edges_remove_from_first_after.

Point taken. I have removed it and the enum, and reworked the before and after functions as you suggested. However, the functions don't quite perform in the same way as the examples you gave, so they remain a little more long-winded. Now that they are two separate functions, however, I have ditched the two g_list_reverses, and used g_list_last instead.

911: I don't see why mrp_resource_test_if_overallocated() should exist.
The MrpResourceAllocation enum is visible from the same places as this
function is, so people could just call mrp_resource_allocation_status
and compare.

This function doesn't just call mrp_resource_allocation_status - it makes a call to mrp_resource_get_max_units_used_between as well. In effect, it first finds out what the max units in use are, then looks up that number in a 'table' of overallocation conditions to see whether overallocation has occurred. People would have to make both these calls and the comparison every time they wanted to check a resource's overallocation status.
2008-11-28  Lee Baylis <lee leebaylis co uk>

	* libplanner/mrp-assignment.c (assignment_edge_compare),
	(mrp_assignment_edges_insert_sorted_from_assignment),
	(mrp_assignment_edges_insert_sorted_from_assignment_list),
	(mrp_assignment_edges_plot_units_in_use),
	(mrp_assignment_edges_calculate_max_units_in_use),
	(mrp_assignment_edges_remove_to_last_before),
	(mrp_assignment_edges_remove_from_first_after),
	(mrp_assignment_edge_get_delta_units):
	  Moved and changed Date struct from planner-usage-row to become
		MrpAssignmentEdge struct;
	  Introduced functions for creating and manipulating lists of 
		MrpAssignmentEdge objects.
	* libplanner/mrp-assignment.h:
	* libplanner/mrp-resource.c (mrp_resource_get_assignment_edges),
	(mrp_resource_allocation_status),
	(mrp_resource_test_if_overallocated),
	(resource_get_edges_with_units_in_use),
	(mrp_resource_get_max_units_used_between),
	(mrp_resource_get_available_units_between),
	(mrp_resource_get_available_units_during):
	  Moved logic for calculating overallocation from planner-usage-row;
	  Introduced functions for listing and analysing a resource's 
		MrpAssignmentEdge objects;
	  Introduced resource overallocation test function.
	* libplanner/mrp-resource.h:
	* src/planner-usage-row.c (usage_row_realize),
	(usage_row_draw_resource_ival), (usage_row_draw_resource),
	(usage_row_draw_assignment): 
	  Moved Date & date_type structs and the date_compare 
		function to mrp-assignment;
	  Moved code which initialised Dates to mrp-assignment;
	  Replaced 12 color variables with 4 color_scheme structs 
		and matched them to overallocation scenarios;
	  Moved logic for calculating overallocation to mrp-resource.

2008-11-05  Maurice van der Pot  <griffon26 kfk4ever com>

	* libplanner/mrp-parser.c: Removed unused function.
	* libplanner/mrp-task-manager.c: Commented out unused functions.
	* configure.in:
	* data/ui/main-window.ui:
	* src/planner-gantt-print.c:
	* src/planner-gantt-print.h:
	* src/planner-gantt-view.c (gantt_view_print):
	* src/planner-print-dialog.c:
	* src/planner-print-dialog.h:
	* src/planner-print-job.c:
	* src/planner-print-job.h:
	* src/planner-resource-view.c (resource_view_print),
	(resource_view_cost_data_func):
	* src/planner-table-print-sheet.c:
	* src/planner-table-print-sheet.h:
	* src/planner-task-view.c (task_view_print),
	(task_view_print_cleanup):
	* src/planner-usage-view.c (usage_view_print):
	* src/planner-view.c (planner_view_print):
	* src/planner-view.h:
	* src/planner-window.c: Rewrote printing to use the GTK printing API. Thanks
	to Francisco Moraes for an initial patch. Also fixed a few memory leaks.

2008-09-01  Maurice van der Pot  <griffon26 kfk4ever com>

	* src/planner-usage-row.c (usage_row_draw_resource_ival),
	(usage_row_draw_resource): Fix drawing of the left edge of resource usage
	bars, patch by Lee Bay <lee leebaylis co uk>

2008-08-21  Maurice van der Pot  <griffon26 kfk4ever com>

	* data/stylesheets/Makefile.am:
	* data/stylesheets/html1_css.xsl:
	* data/stylesheets/html1_css_ie.xsl:
	* data/stylesheets/html1_css_ie7.xsl:
	* data/stylesheets/html1_gantt.xsl:
	* data/stylesheets/html1_resources.xsl:
	* data/stylesheets/html1_tasks.xsl:
	* data/stylesheets/planner2html.xsl:
	Switched over from tables to divs for layout. Markup and CSS was validated
	and tested with Firefox 3.0.1 (perfect), Firefox 2.0.0.16 (minor issue with
	scrollbars), Opera 9.51 (perfect), Internet Explorer 6.0 & 7.0 (gantt
	scrollbars always visible, milestone diamond is shown as a square).
	Should fix bugs #471218 and #478027.

2008-07-29  Maurice van der Pot  <griffon26 kfk4ever com>

	* Makefile.win32: Fix makefile for Windows to work with both libpng <=
	1.2.8, where the dll was named libpng13.dll, and libpng >= 1.2.29, where it
	is named libpng12-0.dll.

2008-07-29  Maurice van der Pot  <griffon26 kfk4ever com>

	* Makefile.win32: Added font description files needed for printing on
	Windows (fixes crashes or lock-ups when trying to print). Also added a
	printer icon that was missing and the menu description for the print preview
	window.
	* data/planner.rc.in: Removed a few references to "Imendio Planner"	that
	would end up in the executable for Windows.

2008-07-22  Maurice van der Pot  <griffon26 kfk4ever com>

	* src/Makefile.am:
	Now building everything in src/ except planner_main.c into a convenience
	library that can be used for testing.

	* src/planner-cmd-manager.c (transaction_cmd_do): Abort redo-ing as soon as
	the end of the transaction is encountered. Fixes bug #420443 reported by
	Lincoln Phipps <lincoln phipps openmutual net>.

	* tests/Makefile.am:
	* tests/cmd-manager-test.c (test_cmd_do), (test_cmd_undo),
	(test_cmd_free), (test_cmd), (main):
	Added test for PlannerCmdManager, including regression test for bug #420443.

2008-07-22  Maurice van der Pot  <griffon26 kfk4ever com>

	* libplanner/mrp-paths-gnome.c (mrp_paths_get_image_dir):
	Fix path to images, which was incorrectly set to "glade" in previous commit.

2008-07-22  Maurice van der Pot  <griffon26 kfk4ever com>

	* libplanner/mrp-calendar.c (mrp_calendar_copy):
	Fix a bug in copying default day types when copying a calendar on 64-bit
	platforms.

	* tests/calendar-test.c (main):
	Fixed a bug in the tests that only showed up on 64-bit platforms.

	* libplanner/Makefile.am:
	* libplanner/mrp-paths-gnome.c (mrp_paths_get_glade_dir),
	(mrp_paths_get_image_dir), (mrp_paths_get_plugin_dir),
	(mrp_paths_get_dtd_dir), (mrp_paths_get_stylesheet_dir),
	(mrp_paths_get_storagemodule_dir),
	(mrp_paths_get_file_modules_dir), (mrp_paths_get_ui_dir),
	(mrp_paths_get_sql_dir):
	* tests/Makefile.am:
	* tests/files/Makefile.am:
	Allow various paths to be overridden through environment variables, so the
	tests can be run before planner (and its plugins) have been installed.
	Now tests are run successfully in make check and make distcheck.

2008-07-20  Maurice van der Pot  <griffon26 kfk4ever com>

	* libplanner/mrp-sql.c: Properly fixed bug #539993.

2008-07-20  Maurice van der Pot  <griffon26 kfk4ever com>

	* acinclude.m4: change --with-compile-warnings to --enable-compile-warnings
	* autogen.sh: fix error from sed when running autogen.sh
	* libplanner/mrp-sql.c: Fix missing semicolon in database support code,
	fixing bug #539993 (patch by Mirco Müller <mirco mueller ubuntu com>).
	* src/planner-window.c: (window_restore_state): Use a reasonable default
	window size if no previous window size is known.

2008-07-18  Maurice van der Pot  <griffon26 kfk4ever com>

	* Makefile.win32:
	* installer/planner-installer.nsi:
	Fixed paths to executable in installer and included GTK+ translations.
	Thanks to Massimiliano Franco for bringing these problems to my attention.

2008-07-17  Maurice van der Pot  <griffon26 kfk4ever com>

	* Makefile.win32:
	* installer/english.nsh:
	* installer/langmacros.nsh:
	* installer/planner-installer.nsi:
	* libplanner/Makefile.win32:
	* src/Makefile.win32:
	Added a 'createinstaller' target to the Makefiles for Windows that uses the
	Nullsoft scriptable install system to create an installer.

2008-04-29  Maurice van der Pot  <griffon26 kfk4ever com>

	* tests/Makefile.am: Fix for parallel build issue reported as bug #529045 by
	Gilles Dartiguelongue <gilles dartiguelongue esiee org>

2008-04-20  Maurice van der Pot  <griffon26 kfk4ever com>

	* configure.in: Enabling evolution data server backend support caused
	configure to fail (bug #528971). Thanks to Robin Cook <rcook wyrms net> for
	noticing and providing a patch.
	* libplanner/Makefile.am: Adding -lm to LIBADD for libplanner as suggested
	by Marcin Banasiak <megabajt pld-linux org>, hopefully fixing bug #528582
	reported by Patryk Zawadzki <patrys pld-linux org>.

2008-04-16  Maurice van der Pot  <griffon26 kfk4ever com>

	* NEWS:
	* configure.in: Version 0.14.3

2008-04-15  Maurice van der Pot  <griffon26 kfk4ever com>

	* data/mime/Makefile.am: Remove the update-desktop-database line altogether,
	because as far as I can tell it's the distribution's job to run it.
	The change previously committed was incorrect. The build may have succeeded,
	but the mimeinfo cache was generated in the wrong place.

2008-04-13  Maurice van der Pot  <griffon26 kfk4ever com>

	* data/mime/Makefile.am: Prevent failure of update-desktop-database when not
	performing make install as root.

2008-04-08  Maurice van der Pot  <griffon26 kfk4ever com>

	* configure.in: Now requiring libxml-2.6.27 and libxslt-1.1.23, because the
	latter is the first release containing the week-in-year fix (bug #452876),
	which we need for our changes in html1_gantt.xsl committed in revision 850.

2008-04-05  Maurice van der Pot  <griffon26 kfk4ever com>

	* Makefile.win32: Add better default PREFIX for build on Windows.
	* data/stylesheets/planner2html.xsl: Update link to homepage in exported
	HTML and underline it so people will know it's a link (bug #430477).

2008-03-26  Maurice van der Pot  <griffon26 kfk4ever com>

	* src/planner-gantt-view.c: (gantt_view_create_widget):
	Added percent	complete column to gantt view as well.
	* src/planner-task-tree.c: (task_tree_complete_edited),
	(task_tree_add_column):
	Added range checking for percent complete column to prevent GTK warnings.

2008-03-15  Maurice van der Pot  <griffon26 kfk4ever com>

	* data/stylesheets/html1_gantt.xsl:
	Use long resource name in exported HTML if no short resource name is given,
	also for milestone tasks (bug #439180).

2008-03-15  Maurice van der Pot  <griffon26 kfk4ever com>

	* libplanner/mrp-task-manager.c:
	(remove_parent_predecessors_from_dependency_graph),
	(remove_parent_from_dependency_graph),
	(add_parent_predecessors_to_dependency_graph),
	(add_parent_to_dependency_graph),
	(task_manager_build_dependency_graph),
	(task_manager_do_forward_pass), (task_manager_do_backward_pass),
	(check_move_traverse_recursive), (check_move_traverse),
	(mrp_task_manager_check_move):
	Fixed bug #382548. Planner now correctly detects loops that would be created
	by indenting a task that is a predecessor of the task that would become its
	parent, so it will no longer crash trying to undo an invalid action.
	* tests/task-test.c: (main):
	Added regression tests for bug #382548 and related issues.

2008-03-03  Kurt Maute  <kurt maute us>
	* src/planner-task-view.c
	Patch to correct L10N error per bug # 520064

2008-02-27  Kurt Maute  <kurt maute us>
	* src/planner-task-tree.c
	* src/planner-gantt-model.c
	* src/planner-gantt-model.h
	* src/planner-task-view.c:
	Patch to add % complete column to task view.  Original patch by Robert
	Mibus, enhanced by me to allow edit of the % complete column in task
	view.  Bug # 379975


2008-02-15  Maurice van der Pot  <griffon26 kfk4ever com>

	* src/planner-task-tree.c: (planner_task_tree_indent_task),
	(planner_task_tree_unindent_task),
	(planner_task_tree_move_task_up):
	Keep selection as much as possible when indenting and unindenting.

2008-02-15  Maurice van der Pot  <griffon26 kfk4ever com>

	* src/eel-canvas-rect.c: (eel_canvas_rect_bounds):
	* src/planner-gantt-chart.c: (gantt_chart_map),
	(gantt_chart_size_allocate), (gantt_chart_reflow_idle),
	(planner_gantt_chart_reflow_now),
	(gantt_chart_project_start_changed),
	(planner_gantt_chart_set_model), (gantt_chart_get_visible_region),
	(gantt_chart_set_zoom):
	* src/planner-gantt-chart.h:
	* src/planner-gantt-row.c: (gantt_row_drag_item_to_pointer),
	(gantt_row_scroll_timeout_cb), (get_drag_spot), (gantt_row_event):
	Allow dragging of duration beyond the window size and show the percentage in
	the status bar when dragging progress.

2008-02-14  Maurice van der Pot  <griffon26 kfk4ever com>

	* data/mime/planner.xml.in: Added indication that mime-type
	application/x-planner is a sub-class of application/xml.

2008-02-14  Maurice van der Pot  <griffon26 kfk4ever com>

	* configure.in:
	* libplanner/Makefile.am:
	* libplanner/mrp-sql.c: (sql_execute_command), (sql_execute_query),
	(sql_get_last_error), (get_int), (get_id), (get_string),
	(get_boolean), (get_float), (is_field), (get_inserted_id),
	(mrp_sql_init), (sql_read_project), (sql_read_phases),
	(sql_read_property_specs), (sql_read_property_values),
	(sql_read_overriden_day_types), (sql_read_overriden_days),
	(sql_read_day_types), (sql_read_calendars), (sql_read_groups),
	(sql_read_resources), (sql_read_assignments), (sql_read_relations),
	(sql_read_tasks), (mrp_sql_load_project), (sql_write_project),
	(sql_write_phases), (sql_write_phase), (sql_write_property_specs),
	(sql_write_property_values), (sql_write_day_types),
	(sql_write_overridden_day_type), (sql_write_overridden_dates),
	(sql_write_calendars_recurse), (sql_write_calendar_id),
	(sql_write_groups), (sql_write_default_group_id),
	(sql_write_resources), (sql_write_tasks), (mrp_sql_save_project):
	* libplanner/mrp-sql.h:
	* libplanner/mrp-storage-sql.c: (storage_sql_init):
	* src/Makefile.am:
	* src/planner-sql-plugin.c: (sql_execute_command),
	(sql_execute_query), (sql_get_last_error), (get_int), (get_string),
	(check_database_tables), (create_database),
	(sql_get_tested_connection), (sql_plugin_retrieve_project_id),
	(sql_plugin_save), (plugin_init):
	Added support for libgda 3 as requested by Martin-Ã?ric Racine
	<q-funk iki fi> in bug #511833.

2008-02-11  Maurice van der Pot  <griffon26 kfk4ever com>

	* src/planner-sidebar.c: (planner_sidebar_append):
	Created a LABEL_FOR relation for buttons in the sidebar to improve
	accessibility as suggested in bug #337382 by Rich Burridge
	<rich burridge sun com>.

2008-02-09  Maurice van der Pot  <griffon26 kfk4ever com>

	* libplanner/mrp-task-manager.c:
	(task_manager_calculate_task_finish),
	(task_manager_calculate_task_start_from_finish):
	Don't let fixed duration tasks run during non-working intervals on a working
	day (such as lunch time). This fixes the incorrect duration of fixed duration 
	tasks as reported in bug #486990 by Sebastien Roy <sebastien roy sun com>.

	* libplanner/mrp-task.c: (task_class_init): 
	Fixed typo in property description.

	* src/planner-gantt-row.c: (gantt_row_notify_cb):
	Allow changes in scheduling mode to update the gantt bar appearance.

2008-02-02  Maurice van der Pot  <griffon26 kfk4ever com>

	* libplanner/mrp-sql.c: (mrp_sql_load_project),
	(mrp_sql_save_project):
	* src/planner-sql-plugin.c: (sql_get_tested_connection):
	Now setting time zone to UTC in all connections to the database, otherwise
	the database will assume date fields are in local time and mess up the
	conversion to seconds since epoch. This caused a shift in project_start each
	time a project was read from the database.

2008-01-29  Kurt Maute  <kurt maute us>
	Patch to correct distcheck error, courtesy of Gilles Dartiguelongue
	(bug #464359)
	* data/mime/Makefile.am
	* data/Makefile.am
	* data/stylesheets/Makefile.am
	* Makefile.am

	Patch to resolve bug #312029
	* data/glade/resource-input-dialog.glade


2008-01-23  Maurice van der Pot  <griffon26 kfk4ever com>

	* data/stylesheets/msp2planner.xsl: Now using OutlineNumber instead of WBS
	when importing MS project XML, fixing bug #373008.

2008-01-13  Maurice van der Pot  <griffon26 kfk4ever com>

	* data/stylesheets/html1_tasks.xsl: fix calculation of task costs in
	exported HTML for tasks worked on by multiple people (bug #499090).

2007-12-09  Maurice van der Pot  <griffon26 kfk4ever com>

	* configure.in: don't fail on make install if update-mime-database or
	update-desktop-database weren't found.
	* src/planner-sql-plugin.c: (check_database_tables): call g_object_unref
	instead of g_free on results from sql_execute_query. Should fix bug #397132.

2007-07-28  Kurt Maute  <kurt maute us>
	Patch to correct week number by Maurice van der Pot <griffon26 kfk4ever com>
	*libplanner/mrp-time.c
	*libplanner/mrp-time.h
	*src/planner-scale-utils.c
	*data/stylesheets/html1_gantt.xsl
	Patch to use po/LINGUAS file by Gilles Dartiguelongue:
	*configure.in
	*autogen.sh
	*po/LINGUAS

2007-07-28  Kurt Maute  <kurt maute us>
	Two patches from Maurice van der Pot:
	* src/planner-task-tree.c - disable selection updates before manipulating
	tasks (works for single selection, but not multiple - bug 436263)
	* src/planner-gantt-row.c - fix resource name redraw in gantt chart when
	dragging relation arrow over it
	* MAINTAINERS - added Maurice
	* AUTHORS - added Maurice

2007-07-15  Kurt Maute  <kurt maute us>
	The following update provided by Maurice van der Pot <griffon26 kfk4ever com>
	* src/planner-gantt-row.c  - allow dragging the completion bar in the
	gantt chart
	Clean up some of the indenting in the .xsl files:
	* data/dtd/mrproject-0.6.dtd
	* data/stylesheets/html1_tasks.xsl
	* data/stylesheets/html1_css.xsl
	* data/stylesheets/html1_resources.xsl
	* data/stylesheets/msp2planner.xsl
	* data/stylesheets/html1_gantt.xsl
	* data/stylesheets/planner2html.xsl

2007-07-02  Kurt Maute	<kurt maute us>
	The following update provided by Maurice van der Pot <griffon26 kfk4ever com>
	* configure.in:  escape newlines in ALL_LINGUAS
	* data/stylesheets/html1_css_ie.xsl
	* data/stylesheets/html1_css.xsl
	* data/stylesheets/html1_gantt.xsl
	* data/stylesheets/Makefile.am
	* data/stylesheets/planner2html.xsl - fix layout of gantt chart in
	HTML export (headers not aligned with gantt bars) per bug #393620

2007-06-11  Chao-Hsiung Liao  <j_h_liau yahoo com tw>

        * configure.in: Added 'zh_HK' to ALL_LINGUAS.

2007-04-12  Gintautas Miliauskas  <gintas akl lt>

	* configure.in: Added 'lt' to ALL_LINGUAS.

2007-03-13  Kurt Maute	<kurt maute us>
	* planner-gantt-chart.c
	* planner-gantt-chart.h
	* planner-gantt-view.c:
	Store 'Show Guide Lines' setting in gconf - contributed by Marie
	Durand <marie durand teamlog com>

2007-02-05  Matic Zgur <mr zgur gmail com>

	* configure.in: Added 'sl' to ALL_LINGUAS.

2007-01-03 Jordi Mas i Hernàndez <jordimash gmail com>

	* planner-gantt-view.c: adds mouse wheel support to
	to the gannt view.
	* planner-usage-view.c: adds mouse wheel support to
	to the usage view.

2007-01-02 Jordi Mas i Hernàndez <jordimash gmail com>

	* libplanner/mrp-task-manager.c: fixes bug #372694

2006-12-27 Jordi Mas i Hernàndez <jordimash gmail com>

	*  planner-html-plugin.c: fixes bug #388454. We were freeing a 
	memory block that was already free.

2006-12-27 Jordi Mas i Hernàndez <jordimash gmail com>

	* data/stylesheets/html1_gantt.xsl: I18N for strings and dates 
	* data/stylesheets/html1_resources.xsl: I18N for strings and dates
	* data/stylesheets/html1_tasks.xsl: I18N for strings and dates
	* data/stylesheets/planner2html.xsl: I18N for strings and dates
	* libplanner/mrp-xsl.c: Add I18N support for HTML export
	* po/POTFILES.in: Adds localizable.xml
	* data/stylesheets/localizable.xml: New strings to localise

2006-12-14 Kurt Maute <Kurt Maute us>
	* src/planner-window.c:  use ngettext for translation of plural.  Bug
	# 345163, patch contributed by Arthur Petitpierre
	* data/stylesheets/html1_css.xsl:  fix row height alignment of gantt
	on html export when viewed in Internet Explorer.  Bug # 332748, patch
	contributed by Nico de Groot
	* data/images/(various).png: commit Tango images contributed by
	Frédéric Bellaiche via bug #357525

2006-11-26 Kurt Maute <Kurt Maute us>
	* configure.in:  Version 0.14.2
	* data/mime/planner.xml.in: bug #353232 - patch to raise majic
	priority, fixing nautilus behavior when clicking on a planner file

2006-11-25 Kurt Maute <Kurt Maute us>
	* src/planner-gantt-background.c:  bug #368186 - patch to paint guide
	lines behind project start date rather than on top - contributed by
	Arthur Petitpierre
	* acinclude.m4:  added -Wno-return-type for compile with database
	enabled
	* configure.in
	* libplanner/mrp-sql.c
	* src/planner-sql-plugin.c:
	  patch related to bug #353213 - added #ifdefs to allow compile with
	  libgda 1 or 2, up to libgda-1.9.102

2006-11-18  Djihed Afifi  <djihed gmail com>

	* configure.in: Added Arabic.

2006-11-12 Kurt Maute <Kurt Maute us>
	* src/planner-gantt-row.c: fix for bug 358415 crash in gantt view,
	contributed by Arthur Petitpierre and mdpoole trolius org.

2006-09-24 Kurt Maute <Kurt Maute us>
	* configure.in:  Version 0.14.1

2006-09-23 Kurt Maute <Kurt Maute us>
	* data/planner.1:  man page contributed by Martin-Eric Racine
	* data/Makefile.am:  for man page contributed by Martin-Eric Racine
	* configure.in: fix for bug #353213 contrubuted by Dennis Lubert
	* libplanner/mrp-sql.c: fix for bug #353213 contrubuted by Dennis Lubert
	* src/planner-sql-plugin.c: fix for bug #353213 contrubuted by Dennis Lubert

2006-09-13  Pema Geyleg  <pgeyleg gmail com>

	* configure.in: Added dz in ALL_LINGUAS

2006-07-08 Kurt Maute <Kurt Maute us>
	* docs/user-guide/es/planner.xml:  add encoding to header, correct <mediaobject> tags
	* docs/user-guide/eu/planner.xml:  convert from dos to unix format
	* src/planner-format.c:  fix NULL pointer deref - bug #334121
	* src/planner-gantt-row.c:  patch to fix segv on scrolling - bug #345517

2006-06-20 Kurt Maute <Kurt Maute us>
	* docs/user-guide/eu/planner.xml:  Correct validation errors
	* po/POTFILES.in:  Added missing files per bug #344793
	* README: Put some better, more current info in there
	* NEWS:  Updates since v0.13

2006-06-11 Kurt Maute <Kurt Maute us>
	* configure.in:  Version 0.14
	* po/POTFILES.in: Removed referece to planner.keys.in
	* python/Makefile.am: Correct error when builddir != srcdir
	* src/planner-window.c: Change planner homepage in about box to live.gnome.org/Planner

	Correct distcheck errors and cut v0.14

2006-05-23 Kurt Maute <Kurt Maute us>
	* src/planner-window.c

	Updated About box info:  Added self as maintainer, removed Imendio from name.

2006-05-23 Kurt Maute <Kurt Maute us>
	* docs/user-guide/C/planner.xml

	Updated user guide

2006-05-23 Kurt Maute <Kurt Maute us>
	* data/ui/gantt-view.ui
	* src/planner-gantt-background.c
	* src/planner-gantt-chart.c
	* src/planner-gantt-chart.h
	* src/planner-gantt-view.c

	Changed 'Hint' lines to 'Guide' Lines

2006-05-19 Kurt Maute <Kurt Maute us>
	* data/ui/gantt-view.ui
	* src/planner-gantt-background.c
	* src/planner-gantt-chart.c
	* src/planner-gantt-chart.h
	* src/planner-gantt-view.c

	Hint lines patch courtesy of Nguy�n Thái Ng�c Duy
	Shows horizontal lines on Gantt to help line up task tree with chart
	Closes Bug # 303374

2006-05-19 Kurt Maute <Kurt Maute us>
	* libplanner/mrp-task.c
	Fix typo impr_task_get_constraint when compiling with simple priority scheduling

2006-05-02 Kurt Maute <Kurt Maute us>
	* libplanner/mrp-file-module.c
	* libplanner/mrp-storage-module-factory.c
	* src/planner-cell-renderer-popup.c
	* src/planner-gantt-row.c
	* src/planner-plugin-loader.c
	* src/planner-resource-view.c
	* src/planner-window.c
	Fix for compiling with gcc 4.1 - type punned pointers that break strict aliasing rules

2006-04-29 Kurt Maute <Kurt Maute us>
	* src/planner-gantt-view.c
	* src/planner-usage-view.c
	Fix for bug 128983 - Gantt bar height doesn't match treeview row height
	Patch contributed by Francisco Moraes <fmoraes nc rr com>

2006-04-23 Kurt Maute <Kurt Maute us>
	* src/planner-gantt-chart.c
	Fix for Bug 339284 - patch contributed by Mardy
	gantt_chart_reflow_do should return 0 if node is empty

2006-04-21 Kurt Maute <Kurt Maute us>
	* src/planner-task-tree.c
	Patch to fix bug 322570 - Crash when indenting tasks
	Patch contributed by Alejandro García Castro

2006-04-19 Kurt Maute <Kurt Maute us>

	* docs/libplanner/tmpl/mrp-relation.sgml
	* libplanner/mrp-private.h
	* libplanner/mrp-task-manager.c
	* libplanner/mrp-task.c
	* src/planner-task-dialog.c
	Add support for FF and SF relationships

2006-04-18  Kjartan Maraas  <kmaraas gnome org>

	* configure.in: Remove obsolete entry for no_NO
	* po/no.po: And the translation.

2006-04-11 Kurt Maute <Kurt Maute us>

	* src/planner-usage-chart.c
	Comment out 'View for Usage configured' message

2006-04-11 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-usage-row.c
	Disable right click edit dialogs. Enable edit dialogs with
	double left click. 

2006-04-11 Kurt Maute <Kurt Maute us>

	*  libplanner/mrp-task.h
	*  libplanner/mrp-task.c
	*  src/planner-task-tree.c
	*  configure.in
	*  src/planner-gantt-chart.c
	*  autogen.sh
	*  data/ui/gantt-view.ui
	*  libplanner/mrp-task-manager.c
	*  src/planner-task-tree.h
	*  src/planner-gantt-chart.h
	*  libplanner/mrp-calendar.c
	*  libplanner/mrp-calendar.h
	*  src/planner-gantt-view.c
	*  src/planner-task-view.c
	*  src/planner-gantt-row.c
	*  data/planner.schemas.in
	Matteo Nastasi's patch to add:
	* Gantt chart visualization of nonstandard working times
	* Simple priority scheduling (previously known as vampire tasks)

2006-04-07 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-usage-chart.c
	* src/planner-usage-chart.h
	* src/planner-usage-model.c
	* src/planner-usage-model.h
	* src/planner-usage-row.c
	* src/planner-usage-tree.h
	* src/planner-usage-view.c
	You can left click now in tasks and resources bars in resource usage 
	view canvas graph in order to select them and also, you can right
	click in them in order to edit them.

2006-04-02  Kjartan Maraas  <kmaraas gnome org>

	* src/planner-window.c: (window_do_save_as): Fix 
	NULL deref found by the coverity checker. Bug #334120.

2006-01-24  Clytie Siddall <clytie riverland net au>

	* configure.in	Added vi in ALL_LINGUAS line.
	
	2005-09-14  Ilkka Tuohela  <hile iki fi>

	* configure.in: Added fi to ALL_LINGUAS

2005-09-05  Iñaki Larrañaga  <dooteo euskalgnu org>

	* configure.in: Added "docs/user-guide/eu/Makefile" to AC_CONFIG_FILES.

2005-09-05  Iñaki Larrañaga  <dooteo euskalgnu org>

	* configure.in: Added "eu" to ALL_LINGUAS.

2005-06-06  Kjartan Maraas  <kmaraas gnome org>


	* src/planner-resource-view.c: (resource_view_edit_columns_cb):
	Fix a typo in a string. Reported by Christian Rose. Closes bug
	#305598.

2005-05-24  Pawan chitrakar  <pawan nplinux org>

	* configure.in: Added ne in ALL_LINGUAS


2005-05-19  Richard Hult  <richard imendio com>

	* Commit makefiles for win32 and the last change to main for
	win32.

2005-05-18  Richard Hult  <richard imendio com>

	* docs/sql/README.sql: Patch from minus toneby com to improve
	this.

2005-04-30  Richard Hult  <richard imendio com>

	* src/planner-eds-plugin.c (plugin_init): Use the right path
	function and the right path.

2005-04-26  Richard Hult  <richard imendio com>

	* libplanner/mrp-application.c: (application_init_gettext):
	* libplanner/mrp-paths-gnome.c: (mrp_paths_get_sql_dir),
	(mrp_paths_get_locale_dir):
	* libplanner/mrp-paths-win32.c: (mrp_paths_get_file_modules_dir),
	(mrp_paths_get_sql_dir), (mrp_paths_get_locale_dir):
	* src/Makefile.am:
	* src/planner-main.c: (main):
	* src/planner-sql-plugin.c: (check_database_tables):
	* src/planner-util-win32.c: (planner_util_show_url),
	(planner_util_show_help): Modified patch from Francisco to fix up
	the path stuff, and adding the sql and locale paths.

2005-04-23  Richard Hult  <richard imendio com>

	* configure.in:
	* data/images/Makefile.am:
	* data/mime/Makefile.am: Remove some old pre-GNOME 2.10 cruft.

	* libplanner/Makefile.am:
	* src/Makefile.am:
	* libplanner/mrp-paths.h:
	* libplanner/mrp-paths-gnome.c:
	* libplanner/mrp-paths-win32.c: 
	* libplanner/*.[c]:
	* src/*.[c]: Implement path handling for the data files in a cross
	platform way, based on patch from Jani Tiainen.

	* src/planner-gantt-view.c:
	* src/planner-task-popup.c:
	* src/planner-task-view.c:
	* src/planner-usage-view.c:
	* src/planner-resource-view.c:
	* src/planner-window.c: (window_add_stock_icon),
	(window_add_stock_icons), (window_populate): Add all the stock
	icons we're using once, instead of in all the views etc.

2005-04-21  Francisco Moraes  <fmoraes nc rr com>

	* configure.in:
	* libplanner/mrp-time.c:
	* src/Makefile.am:
	* src/planner-conf-win32.c:
	* src/planner-html-plugin.c: (html_plugin_show_url):
	* src/planner-main.c: (main):
	* src/planner-util.c:
	* src/planner-util-win32.c: More windows patches.

2005-04-21  Richard Hult  <richard imendio com>

	* src/planner-window.c: Remove copy of URI drag and drop list code
	from glib now that we depend on 2.6.

2005-04-21  Richard Hult  <richard imendio com>

	* src/eel-canvas-rect.c: Remove gdkx.h include.

	* libplanner/mrp-xsl.c (xml_planner_pre012_write, html_write): Use
	libxslt for saving directly instead of GnomeVFS.

2005-04-20  Francisco Moraes  <fmoraes nc rr com>

	* src/planner-print-dialog.c (ensure_dir): Use g_mkdir.

	* src/planner-calendar-dialog.c:
	(cal_dialog_update_calendar_widgets): Use the new time API, fixes
	assertion.

2005-04-19  Richard Hult  <richard imendio com>

	* data/ui/gantt-view.ui:
	* data/ui/main-window.ui:
	* data/ui/resource-view.ui:
	* data/ui/task-view.ui:
	* data/ui/time-table-view.ui: Fix up view placeholders.
	
	* data/stylesheets/msp2planner.xsl: Map task types more correctly.

	* src/planner-resource-view.c (resource_view_edit_columns_cb): Fix
	typo.

2005-04-18  Richard Hult  <richard imendio com>

	* src/planner-window.c (window_populate): Don't hide the Actions
	menu when its's empty.

	* data/ui/*.ui: Clean up some.

2005-04-17  Richard Hult  <richard imendio com>

	Work on getting the Python bindings uptodate.
	
	* libplanner/Makefile.am: Link the modules with libplanner.

	* python/Makefile.am: Split up the module in one for libplanner
	and one for the UI plugins.

	* python/test.py: Make it work.
	* python/python-demo.py: Likewise.

	* src/*.[ch]: Fix type macro for PlannerWindow.

	* src/planner-python-plugin.c: Clean up coding style and import
	the new ui module. Set the application as a global for scripts to
	use.

2005-04-18  Richard Hult  <richard imendio com>

	* libplanner/Makefile.am:
	* src/Makefile.am: Fix build.

2005-04-16  Richard Hult  <richard imendio com>

	* libplanner/mrp-old-xml.c (mrp_old_xml_parse): Align the start
	time to the start of the day, fixes bug #172292.

	* autogen.sh:
	* data/Makefile.am:
	* libplanner/Makefile.am:
	* libplanner/mrp-marshal-main.c:
	* python/Makefile.am:
	* src/Makefile.am:
	* src/planner-marshal-main.c:
	* src/planner-usage-view.c: Clean up and build.

2005-04-16  Richard Hult  <richard imendio com>

	* src/planner-usage-*: Rename from planner-ttable-*.

	* src/Makefile.am: Reorganize views and make them
	builtin. Simplify a lot.

	* src/planner-gantt-view.[ch]:
	* src/planner-resource-view.[ch]:
	* src/planner-ttable-view.[ch]:
	* src/planner-task-view.[ch]: Adapt to the new view interface.

	* src/planner-ttable-*: s/ttable/usage/.

	* src/planner-view-loader.[ch]:
	* src/planner-view.[ch]: Remove module loading.
	* src/planner-window.c: (window_populate): Create the builtin
	views.

2005-04-16  Richard Hult  <richard imendio com>

	* src/planner-gantt-row.c: Make the shadow and highlight colors to
	be a bit less pronounced, use separate colors for the critical
	path shadow and highlight.

	* src/planner-ttable-row.c: As above + use separate shadow and
	highlight colors for free/overuse/underuse. Also remove lots of
	code that's been commented out.

2005-04-16  Richard Hult  <richard imendio com>

	* src/planner-html-plugin.c (html_plugin_show_url): Patch from
	Francisco to use gnome_url_show.

2005-04-15  Richard Hult  <richard imendio com>

	* data/stylesheets/html1_css.xsl:
	* data/stylesheets/html1_gantt.xsl: Update style a bit and make
	only the gantt part of the chart scrollable, fixes bug #300609.

	* src/planner-html-plugin.c (html_plugin_export): Set default
	response. Remove unused include.

2005-04-14  Richard Hult  <richard imendio com>

	* src/planner-main.c: (main): Use goption, another patch from
	Francisco.

	* libplanner/mrp-project.c: (mrp_project_load): Fix leak, patch
	from Francisco.

2005-04-14  Richard Hult  <richard imendio com>

	* src/planner-window.c (window_about_cb): Patch from Francisco to
	set the main window as parent.

	* data/glade/Makefile.am (glade_DATA): Remove html-output.glade.

	* src/planner-html-plugin.c: Rewrite, use a filechooser directly
	instead of a GnomeEntry.

2005-04-12  Richard Hult  <richard imendio com>

	* data/glade/Makefile.am:
	* data/glade/column-dialog.glade:
	* src/Makefile.am:
	* src/planner-column-dialog.c:
	* src/planner-column-dialog.h: Add new dialog for editing the
	visible columns in the views.
	
	* data/ui/gantt-view.ui:
	* data/ui/task-view.ui: Add columns editor.

	* src/planner-gantt-view.c: 
	* src/planner-task-view.c: Implement loading and saving of column
	visibility and widths.  Use the new dialog in the task and gantt
	views. Mark custom property columns and exclude them from the
	editor at least for now.

	* src/planner-resource-view.c: Mark custom property columns as
	such.

	* src/planner-task-tree.c: Make all the columns fixed width, set
	the id user data on them for column saving/loading. Also set min
	widths on all columns.

	* src/planner-window.c:
	* src/planner-main.c: Set the window icon by setting a default one
	instead of for each window.

2005-04-08  Richard Hult  <richard imendio com>

	* libplanner/mrp-time.c (mrp_time2_set_date): Fix the precondition
	check. Thanks to fmoraes nc rr com for noticing.

2005-04-03  Pedro Villavicencio Garrido  <pvillavi gnome org>

	* src/planner-window.c (window_about_cb): port to GtkAboutDialog.

2005-04-05  Richard Hult  <richard imendio com>

	* src/planner-print-job.c: (planner_print_job_text),
	(planner_print_job_show_clipped):
	* src/planner-print-job.h:
	* src/planner-table-print-sheet.c:
	(table_print_sheet_print_header_cell),
	(table_print_sheet_print_cell): Patch from fmoraes nc rr com to
	use pango for printing text.

2005-04-02  Richard Hult  <richard imendio com>

	* autogen.sh:
	* configure.in: Bump requirements.

2005-04-01  Steve Murphy  <murf e-tools com>

        * configure.in: Added "rw" to ALL_LINGUAS.

2005-03-22  Richard Hult  <richard imendio com>

	* libplanner/mrp-time.c (mrp_time2_align_next): Fix for quarter,
	half year, and year.

	* src/planner-main.c (main): Fix opening relative paths on the
	command line.

2005-03-20  Richard Hult  <richard imendio com>

	* src/planner-gantt-view.c: (get_label):
	* src/planner-sidebar.c: (sidebar_init), (sidebar_modify_bg),
	(planner_sidebar_append), (planner_sidebar_set_active):
	* src/planner-ttable-view.c: (get_label): Tweak the sidebar a bit.

2005-03-15  Richard Hult  <richard imendio com>

	Fix bug #157254.
	
	* libplanner/mrp-time.c: Add new (temporary) API and use it to
	improve performance a lot with large projects. Long term we should
	either switch to it completely or rename it.

	* src/planner-gantt-background.c: (gantt_background_draw):
	* src/planner-gantt-header.c: (gantt_header_init),
	(gantt_header_expose_event), (gantt_header_motion_notify_event):
	* src/planner-gantt-print.c: (print_time_header):
	* src/planner-scale-utils.c: (planner_scale_format_time):
	* src/planner-scale-utils.h:
	* src/planner-task-dialog.c: (task_dialog_update_schedule_label),
	(task_dialog_calendar_changed_cb): Use the new API.

	* tests/time-test.c: Remove obsolete test.

2005-03-13  Richard Hult  <richard imendio com>

	* Release 0.13.
	
	* Makefile.am: Fix build.

	* configure.in: Bump to 0.13

	* src/planner-gantt-print.c (planner_gantt_print_do): 
	* src/planner-python-plugin.c (plugin_exit): Remove C++ comment.

2005-03-09  Richard Hult  <richard imendio com>

	* Makefile.am: Remove unmaintained spec file.

	* configure.in: Add --disable-update-mimedb for packagers.
	* data/mime/Makefile.am: Use it here.

	* src/planner-cmd-manager.c (cmd_manager_insert)
	(cmd_manager_ensure_limit, planner_cmd_manager_end_transaction):
	Don't cut off in the middle of transactions when limiting the undo
	history.

2005-03-03  Richard Hult  <richard imendio com>

	* Release 0.12.94.

	* configure.in: Bump to 0.12.94.

	* src/planner-task-tree.c: (task_cmd_move),
	(planner_task_tree_remove_task), (planner_task_tree_unlink_task),
	(planner_task_tree_link_tasks), (planner_task_tree_indent_task),
	(planner_task_tree_unindent_task),
	(planner_task_tree_move_task_up),
	(planner_task_tree_move_task_down),
	(planner_task_tree_reset_constraint),
	(planner_task_tree_reset_all_constraints): Use transactions for
	all task commands. Fixes bug #144732.

2005-03-03  Richard Hult  <richard imendio com>

	* src/planner-cmd-manager.c: (transaction_cmd_do),
	(transaction_cmd_undo), (planner_cmd_manager_begin_transaction),
	(planner_cmd_manager_end_transaction):
	* src/planner-task-cmd.c:
	* src/planner-task-tree.c: (planner_task_tree_remove_task): Finish
	the implementation of undo transactions and use them for deleting
	many tasks. Also apply patch from fmoraes nc rr com 

2005-03-02  Richard Hult  <richard imendio com>

	* src/planner-window.c (window_redo_state_changed_cb)
	(window_undo_state_changed_cb): Don't set the full uno/redo label
	on the toolbar buttons.

2005-02-27 Alvaro del Castillo  <acs barrapunto com>

	* libplanner/mrp-sql.c:
	* src/planner-sql-plugin.c:
	Connect to the Postgres SQL host given by the user.
	Changes done in airplane returing from FOSDEM 2005 :)
	
2005-02-25  Richard Hult  <richard imendio com>

	* src/planner-html-plugin.c (html_plugin_ok_button_clicked):
	(show_url): Hack to display the result in the browser if asked to.

	* data/stylesheets/html1_css.xsl:
	* data/stylesheets/html1_gantt.xsl:
	* data/stylesheets/html1_resources.xsl:
	* data/stylesheets/html1_tasks.xsl: Clean up, indent, tweak the
	style to make it look less cluttered. Also apply patch from David
	Sundstrom <public peapod net> to add a percent complete column to
	the task list.

2005-02-24  Richard Hult  <richard imendio com>

	* Release 0.12.93.

2005-02-24  Richard Hult  <richard imendio com>

	* data/stylesheets/html1_tasks.xsl: Use work-start instead of
	start here too.

	* src/planner-view-loader.c (mvl_load): Don't load lazily.
	* src/planner-plugin-loader.c (mpl_load): Likewise.

	* src/Makefile.am: Move the gantt background files to the shared
	gantt/task lib.

	* libplanner/mrp-calendar.c (calendar_finalize): Fix leaks.

	* configure.in: Bump.

	* libplanner/mrp-task-manager.c (task_manager_do_backward_pass):
	Add comment about a bug.

	* src/planner-task-dialog.c (task_dialog_update_schedule_label):
	Fix compiler warning.

2005-02-20  Richard Hult  <richard imendio com>

	* src/planner-print-dialog.c (planner_print_dialog_save_config):
	Fix bug #167899.

	* src/planner-project-properties.c: (mpp_set_start),
	(mpp_start_set_from_widget): Try to fix bug #156615.

2005-02-20  Richard Hult  <richard imendio com>

	* src/planner-ttable-row.c: (recalc_bounds),
	(ttable_row_ensure_layout), (ttable_row_update_resources),
	(ttable_row_draw_assignment), (ttable_row_point),
	(ttable_row_geometry_changed): Patch from caladd particlestorm net
	to fix bug #138549.

2005-02-20  Richard Hult  <richard imendio com>

	* src/planner-task-dialog.c: (task_dialog_pred_cell_edited),
	(task_dialog_cell_type_hide_popup),
	(task_dialog_setup_predecessor_list): Don't make the name editable
	in the predecessor list. It's not very logical that editing the
	name of a predecessor changes which predecessor is used. Also
	fixes bug #139671.

2005-02-20  Richard Hult  <richard imendio com>

	* data/glade/Makefile.am:
	* data/glade/project-properties.glade:
	* data/glade/task-date-widget.glade:
	* data/glade/task-dialog.glade: Add new glade file for a task date
	editor. Change the task and project properties interfaces to use a
	common popup button.
	
	* libplanner/mrp-time.c: (mrp_time_format_locale): Add.

	* src/planner-cell-renderer-date.c (mcrd_today_clicked) 
	(mcrd_init): Implement "today" button.
	(mcrd_selected_double_click): Select on double-click.

	* src/planner-marshal.list: Clean up.

 	* src/planner-popup-button.c: New widget for popping up stuff.

	* src/planner-project-properties.c: Use the popup button to popup
	the calendar widget.

	* src/planner-task-date-widget.c: New widget for editing the task
	constraint.
	
	* src/planner-task-dialog.c: Add constraint editor, using the
	popup button and task date widget. Fixes bug #134359.

2005-02-20  Richard Hult  <richard imendio com>

	* Release 0.12.92.

	* python/planner.defs (open): Update.

	* data/stylesheets/Makefile.am: Install msp2planner stylesheet.

	* libplanner/mrp-project.c: (mrp_project_set_uri): Add.

	* src/planner-main.c: Clean up a bit.

	* src/Makefile.am:
	* src/planner-msp-plugin.c: Add.

	* src/planner-project-properties.c:
	(planner_project_properties_new): Only set values if they exist.
 	
	* src/planner-window.c: (planner_window_open_recent_cb),
	(window_populate), (window_open_cb),
	(window_drag_data_received_cb), (planner_window_open),
	(planner_window_open_in_existing_or_new): Make it possible to open
	a file without adding it to recent files.

2005-02-19  Richard Hult  <richard imendio com>

	* libplanner/mrp-old-xml.c (old_xml_read_project): Only try to
	read default group if the node exists.

	* libplanner/mrp-time.c (mrp_time_from_string): Check the return
	value from sscanf, fixes bug #167895.

	* configure.in:
	* data/Makefile.am:
	* data/planner.schemas.in: Add schemas.

	* src/planner-print-dialog.c: (print_dialog_create_page): Don't
	add resource usage view to the list of printable views.

	* src/planner-window.c: (window_populate), (window_view_selected):
	Restore the last active view.

	* src/planner-group-dialog.c (group_cmd_default_free): We don't
	have an old default group so don't unconditionally unref it.

2005-02-19  Richard Hult  <richard imendio com>

	* src/planner-format.c (planner_format_duration_with_day_length):
	Fix bug.
	(planner_parse_duration_with_day_length): Add

	* data/glade/add-predecessor.glade: Make lag spinbutton an entry.

	* src/planner-task-dialog.c: Handle lag as other duration instead
	of hardcoded to always be in hours.

2005-02-19  Richard Hult  <richard imendio com>

	* libegg/recent-files/egg-recent-view-uimanager.c:
	(egg_recent_view_uimanager_set_list): Add comment.
	* src/planner-window.c: (window_finalize): Free the ui manager and
	recent files view, fixes leak and crash.

2005-02-19  Richard Hult  <richard imendio com>

	* src/planner-main.c: (main):
	* src/planner-task-tree.c: Disable dnd to get rid of warning from treeview.
	* src/planner-ttable-tree.c: Likewise.
	* src/planner-window.c: (window_class_init), (window_init),
	(planner_window_open_recent_cb), (window_open_cb),
	(uri_list_extract_uris), (window_drag_data_received_cb),
	(planner_window_new), (planner_window_open),
	(planner_window_open_in_existing_or_new), (window_get_name):
	* src/planner-window.h: Fix bug #139645, open files by
	dragndrop. Refactor the opening code so it can be shared, and use
	it for the added support for opening multiple files from the
	commandline or filechooser.

	* src/planner-window.c (window_drag_data_received_cb) 
	(window_init): Setup drop target for planner files.

2005-02-18  Richard Hult  <richard imendio com>

	* Release pre-release 0.12.91.
	
	* src/planner-task-tree.c (task_tree_add_column): Set sizing to
	fixed for name column. Fixes bug #151780.

	* src/planner-resource-view.c (resource_view_setup_tree_view):
	Likewise for name and short name.

	* data/glade/task-dialog.glade: Change the work/duration
	spinbuttons to entries.
	
	* src/planner-format.c: (planner_format_duration_with_day_length),
	(planner_format_duration): Move here from the task tree and make
	more general.
 
	* src/planner-gantt-print.c:
	* src/planner-gantt-row.c:
	* src/planner-project-properties.c:
	* src/planner-resource-view.c:
	* src/planner-task-tree.c:
	* src/planner-ttable-row.c: Update for the above change.

	* src/planner-task-dialog.c: Change the work/duration spinbuttons
	to entries and add duration parsing like the tree views has.
	
2005-02-18  Richard Hult  <richard imendio com>

	* src/planner-sql-plugin.c (check_database_tables): Don't g_free,
	g_object_unref.

	* configure.in: Bump version for a pre-release.

	* src/planner-task-tree.c: (task_cmd_move_undo), (task_cmd_move):
	Restore the task type of the parent on undo.
	(task_cmd_move): Initialize variable.

	* libplanner/mrp-task.c: (imrp_task_reattach),
	(imrp_task_insert_child): Make milestone tasks into normal ones
	when then get child tasks, fixes bug #154253.

2005-02-18  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c: (task_tree_duration_data_func): Make
	the duration column only editable for fixed duration tasks.

	* src/planner-task-view.c: (get_widget): Add duration column to
	the task view. Fixes bug #151761.

	* src/planner-task-view.c: Fix typo in critical path menu item.

	* libplanner/mrp-old-xml.c (old_xml_read_task): Silently correct
	milestone tasks with children to normal tasks. Fixes bug #166424.
 
	* libplanner/mrp-task.c: (mrp_task_get_prev_sibling): Implement.

	* src/planner-task-tree.c: (task_cmd_move_undo),
	(task_cmd_move_free), (task_cmd_move),
	(planner_task_tree_unindent_task): Fix the behavior of undo/redo
	of indenting tasks. Fixes bug #158973 and more.
	
	* src/planner-window.c (window_do_save_as): Make "yes" the default.

2005-02-18  Richard Hult  <richard imendio com>

	* src/planner-format.c:
	* src/planner-format.h: New functions to parse an int and float
	that handles thousands separators.
	
	* src/planner-main.c: Use some more modern API for setting the
	window icon.

	* src/planner-resource-dialog.c:
	* src/planner-resource-view.c: Use parsing functions from
	above. Fixes bug #161330.

	* src/planner-window.c: (window_about_cb): Make about box
	transient.

2005-02-18  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c (task_tree_finalize): Don't access
	memory after it's been freed.

	* data/dtd/mrproject-0.6.dtd:
	* data/stylesheets/html1_gantt.xsl:
	* data/stylesheets/planner2plannerv011.xsl:
	* libplanner/mrp-parser.c: (mpp_write_task_cb): Save "work start"
	and use it to generate more accurate html reports. Update the DTD
	and add the new property to the export filter for planner 0.11
	files. Fixes bug #151483.

2005-02-18  Richard Hult  <richard imendio com>

	* libplanner/mrp-xml.c (init): Remove C++ comment.

	* src/planner-ttable-tree.c (ttable_tree_init): Disable search.

	* src/planner-resource-view.c: (resource_view_button_press_event),
	(resource_view_setup_tree_view), (resource_view_popup_menu): *
	src/planner-ttable-tree.c: (ttable_tree_tree_view_popup_menu):
	Position popup menu better. Fixes bug #148736.

2005-02-15  Richard Hult  <richard imendio com>

	* data/glade/task-dialog.glade: Disable search.

2005-02-13  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c (planner_task_tree_insert_task): Put new
	tasks at the bottom if there is no parent. Fixes bug #156616.

2005-02-13  Richard Hult  <richard imendio com>

	* src/planner-project-properties.c (mpp_calendar_popdown)
	(mpp_calendar_cancel_clicked_cb, mpp_calendar_save_date)
	(mpp_calendar_ok_clicked_cb, mpp_calendar_set_date)
	(mpp_calendar_today_clicked_cb, mpp_calendar_double_click_cb)
	(mpp_grab_on_window, mpp_calendar_popup_helper)
	(mpp_calendar_popup, mpp_calendar_button_toggled_cb)
	(planner_project_properties_new): Add a calendar popup to select
	the start date with.

	* src/planner-window.c (window_do_save_as): Set default response.

	* src/planner-task-tree.c (task_tree_work_data_func)
	(task_tree_duration_data_func): Set cell content to "N/A" for
	milestones.

	* libplanner/mrp-task-manager.c
	(task_manager_calculate_task_finish): Remove old code.

	* src/planner-gantt-row.c (gantt_row_event): Update sensitivity
	for the context menu items.
	(gantt_row_get_selected_tasks): Add.

	* src/planner-task-tree.c (task_tree_tree_view_popup_menu): Update
	sensitivity and position the menu better.

	* src/planner-task-popup.c
	(planner_task_popup_update_sensitivity): Add, use to consistently
	set sensitivity in the task context menu.

	* src/planner-task-dialog.c (task_dialog_update_sensitivity): Make
	it possible to set complete and priority always, but not work or
	duration or fixed duration for milestones.
	(task_dialog_update_title): Simplify.

	* libplanner/mrp-task-manager.c
	(task_manager_get_task_units_intervals): Allow this to be called
	for milestone tasks.
	(task_manager_calculate_milestone_work_start): Add, gets the work
	start for milestones.
	(task_manager_calculate_task_finish): Use the above for milestone
	tasks.

	* libegg/recent-files/egg-recent-view-uimanager.c
	(egg_recent_view_uimanager_set_list): Temporary fix for a crash.

	* libplanner/mrp-task-manager.c
	(task_manager_calculate_task_finish): Add to the comment and
	special-case milestones so they get the correct start time.

	* src/planner-task-tree.c (task_tree_duration_data_func)
	(task_tree_work_data_func): Make duration/work not editable for
	milestones.

	* libplanner/mrp-task-manager.c
	(mrp_task_manager_get_block_scheduling):
	* libplanner/mrp-project.c (mrp_project_get_block_scheduling) 
	(mrp_project_set_block_scheduling): Add.

	* libplanner/mrp-object.c (mrp_object_set): Block scheduling
	around the setting to avoid multiple rescheduling.

	* src/planner-window.c (window_confirm_exit_run): Make the label
	not selectable.

	* libplanner/mrp-xsl.c (html_write): Don't crash if the stylesheet
	is invalid.

2005-02-12  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c (task_tree_init): Disable search.

	* libplanner/mrp-task-manager.c (task_manager_do_backward_pass):
	Patch from Jani Tiainen to fix bug #140536. Go through children of
	the successor instead of the successor if there are any.

2005-01-30 Alvaro del Castillo  <acs barrapunto com>

	* configure.in: support for evolution plugin library.
	* eds-backend/planner-source: Evolution plugin in order to add easily
	Planner files as Task Sources to Evolution.
	* eds-backend/e-cal-backend-planner.c:
	fix some bugs in the backend that make it crash and add some
	test code in order to be more robust.

2005-01-30 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-eds-plugin.c: love care
	- If getting contacts fails, activate the import resource 
	dialog control, clean the old resources in the list  and 
	deactivate the search control.
	- Import resource name with E_CONTACT_FULL_NAME.
	
2005-01-30  Richard Hult  <richard imendio com>

	* gtk-doc.make: Updated by gtk-doc.

	* libplanner/mrp-calendar.c: (imrp_calendar_replace_day):
	* libplanner/mrp-old-xml.c: (old_xml_read_overridden_day):
	* src/planner-calendar-dialog.c: (cal_cmd_day_type_do),
	(cal_cmd_day_type_undo), (cal_dialog_apply_clicked_cb): Fix 64-bit
	platform crash.
	
2004-11-25  Christoffer Olsen  <co deworks net>

	* configure.in: Added data/planner.desktop.in to AC_OUTPUT
	* data/planner.desktop.in: Moved to data/planner.desktop.in.in
	* data/planner.desktop.in.in: Added Bugzilla headers
	* po/POTFILES.in: References data/planner.desktop.in.in instead

	- Added Bug Buddy support, filing Planner bugs should be
	automagical now.

2004-11-09  Alvaro del Castillo  <acs barrapunto com>

	* docs/sql/README.sql: use template1 as connection database.

	* src/planner-sql-plugin.c: don't create planner group because
	normal postgres user can't create a GROUP.

	* data/sql/database-0.13.sql: don't use planner GROUP.

2004-11-04  Richard Hult  <richard imendio com>

	* gtk-doc.make: Update.

	* libplanner/mrp-sql.c: (sql_write_resources): Fix build.
 	* src/planner-sql-plugin.c: (check_database_tables): Change
	warning to message.

2004-10-14  Richard Hult  <richard imendio com>

	* src/planner-html-plugin.c: (html_plugin_export): Fill in a
	default filename.

2004-10-13  Richard Hult  <richard imendio com>

	* src/planner-*-view.c: Grab focus on activate so we don't
	end up with the toolbar focused.

	* data/glade/html-output.glade:
	* src/planner-html-plugin.c: Activate on enter, use save
	filechooser instead of open.

2004-10-13  Richard Hult  <richard imendio com>

	* libplanner/mrp-xsl.c (xml_planner_pre012_write, html_write):
	Check error after saving to XML.

	* libplanner/mrp-file-module.c (mrp_file_reader_read_string): Fix
	typo.

	* src/planner-task-tree.c (task_cmd_move_undo): Remove C++
	comment.

2004-10-10  Alvaro del Castillo <acs barrapunto com>
	* eds-backend/docs/Work-alfa8
	All work finished for this milestone.

2004-10-10  Alvaro del Castillo <acs barrapunto com>
	* src/planner-sql-plugin.c:
	We don't need to check for upgrade files if the tables don't
	exist in the database.

2004-10-09  Richard Hult  <richard imendio com>

	* data/stylesheets/Makefile.am:
	* data/stylesheets/html1_css.xsl:
	* data/stylesheets/html1_gantt.xsl:
	* data/stylesheets/html1_resources.xsl:
	* data/stylesheets/html1_tasks.xsl:
	* data/stylesheets/planner2html.xsl:
	* libplanner/mrp-xsl.c: Clean up the HTML export stylesheet, tweak
	the style a bit, put the header fields in a table. Make the note
	text sections wrap and always show at least 30 days in the gantt
	chart.

2004-10-09  Richard Hult  <richard imendio com>

	* data/stylesheets/html1_tasks.xsl: Set note class for notes.

	* data/stylesheets/html1_css.xsl: Add top/bottom margins for the
	gantt bars. Align table cell contents at the top, wrap long
	notes. Reduce font size for footer.

2004-10-08  Richard Hult  <richard imendio com>

	* libplanner/mrp-time.c (mrp_time_debug_print): Fix typo.

2004-10-08  Richard Hult  <richard imendio com>

	* src/planner-gantt-header.c (gantt_header_leave_notify_event)
	(gantt_header_motion_notify_event, gantt_header_class_init): Add
	date-hint signal and emit it when the mouse moves over a new date.

	* src/planner-gantt-chart.c (gantt_chart_init):
	(gantt_chart_header_date_hint_changed_cb): Put the date hint on
	the status bar.

2004-10-06  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c (planner_task_tree_insert_task): Select
	the inserted task, not the parent. Fixes bug #151729.
	(planner_task_tree_insert_subtask): Likewise.

	* tests/Makefile.am: Don't add the tests to make check since the
	loadable modules aren't found when doing distcheck. We should fix
	this for real at some point instead of disabling the automatic
	testing.

	* data/images/Makefile.am: Rename the mime icon for the new mime
	system, install in the right spot.
	
	* data/mime/planner.keys.in: Mark for translation, patch from
	Takao Fujiwara Sun COM  Use the new name for the mime icon.

2004-10-06  Richard Hult  <richard imendio com>

	* data/stylesheets/html1_css.xsl:
	* data/stylesheets/html1_gantt.xsl:
	* data/stylesheets/mrproject2html.xsl: Tweak milestone style
	slightly and make gantt bars not wrap, fixes bug #154572.

	* libplanner/mrp-parser.c (mrp_parser_to_xml): Fix compilation
	problem on Darwin.

	* configure.in: Clean up a bit.

2004-10-05  Amanpreet Singh Alam <amanpreetalam yahoo com>
	
	* configure.in: Add Punjabi(pa) Lang

2004-10-05  Richard Hult  <richard imendio com>

	* Update copyrights.

	* src/planner-task-tree.c: (task_cmd_save_assignments),
	(task_cmd_restore_assignments), (task_cmd_save_relations),
	(task_cmd_restore_relations), (task_cmd_save_children),
	(task_cmd_move_do), (task_cmd_move_undo), (task_cmd_move_free),
	(task_cmd_move), (planner_task_tree_indent_task),
	(planner_task_tree_unindent_task),
	(planner_task_tree_move_task_up),
	(planner_task_tree_move_task_down): Clean up undo code, remove
	debugging output and fix bug #151731, restore duration of parent
	task when undoing indent.

2004-10-04  Richard Hult  <richard imendio com>

	* src/planner-ttable-view.c: (ttable_view_create_widget),
	(ttable_view_update_row_and_header_height), (idle_update_heights),
	(ttable_view_tree_style_set_cb), (ttable_view_project_loaded_cb):
	Resize header and row heights when the style changes, fixes bug
	#151602.

2004-10-04  Richard Hult  <richard imendio com>

	* src/planner-window.c (window_open_cb): Add file filters, fixes
	bug #149357.

	* src/planner-cmd-manager.c: (cmd_manager_init),
	(cmd_manager_dump), (state_changed), (cmd_manager_free_func),
	(transaction_cmd_do), (transaction_cmd_undo),
	(planner_cmd_manager_begin_transaction),
	(planner_cmd_manager_end_transaction), (planner_cmd_new_size):
	* src/planner-cmd-manager.h:
	* src/planner-group-dialog.c: (group_cmd_default_free):
	* src/planner-project-properties.c: (property_cmd_edit):
	* src/planner-resource-view.c: (resource_cmd_remove_free),
	(resource_cmd_edit_custom_property_free): Fix bug #144734, free
	the undo data.

2004-10-04  Richard Hult  <richard imendio com>

	* src/Makefile.am: Move sql define to the sql plugin flags.

	* src/planner-gantt-row.c: Clean up some indentation, add missing
	undo code for dragging a task bar. Fixes bug #149359.

	* src/planner-task-tree.c: Make a bit more consistent with the
	other undo code.

2004-10-02  Richard Hult  <richard imendio com>

	* data/ui/main-window.ui:
	* libegg/recent-files/*: Update from latest libegg CVS and add ui
	manager view from file-roller.
	
	* src/planner-window.c: (planner_window_open_recent_cb),
	(window_populate), (window_print_cb),
	(window_recent_tooltip_func): Hook up recent files again.

2004-10-02  Alvaro del Castillo <acs barrapunto com>  

	* configure.in: Added support for Evolution Data Server (e-d-s)
	module

	* Makefile.am: Added support for Evolution Data Server (e-d-s)
	module

	* eds-backend: new directory with all the e-d-s code

	* eds-backend/utils: code to create the sources in Evolution for
	Planner data sources.

	* eds-backend/docs: several docs about how the backend has been
	done before reaching CVS. Also testing plans and the Changelog
	before the code hit CVS.

2004-10-01  Alvaro del Castillo <acs barrapunto com>  

	* configure.in: Fix bad formatting for e-d-s feature

2004-09-24  Richard Hult  <richard imendio com>

	* src/planner-xml-planner-plugin.c: Fix up this plugin, use a
	separate gconf key for the last used dir, fix logic when adding an
	extension, use filechooser. Fixes bug #149281 and some more.

	* libplanner/mrp-time.c (mrp_time_from_tm): Try to fix a bug when
	running on solaris. Could fix bug #153643.

	* data/stylesheets/html1_gantt.xsl: Add 1 to the week
	number. Fixes bug #153170.

	* src/planner-window.c: Add locale.h to fix build for some
	systems.

2004-09-11  Richard Hult  <richard imendio com>

	* src/planner-print-dialog.c:
	* src/planner-table-print-sheet.c: Fix some indentation.

	* src/planner-window.c (window_print_preview_cb): Use the print
	config for the preview.
	(window_print_preview_cb): Only preview the views that are
	enabled.

	* src/planner-print-job.c (planner_print_job_new): Let gnome-print
	handle the orientation for us instead of doing it ourselves.
	
	* src/planner-gantt-print.c (planner_gantt_print_do): Fix printing
	of percent complete for tasks that span several pages.

	* src/planner-window.c (window_print_cb): Add the locale hack for
	printing, seems like it's still needed for PDF.

2004-09-10  Richard Hult  <richard imendio com>

	* src/planner-gantt-print.c: (planner_gantt_print_do): Print the
	timeline. Based on patch from satyadadi hotmail com 

2004-09-08  Abel Cheung  <maddog linux org hk>

	* configure.in: Added "zh_TW" to ALL_LINGUAS.

2004-08-27  Xavier Ordoquy  <xordoquy linovia com>

	* configure.in:
	searches for the gtk.def file

	* python/Makefile.am:
	includes the gtk.def file while generating the wrapper.

	* python/planner.defs:
	regenerated the PlannerWindow wrapper.

	* python/planner-types.defs:
	* python/planner.override:
	reflect the move to GtkUIManager

	* python/python-demo.py:
	demo to show a bit python scripting abilities.

2004-08-27  Xavier Ordoquy  <xordoquy linovia com>

	* data/ui/sql-plugin.ui:
	open/save are now in the import/export placeholders.

2004-08-21  Kjartan Maraas  <kmaraas gnome org>

	* configure.in: Add «nb» to ALL_LINGUAS.

2004-08-17  Richard Hult  <richard imendio com>

	* src/planner-print-dialog.c: (ensure_dir), (get_config_filename),
	(planner_print_dialog_load_config),
	(planner_print_dialog_save_config), (print_dialog_create_page):
	Fix indentation, factor out printing config file location code,
	handle not being able to find it. Remove libgnome stuff.
	
	* src/planner-table-print-sheet.c: (table_print_sheet_print_cell),
	(table_print_sheet_print_page), (table_print_sheet_foreach_row):
	Handle printing empty resource and task names. Fix indentation.

2004-08-15  Richard Hult  <richard imendio com>

	* configure.in: Remove unused dependencies.

	* src/planner-eds-plugin.c: Remove libgnome includes.

	* src/eel-canvas-rect.c: (eel_canvas_rect_init),
	(eel_canvas_rect_finalize), (eel_canvas_rect_update),
	(eel_canvas_rect_realize), (eel_canvas_rect_unrealize): Get rid of
	libgnome includes.

2004-08-11  Richard Hult  <richard imendio com>

	* src/planner-window.c (window_about_cb): Change
	translator_credits to translator-credits on request from the i18n
	guys. Update the planner link.

2004-08-12  Alvaro del Castillo  <acs barrapunto com>
	
	* libplanner-1.pc.in: removed hard coded Postgres flags

2004-08-12  Alvaro del Castillo  <acs barrapunto com>
	
	* src/planner-eds-plugin.c:
	(eds_find_resource): search if a resource was imported.
	(eds_import_resource): checks if a resource was imported and update
	it if it was already in the resource list.
	
2004-08-11  Alvaro del Castillo  <acs barrapunto com>
	
	* src/planner-eds-plugin.c:
	Store the e-d-s UID as a custom property in resources.
	
2004-08-10  Alvaro del Castillo  <acs barrapunto com>
	
	* src/planner-eds-plugin.c: 
	Fixed castings and some little style issues

2004-08-10  Alvaro del Castillo  <acs barrapunto com>

	* configure.in:
	* src/Makefile.am:
	Added support for enable evolution data server (eds) plugin
	* data/glade/Makefile.am:
	* data/glade/eds.glade (added):
	GUI for the evolution data server (eds) plugin
	* data/ui/Makefile.am:
	* data/ui/main-window.ui
	* data/ui/eds-plugin.ui (added)
	* src/planner-window.c:
	New Import menu and new entry in Import for eds plugin
	* src/planner-eds-plugin.c (added):
	eds plugin implementation
	
2004-08-09  Richard Hult  <richard imendio com>

	* libegg/recent-files/: Sync (even though we're not using this at
	the moment).

2004-08-09  Richard Hult  <richard imendio com>

	* libplanner/Makefile.am: Remove mrp-intl.h
	* libplanner/*.c: Change mrp-intl.h to glib/gi18n.h.
	* src/*.c: Change libgnome/gnome-i18n.h to glib/gi18n.h.

2004-08-09  Richard Hult  <richard imendio com>

	* configure.in:
	* libplanner/mrp-file-module.c: (mrp_file_module_load_all),
	(mrp_file_reader_read_string):
	* libplanner/mrp-file-module.h:
	* libplanner/mrp-mpx.c: (init):
	* libplanner/mrp-project.c: (mrp_project_load):
	* libplanner/mrp-xml.c: (init): Remove gsf usage since we didn't
	really use it for anything but opening an XML file and returning a
	doc pointer.

	* libplanner/mrp-error.h: Include glib.h.

2004-08-09  Mikael Hallendal  <micke imendio com>

	* src/planner-sql-plugin.c: Update to new PlannerConf api.

2004-08-09  Mikael Hallendal  <micke imendio com>

	* src/Makefile.am: Added planner-conf.h and planner-conf-gconf.c
	* src/planner-conf-gconf.c: Added
	* src/planner-conf.h: Added
	* src/planner-application.[ch]:
	* src/planner-gantt-chart.c:
	* src/planner-print-dialog.c:
	* src/planner-sql-plugin.c:
	* src/planner-task-view.c: 
	* src/planner-window.c: 
	* src/planner-xml-planner-plugin.c:
	- Added GConf abstraction layer.
	- Updated all places to use the GConf abstraction layer

2004-08-06  Richard Hult  <richard imendio com>

	* src/planner-window.c: Break some really long lines.
	(window_populate): Add tooltip to the view radio items.

	* src/planner-ttable-view.c (ttable_view_ttable_status_updated):
	Set status message.

	* src/Makefile.am: Fix libutil linkage.

	* src/planner-gantt-view.c: (gantt_view_gantt_status_updated_cb): 
	* src/planner-window.c: (window_add_widget), (window_populate),
	(window_view_selected), (window_restore_state),
	(planner_window_set_status), (window_menu_item_select_cb),
	(window_menu_item_deselect_cb), (window_disconnect_proxy_cb),
	(window_connect_proxy_cb): Add status bar and use it for status
	messages.

	* src/planner-sql-plugin.c:
	* src/planner-html-plugin.c:
	* src/planner-xml-planner-plugin.c: Fix strings that were changed
	in the ui manager transition.

2004-08-06  Richard Hult  <richard imendio com>

	* src/planner-window.c: Comment out unused action to get rid of
	stock icon warning.
	(window_populate): Create statusbar.

	* src/planner-view-loader.c (mvl_load_dir): Sort the views.

	* src/planner-window.c (window_add_widget): Remove the handle.

2004-08-06  Xavier Ordoquy  <xordoquy linovia com>

	* src/Makefile.am:
	Fixed Typo in the marshaller generation.

2004-08-06  Xavier Ordoquy  <xordoquy linovia com>

	* src/planner-sql-plugin.c:
	Now uses the GtkUIManager for the menu/toolbar.

2004-08-06  Richard Hult  <richard imendio com>

	* src/planner-resource-cmd.c: Include config.h.

	* src/*.c: Fix coding style inconsistencies.

2004-08-06  Richard Hult  <richard imendio com>

	* src/planner-task-cmd.c: Include config.h to fix i18n.

	* src/planner-gantt-view.c: (activate):
	* src/planner-html-plugin.c: (plugin_init):
	* src/planner-resource-view.c: (activate):
	* src/planner-task-view.c: (activate):
	* src/planner-ttable-view.c: (activate):
	* src/planner-window.c: (window_populate), (window_print_cb):
	* src/planner-xml-planner-plugin.c: (plugin_init): Set translation
	domain to get i18n working.

	* data/ui/gantt-view.ui: 
	* data/ui/main-window.ui: Remove spaces.

2004-08-05  Xavier Ordoquy  <xordoquy linovia com>

	* data/ui/gantt-view.ui:
	* data/ui/html-plugin.ui:
	* data/ui/main-window.ui:
	* data/ui/resource-view.ui:
	* data/ui/sql-plugin.ui:
	* data/ui/task-view.ui:
	* data/ui/time-table-view.ui:
	* data/ui/xml-planner-plugin.ui:
	Change the file to match the GtkUIManager xml.

	* src/planner-application.h:
	* src/planner-gantt-view.c:
	* src/planner-html-plugin.c:
	* src/planner-main.c:
	* src/planner-python-plugin.c:
	* src/planner-resource-view.c:
	* src/planner-sql-plugin.c:
	* src/planner-task-popup.c:
	* src/planner-task-view.c:
	* src/planner-ttable-view.c:
	* src/planner-view.c:
	* src/planner-view.h:
	* src/planner-window.c:
	* src/planner-window.h:
	* src/planner-working-time-dialog.c:
	* src/planner-xml-planner-plugin.c:
	Now uses the GtkUIManager for the menu/toolbar.

2004-08-03  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c: (task_tree_init), (task_tree_finalize),
	(task_tree_row_activated_cb): Bring up task dialog when a row is
	activated. Fixes bug #148058.

2004-08-03  Richard Hult  <richard imendio com>

	* src/planner-resource-dialog.c: Clean up coding style a bit. Use
	g_strtod instead of g_ascii_strtod. Change cost to a regular
	property.

	* src/planner-project-properties.c:
	* src/planner-resource-view.c:
	* src/planner-task-tree.c: Use g_strtod instead of g_ascii_strtod.

2004-08-03  Richard Hult  <richard imendio com>

	* libplanner/mrp-old-xml.c: Handle non-existant properties better.
	* libplanner/mrp-project.c: Don't add a cost custom property.
	* libplanner/mrp-resource.c: Add cost property. 

	* libplanner/mrp-task-manager.c (mrp_task_manager_move_task):
	Invalidate cost cache.

	* libplanner/mrp-task.c (task_remove_subtree_cb): Remove extra
	mrp_object_removed call.
	(imrp_task_remove_subtree): Invalidate cost cache.
	(task_set_property): Likewise.

	Based on patch from Doroszlai Attila to fix bug #138475.

2004-08-02  Alvaro del Castilo  <acs barrapunto com>
	
	* data/sql/Makefile.am: new files
	data/sql/database-0.13.sql
	data/sql/upgrade-0.11-0.13.sql
	added new table to store the database tables version
	* libplanner/Makefile.am: need DATADIR to find SQL files
	* libplanner/mrp-sql.c: fix some warnings, formatting and
	issues with the project_id.
	* src/Makefile.am: used planner version to locate SQL files
	to be loaded. Also we use SQL_DIR to find SQL files.
	* src/planner-sql-plugin.c: 
	(sql_get_last_error) get last error from database connection
	(is_newer_version): compare to planner versions
	(check_database_tables): check if tables in planner database already exists
	and create them if not.
	(create_database): check if planner database exists and create it if not.
	(sql_get_tested_connection): get a connection to the database checking that
	planner database and tables are created if they don't exist.
	
2004-08-02  Richard Hult  <richard imendio com>

	* src/planner-gantt-model.h:
	* src/planner-task-tree.c: (task_tree_assigned_to_data_func),
	(task_tree_add_column):
	* src/planner-task-view.c: (get_widget): Add patch from Chris
	Morgan <cmorgan alum wpi edu> to add a column with the assigned
	resources.

2004-08-01  Richard Hult  <richard imendio com>
	
	* libplanner/mrp-task-manager.c:
	(task_manager_clean_graph_func),
	(task_manager_build_dependency_graph),
	(add_predecessor_to_dependency_graph),
	(remove_predecessor_from_dependency_graph_recursive),
	(remove_predecessor_from_dependency_graph),
	(remove_parent_from_dependency_graph),
	(add_parent_to_dependency_graph),
	(remove_task_from_dependency_graph),
	(add_task_to_dependency_graph): Build dependency graph in one go,
	and add functions to add/remove a single task.

	(task_manager_traverse_dependency_graph),
	(task_manager_calc_relation),
	(task_manager_do_forward_pass_helper),
	(task_manager_do_forward_pass), (task_manager_do_backward_pass),
	(mrp_task_manager_rebuild), (mrp_task_manager_recalc): Use the new
	dependency graph when doing the CPM forward/backward passes.

	(check_predecessor_traverse),
	(mrp_task_manager_check_predecessor),
	(mrp_task_manager_check_move): Check for loops in the graph when
	adding a predecessor or moving a subtree.

	* libplanner/mrp-private.h:
	* libplanner/mrp-task.c: (task_init), (task_finalize),
	(task_remove_subtree_cb), (imrp_task_insert_child),
	(imrp_task_get_graph_node): Replace the dependency tree + links
	with a graph.
 	
	* tests/files/test-2.planner:
	* tests/scheduler-test.c: (main): Make it simple to add more test
	files, and add one.

2004-08-01  Richard Hult  <richard imendio com>

	* src/Makefile.am: Clean up.

	* Makefile.am:
	* configure.in: 
	* tests/: Add back the tests and add a new test for the
	scheduler.

2004-08-01  Richard Hult  <richard imendio com>

	* src/planner-window.c (window_do_save_as): Use the right
	response, fixes saving.

2004-07-31  Richard Hult  <richard imendio com>

	* src/Makefile.am: Put scale utils in the executable, split out
	shared gantt header code.

	* src/planner-gantt-row.c (gantt_row_event): Move declaration to
	the top.

2004-07-30  Xavier Ordoquy  <xordoquy linovia com>

	* python/Makefile.am:
	We do need to include ../src headers and PLANNER FLAGS

	* python/planner-types.defs:
	* python/planner.defs:
	* python/planner.override:
	Added PlannerApplication and PlannerWindow to binding.

	* src/planner-python-plugin.c:
	Do more imports as bonobo is required for
	PlannerWindow.
	Replaced the project by window.

2004-07-30  Xavier Ordoquy  <xordoquy linovia com>

	* data/ui/Makefile.am:
	* data/ui/python-plugin.ui:
	* src/planner-python-plugin.c:
	The plugin now reads files in ~/.gnomeXX/planner/python

2004-07-30  Anders Carlsson  <andersca gnome org>

	* configure.in:
	* data/mime/Makefile.am:
	* data/planner.desktop.in:
	Support new mime activation specification.
	
2004-07-30  Richard Hult  <richard imendio com>

	* examples/Makefile.am:
	* examples/kitchen.planner: Add nice example from Kurt.

2004-07-30  Richard Hult  <richard imendio com>

	* src/planner-window.c: (get_last_dir): Remove trailing slash.

2004-07-30  Richard Hult  <richard imendio com>

	* configure.in:
	* data/ui/Makefile.am:
	* src/Makefile.am: Don't make resource usage view optional.

2004-07-30  Richard Hult  <richard imendio com>

	* configure.in: Update requirements.

	* libegg/recent-files: Sync with latest libegg.

	* libplanner/mrp-file-module.c: (mrp_file_module_load_all):
	* src/planner-plugin-loader.c: (mpl_load_dir):
	* src/planner-view-loader.c: (mvl_load_dir): Don't hardcode .so
	suffix.

	* src/Makefile.am: Split out shared code from task/gantt views.

2004-07-27  Richard Hult  <richard imendio com>

	* src/planner-task-dialog.c:
	(task_dialog_resource_units_cell_edited): Merge from 0.12 branch.

2004-07-19  Richard Hult  <richard imendio com>

	* configure.in: Bump.

2004-07-08  Anders Carlsson  <andersca gnome org>

	* src/planner-window.c: (window_open_cb), (window_do_save_as):
	We don't need to check if we're opening a directory.

2004-07-08  Anders Carlsson  <andersca gnome org>

	* configure.in:
	* data/glade/html-output.glade:
	* src/planner-window.c: (window_open_cb), (window_do_save_as):
	Use GtkFileChooser.
	
2004-07-08  Richard Hult  <richard imendio com>

	* Release 0.12.

	* configure.in: Bump version.
	* examples/sample-1.planner: Fix the sample name.
	* src/planner-window.c: (window_update_title): Brand a bit.

2004-07-07  Richard Hult  <richard imendio com>

	* planner.spec.in: Put the sql storage in the right
	package. Redirect mime updating to /dev/null.

	* docs/user-guide/C/planner.xml: Fix up.

	* src/planner-window.c: Brand a bit.
	
2004-07-05  Richard Hult  <richard imendio com>

	* configure.in: Bump.

	* src/planner-resource-view.c:
	(resource_cmd_edit_custom_property): Remove string.

	* src/planner-task-dialog.c: (task_cmd_edit_sched): Change string
	that was completely wrong. Sorry translators, but this is better
	to have fuzzy than the wrong meaning.

	* src/planner-task-tree.c: (task_cmd_edit_custom_property): Remove
	string.

2004-07-02  Richard Hult  <richard imendio com>

	* src/planner-ttable-row.c: (ttable_row_realize),
	(ttable_row_draw_resource_ival): Draw vertical separators between
	the intervals.

2004-07-02  Richard Hult  <richard imendio com>

	* src/planner-gantt-chart.c: Fix coding style in a few places.

	* src/planner-ttable-chart.c (ttable_chart_map):
	* src/planner-ttable-view.c: (ttable_view_project_loaded_cb): Add
	workaround to make this a bit better for 0.12.

2004-07-02  Richard Hult  <richard imendio com>

	* src/planner-ttable-chart.c (planner_ttable_chart_set_model):
	Don't add a signal connected to a task to the list of connections
	to remove.

	* src/planner-ttable-row.c (recalc_bounds): Don't use
	uninitialized values.

2004-07-01  Richard Hult  <richard imendio com>

	* src/planner-ttable-row.c (ttable_row_draw_resource_ival): Draw
	the border correctly.

	* src/planner-gantt-chart.c: (gantt_chart_row_has_child_toggled),
	(planner_gantt_chart_set_model): Redraw when parenthood changes.

	* src/planner-ttable-chart.c: Add hack to fix a bug where zoom to
	fit don't work.

2004-07-01  Richard Hult  <richard imendio com>

	* src/planner-gantt-model.c (value_cache_get_wbs): Plug leak.

	* src/planner-gantt-*.c: Clean up a bit.

2004-07-01  Richard Hult  <richard imendio com>

	* src/planner-resource-view.c (resource_view_insert_resource_cb):
	Don't enter editable mode for inserted rows, we need undo
	transactions first.

2004-06-30  Richard Hult  <richard imendio com>

	* Makefile.am:
	* configure.in:
	* examples/sample-1.planner:  Dist the examples.

	* data/ui/xml-planner-plugin.ui: Fix string.

	* docs/user-guide/C/planner.xml: Make the man version the same as
	the app version, looks silly otherwise.
	
	* libplanner/mrp-parser.c: (mrp_parser_save):
	* libplanner/mrp-project.c: (mrp_project_save_as):
	* src/planner-application.c: (application_init):
	* src/planner-window.c: (window_do_save_as), (planner_window_open):
	* src/planner-xml-planner-plugin.c: (xml_planner_plugin_export):
	Fix up filename extensions and mime types.

	* planner.spec.in: Get this baby working.
	
2004-06-30 Alvaro del Castillo  <acs barrapunto com>

	* configure.in
	* data/Makefile.am
	* data/sql/Makefile.am
	* data/sql/database-0.11.sql
	* data/sql/database.sql
	* data/sql/upgrade-0.6.x-0.11.sql
	Install sql schema files in the system

2004-06-29  Setul Patel   <setulkumarpatel yahoo com>

	* Add G_GNUC_CONST to all _get_type functions.
	
2004-06-26 Alvaro del Castillo  <acs barrapunto com>
	
	* libplanner/mrp-object.c: Fix in mrp_object_get_property API doc.
	* src/planner-property-dialog.c: Implemented recovering properties
	values for tasks and resources when you undo a remove custom
	property operation. Fixes #143609.

2004-06-25  Richard Hult  <richard imendio com>

	* src/planner-ttable-row.c: (recalc_bounds),
	(ttable_row_resource_notify_cb),
	(ttable_row_assignment_notify_cb): Don't redraw unless the
	geometry is changed.

2004-06-25  Richard Hult  <richard imendio com>

	* src/planner-ttable-*.[ch]: Indent this so it at least remotely
	looks like the rest of the planner code. Sigh.  Do some of the
	same optimizations to the drawing code as was done to the gantt
	chart recently.

2004-06-25  Setul Patel   <setulkumarpatel yahoo com>

	* data/ui/gantt-view.ui:
	* data/ui/task-view.ui:
	* data/ui/resource-view.ui: Fix bug #144466.

2004-06-25  Richard Hult  <richard imendio com>

	* Makefile.am:
	* data/mime/Makefile.am:
	* data/mime/planner.keys.in:
	* dotnet/libplanner/Makefile.am:
	* dotnet/libplanner/libplanner-api.xml:
	* dotnet/samples/Example01.cs:
	* dotnet/samples/Example10.cs:
	* dotnet/samples/Makefile.am: Fix distcheck.

	* libplanner/mrp-sql.c: (sql_get_last_error), (get_int), (get_id),
	(get_string), (get_boolean), (get_float):
	* src/planner-sql-plugin.c: (get_int), (get_string):
	* src/planner-task-dialog.c: Fix leaks and warnings.

2004-06-23 Alvaro del Castillo  <acs barrapunto com>
	
	* src/planner-calendar-dialog.c
	* src/planner-day-type-dialog.c
	* src/planner-group-dialog.c
	* src/planner-phase-dialog.c
	* src/planner-project-properties.c
	* src/planner-resource-cmd.c
	* src/planner-resource-dialog.c
	* src/planner-resource-view.c
	* src/planner-task-cmd.c
	* src/planner-task-dialog.c
	* src/planner-task-tree.c:
	Change strings from undo command to fix bug #144742 and
	use the new undo API call planner_cmd_new which fix the
	more hard change in bug #144734.

2004-06-23  Richard Hult  <richard imendio com>

	* src/planner-ttable-model.c (ttable_model_resource_removed_cb):
	Disconnect signals when resources are removed. Fixes bug #141120.

2004-06-22  Richard Hult  <richard imendio com>

	* src/planner-window.c: Fix bug #140335, save UI state, based on
	patch from Chris Ladd.

2004-06-22  Richard Hult  <richard imendio com>

	* configure.in:
	* data/images/Makefile.am:
	* data/images/gnome-application-x-mrproject.png:
	* data/images/gnome-application-x-planner.png:
	* data/mime/Makefile.am:
	* data/mime/planner.applications:
	* data/mime/planner.keys.in:
	* data/mime/planner.mime:
	* data/mime/planner.xml.in: Make the mime type stuff work.

	* libplanner/mrp-xsl.c: (html_write), (xml_planner_pre012_write):
	Fix strings.

2004-06-22  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-gantt-chart.c:
	Remove the relations using gantt_chart_relation_removed
	not just removing the relation from the hash table.

2004-06-22  Richard Hult  <richard imendio com>

	* src/planner-task-dialog.c (task_dialog_update_sensitivity):
	Don't make work insensitive for fixed duration.

2004-06-21  Richard Hult  <richard imendio com>

	* data/stylesheets/Makefile.am:
	* data/stylesheets/planner2plannerv011.xsl:
	* data/ui/Makefile.am:
	* data/ui/html-plugin.ui:
	* data/ui/main-window.ui:
	* data/ui/xml-planner-plugin.ui:
	* libplanner/mrp-xsl.c: (xml_planner_pre012_write), (init):
	* src/planner-html-plugin.c:
	* src/planner-xml-planner-plugin.c: (get_last_dir),
	(xml_planner_plugin_export), (plugin_init), (plugin_exit): Based
	on patch from Lincoln, fixes bug #141257: export as older planner
	version.

	* src/planner-window.c: Remove stray precondition tests.

2004-06-21 Alvaro del Castillo  <acs barrapunto com>

	* libplanner/mrp-calendar.[ch] (mrp_calendar_add): new function
	needed for the undo system.
	* src/planner-calendar-dialog.c: undo support for add and remove
	calendars.
	* src/planner-working-time-dialog.c: undo support for changing the
	working time in calendars.

2004-06-21  Richard Hult  <richard imendio com>

	* src/planner-property-dialog.c:
	* src/planner-property-dialog.h:
	* src/planner-property-model.h: Fix indentation and remove the
	possibility to select which columns to use (unsed and didn't
	work). Also apply patch from Lincoln to fix bug #141967.

	* src/planner-task-tree.c: Remove debug output.

2004-06-21 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-sql-plugin.c: change in
	planner_application_get_gconf_client that breaks CVS compile,
	detected by lincoln. Change to use the new API.

2004-06-19  Richard Hult  <richard imendio com>

	* libplanner/mrp-resource.c (resource_set_property,
	resource_set_property): Reschedule when the resource calendar is
	modified and the resource has assignments. Also reschedule when
	the calendar is changed. Fixes bug #138159.

	* libplanner/mrp-project.c (mrp_project_reschedule): Force recalc,
	otherwise this won't do anything.

	* src/planner-resource-view.c: (resource_view_resource_notify_cb),
	(resource_view_resource_prop_changed_cb),
	(resource_view_resource_added_cb),
	(resource_view_resource_removed_cb):
	* src/planner-gantt-model.c: (gantt_model_connect_to_task_signals),
	(traverse_remove_subtree), (gantt_model_task_removed_cb),
	(gantt_model_task_notify_cb), (gantt_model_task_prop_changed_cb):
	* src/planner-task-tree.c: (task_tree_property_changed): Fix bug
	#142121, custom properties don't update correctly on undo/redo.

2004-06-19  Richard Hult  <richard imendio com>

	* src/planner-ttable-tree.c (planner_ttable_tree_set_model)
	(ttable_tree_row_inserted): Fix bug #141117, tree and chart
	expansion gets out of sync.

2004-06-18  Richard Hult  <richard imendio com>

	* data/glade/task-dialog.glade:
	* src/planner-task-dialog.c: (planner_task_dialog_new): Remove the
	disabled option menus until we actually implement those parts.
	(task_dialog_connect_to_task): Use - instead of _ in notify signal
	names, fixes bug where the spinbutton wasn't updated.
	(task_dialog_task_complete_changed_cb): Use accessor.

2004-06-18 Alvaro del Castillo  <acs barrapunto com>

	* libplanner/mrp-task.c: (task_remove_subtree_cb):
	* src/planner-gantt-chart.c: (gantt_chart_insert_task),
	(gantt_chart_relation_added), (gantt_chart_task_removed),
	(gantt_chart_tree_node_remove): Fix bug #141346.

2004-06-18  Richard Hult  <richard imendio com>

	* src/planner-gantt-row.c (gantt_row_notify_cb): Update when
	percent complete changes.

	* src/planner-gantt-print.c (planner_gantt_print_do)
	(gantt_print_task): Fix bug #134552, print out percent complete.

2004-06-18 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-cmd.c: Fixed bad string

	* src/planner-calendar-dialog.c: Added undo for calendar day type

2004-06-17  Richard Hult  <richard imendio com>

	* src/planner-gantt-print.c: (planner_gantt_print_do): Handle
	cases where page start equals task finish, can happen with
	milestone tasks for example. Also add a workaround to fix a crash
	(bug #135473) when the scheduler has screwed up, for 0.12.

2004-06-17  Richard Hult  <richard imendio com>

	* src/planner-application.c:
	* src/planner-gantt-chart.c:
	* src/planner-gantt-view.c:
	* src/planner-print-dialog.c:
	* src/planner-task-tree.c:
	* src/planner-task-view.c:
	* src/planner-window.c: Simplify gconf code and add keys for
	critical path highlighting.

2004-06-17  Richard Hult  <richard imendio com>

	* src/planner-gantt-row.c (gantt_row_notify_cb): Only redraw if
	critical changed, don't update arrow positions.

	* src/planner-gantt-model.c: Improve the caching scheme (AKA make
	it work).

2004-06-17  Richard Hult  <richard imendio com>

	* libplanner/mrp-task-manager.c (task_manager_do_backward_pass):
	Don't set critical if it hasn't changed.

2004-06-17  Richard Hult,,,  <richard imendio com>

	* src/planner-gantt-model.c: (gantt_model_task_inserted_cb),
	(traverse_remove_subtree), (gantt_model_remove_subtree),
	(gantt_model_task_removed_cb), (gantt_model_reattach_subtasks),
	(gantt_model_task_moved_cb), (gantt_model_task_notify_cb),
	(traverse_insert_task_into_hash), (planner_gantt_model_new),
	(gantt_model_get_iter), (gantt_model_get_value), (dump_children),
	(value_cache_get_wbs), (value_cache_free), (value_cache_get),
	(value_cache_clear), (value_cache_set_wbs):
	* src/planner-task-tree.c: (task_tree_name_data_func),
	(task_tree_work_data_func), (task_tree_start_show_popup): Use
	accessors in even more places. Add a caching scheme and use it to
	cache the WBS string instead of generating it lots and lots of
	times.

2004-06-16  Richard Hult  <richard imendio com>

	* src/planner-gantt-row.c: Cache the frame gc and colors.

	* src/planner-task-dialog.c (task_dialog_pred_cell_edited): Don't
	create the predecessor twice.

	* libplanner/mrp-resource.c: (mrp_resource_get_short_name),
	(mrp_resource_set_short_name):
	* libplanner/mrp-task-manager.c: (dump_children),
	(mrp_task_manager_dump_task_list), (task_manager_calc_relation),
	(task_manager_get_task_units_intervals),
	(task_manager_calculate_task_finish),
	(task_manager_do_forward_pass), (mrp_task_manager_recalc):
	* libplanner/mrp-task.c: (mrp_task_add_predecessor): Add accessors
	to speed up things, clean up coding style-wise.
	
	* src/planner-gantt-chart.c: Clean up a bit and use accessors.
	
	* src/planner-gantt-row.c (recalc_bounds): Check if things really
	changed.
	(gantt_row_notify_cb): Don't redraw if things didn't change.
	(gantt_row_draw, gantt_row_assignment_added),
	(gantt_row_assignment_removed),
	(gantt_row_assignment_units_changed),
	(planner_gantt_row_get_geometry), (planner_gantt_row_set_visible),
	(gantt_row_event): Use accessors.

	* src/planner-relation-arrow.c: Indent.
	(planner_relation_arrow_new): Set the relation type before setting
	up the geometry, fixes creating other relations than the default.

	* src/planner-task-dialog.c: Comment out FF and SF for now. Get
	the right relation type instead of relying on the index to match
	the enum value. Use accessors.

	* src/planner-gantt-print.c: (print_table_header),
	(print_table_tasks), (print_time_header),
	(planner_gantt_print_do),
	(planner_gantt_print_data_new), (free_page),
	(planner_gantt_print_data_free): Reindent, fix style issues, plug
	leaks.

2004-06-15  Richard Hult  <richard imendio com>

	* dotnet/libplanner/Makefile.am: Patch from steevdave steev net to
	fix building with recent mono.

2004-06-14 Alvaro del Castillo  <acs barrapunto com>

	* Added src/planner-task-cmd.[ch]: shared undo commands for tasks
	go to this file.
	* Added src/planner-resource-cmd.[ch]: shared undo commands for resources
	go to this file.	
	* po/ChangeLog, po/POTFILES.in: new files has strings to be translated. Added.
	* src/Makefile.am: new files need to be compiled and linked in planner.
	* src/planner-gantt-row.c: use the new files for task undo commands 
	planner-task-cmd.[ch]
	* src/planner-resource-input-dialog.[ch]: undo for resources inserted implemented.
	* src/planner-resource-view.c: move some resource undo code to new file 
	planner-resource-cmd.[ch]
	* src/planner-task-dialog.[ch]: move some task undo code to new file 
	planner-task-cmd.[ch]
	* src/planner-task-input-dialog.[ch]: undo for tasks inserted implemented.
	* src/planner-task-tree.[ch]: use the new files for task undo commands 
	planner-task-cmd.[ch]. Move some task undo code to these files.

2004-06-13 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-dialog.c: implemented undo for note
	task dialog editor

	* libplanner/mrp-task.c: init task note with a "" string like
	we do for a resource.

2004-06-12 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-tree.[ch]: added new function to get the 
	PlannerWindow for a PlannerTaskTree. This is need because we
	are moving task undo commands to a central point so we have removed
	from src/planner-task-tree.c the undo command that were used in
	planner-gantt-row.

	(planner_task_tree_get_window)

	I need to check with richard the change and maybe, find a better way to 
	do it. The CVS doesn't work so we need a quick fix ;-)

2004-06-12 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-tree.c: moved undo code to planner-task-dialog
	in last commit but failed to commit this file.

2004-06-10 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-dialog.[ch]: implemented undo for predecessor
	task dialog editor (add/remove predecessor, edit a predecessor)
	
2004-06-08  Richard Hult  <richard imendio com>

	* libplanner/mrp-object.c: (mrp_object_get_project):
	* libplanner/mrp-object.h:
	* libplanner/mrp-project.h: Small hack to avoid a lot of
	g_object_get.
	
	* src/planner-gantt-model.c: (gantt_model_get_value): Use
	work_start instead of start for display and use the getters
	instead of g_object_get in the get_value function.

2004-06-07 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-dialog.c: implemented undo for resource
	assignment to task (assign resource, remove resource, change
	units assigned). 

	Use planned_cmd_new API in all the undo code.

	Changes in undo functions in order to be more understable.
	
2004-06-06 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-dialog.c: implemented undo milestone and 
	fixed duration in task dialog.
	
2004-06-04 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-dialog.c: implemented undo for all the fields
	in the first page of the task dialog editor notebook, except 
	milestone and fixed duration.

	* src/planner-resource-view.c: fixed memory leaks using GValues.

	* src/planner-task-tree.c: fixed memory leaks using GValues.
	

2004-06-03  Setul Patel  <setulkumarpatel yahoo com>

	* data/ui/main-window.ui: Fix bug #143662.
	
2004-06-02  Richard Hult  <richard imendio com>

	* Commit patch from Lincoln Phipps to fix bug #140694.
	
2004-05-20  Richard Hult  <richard imendio com>

	* configure.in: Fix aclocal flags. Bump version to 0.11.90.	

	* autogen.sh: Revert change from Tomasz.

2004-05-18 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-tree.c: implemented custom properties editing undo
	and reset costraints undo.

2004-05-14  Xavier Ordoquy  <xordoquy wanadoo fr>

	* src/planner-python-plugin.c:
	Changed the python interpreter management.

2004-05-12  Tomasz KÅ?oczko <kloczek pld org pl>

	* autogen.sh: allow use autogen.sh not only in automake 1.7.x enviroment.
	* data/ui/Makefile.am: fix for include in dist tar ball timetable
	  and python UI files.
	* dotnet/samples/Makefile.am, dotnet/Makefile.am: include in dist
	  tar ball example files.
	* src/Makefile.am: include in dist tar ball missing header files.

2004-05-10  Richard Hult  <richard imendio com>

	* src/planner-ttable-view.c (ttable_view_update_zoom_sensitivity) 
	(activate, ttable_view_zoom_out_cb, ttable_view_zoom_in_cb) 
	(ttable_view_zoom_to_fit_cb): Fix bug #141116, patch from Lincoln.

	* data/ui/time-table-view.ui: Fix the weird edit menu.
	* src/planner-ttable-model.c: Start cleaning up coding style.

2004-05-10  Richard Hult  <richard imendio com>

	* data/ui/Makefile.am: Dist all ui files unconditionally.

	* data/glade/project-properties.glade:
	* src/planner-phase-dialog.c: (phase_dialog_remove_phase),
	(phase_dialog_new_dialog_run), (phase_cmd_insert_do),
	(phase_cmd_insert_undo), (phase_cmd_insert_free),
	(phase_cmd_insert), (phase_cmd_remove_do), (phase_cmd_remove_undo),

	(phase_cmd_remove_free), (phase_cmd_remove): Commit patch from
	Lincoln Phipps with modifications. Fixes bug #141177 and bug
	#141184.

2004-05-09 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-gantt-row.c: Task link undo with new GError system.

	* src/planner-task-tree.c: 
	Clean "g_free (cmd)" and "g_free (cmd_base->label)" that it's done
	in the command manager.
	TaskCmdTaskMove is renamed to TaskCmdMove.
	Clean Task Move system so we use the new GError system.
	Undo system for link task.

	* src/planner-task-tree.[ch]:
	Export link undo method so planner-gantt-row.c can use it.
	
2004-05-03  Richard Hult  <richard imendio com>

	* configure.in:
	* libplanner/mrp-sql.c: (sql_get_last_error), (get_int), (get_id),
	(get_string), (get_boolean), (get_float), (mrp_sql_load_project),
	(mrp_sql_save_project):
	* src/Makefile.am:
	* src/planner-python-plugin.c: (python_plugin_execute): Fix build.

	* data/ui/python-plugin.ui: Fix typo.

2004-05-03 Alvaro del Castillo  <acs barrapunto com>

        * src/planner-resource-dialog.c: implemented undo for resource cost
        in the resource editor dialog.

        * src/planner-resource-dialog.c:
        (resource_dialog_close_clicked_cb)
        (resource_dialog_resource_removed_cb)
        Disconnect signal for resource removed so we don't try to destroy
        a widget that doesn't exist

2004-05-03  Richard Hult  <richard imendio com>

	* libplanner/mrp-project.c: (imrp_project_add_calendar_day),
	(mrp_project_get_calendar_day_by_id):
	* libplanner/mrp-project.h:
	* src/planner-default-week-dialog.c:
	(default_week_dialog_response_cb), (is_day_builtin),
	(default_week_cmd_edit_do), (default_week_cmd_edit_undo),
	(default_week_cmd_edit_free), (default_week_cmd_edit): Add undo
	support for editing the default week.

2004-05-02  Richard Hult  <richard imendio com>

	* src/planner-calendar-dialog.c: (cal_dialog_response_cb),
	(planner_calendar_dialog_new),
	(cal_dialog_update_calendar_widgets):
	* src/planner-cmd-manager.c: (cmd_manager_insert),
	(planner_cmd_manager_insert_and_do), (transaction_cmd_do),
	(planner_cmd_manager_end_transaction), (planner_cmd_new_size):
	* src/planner-cmd-manager.h:
	* src/planner-day-type-dialog.c: (day_type_cmd_add_do),
	(day_type_cmd_remove_do):
	* src/planner-default-week-dialog.c:
	(default_week_dialog_response_cb),
	(planner_default_week_dialog_new), (default_week_cmd_edit_do),
	(default_week_cmd_edit_undo), (default_week_cmd_edit_free),
	(default_week_cmd_edit):
	* src/planner-group-dialog.c: (group_cmd_insert_do),
	(group_cmd_remove_do), (group_cmd_default_do),
	(group_cmd_edit_property_do):
	* src/planner-project-properties.c: (property_cmd_edit_do):
	* src/planner-resource-dialog.c: (resource_cmd_calendar_do),
	(resource_cmd_calendar_free), (resource_cmd_note_do),
	(resource_cmd_edit_property_do):
	* src/planner-resource-view.c: (resource_cmd_insert_do),
	(resource_cmd_remove_do), (resource_cmd_edit_property_do),
	(resource_cmd_edit_custom_property_do):
	* src/planner-task-tree.c: (task_cmd_insert_do),
	(task_cmd_insert_undo), (task_cmd_insert),
	(task_cmd_edit_property_do), (task_cmd_remove_do),
	(task_cmd_remove), (task_cmd_constraint_do), (task_cmd_constraint),
	(task_cmd_task_move_do): Change the command manager interface
	slightly to be able to handle commands that fail, and add some
	convenience API. Update everything to the new interface.

	* src/planner-resource-dialog.c (resource_cmd_calendar_free):
	Check the right calendar before unreffing it.

2004-05-02  Richard Hult  <richard imendio com>

	* libplanner/Makefile.am:
	* libplanner/mrp-object.c: (mrp_object_set_id):
	* src/Makefile.am: Add back the warning flags and fix a warning.

2004-05-01  Richard Hult  <richard imendio com>

	* src/planner-cmd-manager.c (cmd_manager_free_func): Add commented
	out code to free the base command, need to add this when the rest
	of the code is fixed.

	* libplanner/mrp-day.c: (mrp_day_add): Clean a bit.

	* src/planner-day-type-dialog.c: Implement undo/redo. Use the day
	id instead of the pointer to identify day types.

2004-05-01 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-resource-dialog.c: implemented undo for resource calendar 
	in the resource editor dialog.

2004-05-01 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-resource-dialog.c: implemented undo for resource note
	in the resource editor dialog.

2004-04-29  Xavier Ordoquy  <xordoquy wanadoo fr>

	* libplanner/mrp-task-manager.c:
	(mrp_task_manager_calculate_task_work):
	Added the assignement units to the duration to work convertion.

2004-04-28  Tomasz KÅ?oczko <kloczek pld org pl>

	* configure.in: remove AC_SUBST() for CFLAGS, CPPFLAGS, LDFLAGS
	(this variables are substed by default).

2004-04-27  Richard Hult  <richard imendio com>

	* docs/user-guide/C: Update from Kurt. Fixes bug #140330.

	* Fix bug #132453. Based on patch from Lincoln Phipps.

2004-04-27  Xavier Ordoquy  <xordoquy wanadoo fr>

	* acinclude.m4:
	Added checks for python environment (taken out from pygtk).

	* configure.in:
	Updated the python binding and added the python module.

	* Makefile.am:
	Added conditional python binding build.

	* data/ui/Makefile.am:
	* data/ui/python-plugin.ui:
	Added the python-plugin menu entry.

	* python/Makefile.am:
	Changed the planner module name and cleaned flags.

	* python/planner-arg-types.py:
	Created from planner-arg-types.defs.

	* python/planner.defs:
	Added insert_task default parameters.

	* python/test.py:
	Example script for python binding and python module.

	* src/Makefile.am:
	Added the planner-python-plugin.

	* src/planner-python-plugin.c:
	Created a plugin to get python scripting in planner.

2004-04-26  Richard Hult  <richard imendio com>

	* libplanner/mrp-task.c (mrp_task_get_cost): Commit cost
	calculation fix from Alvaro.

2004-04-19  Richard Hult  <richard imendio com>

	* libplanner/mrp-task-manager.c: (mrp_task_manager_recalc): Don't
	let recalc trigger a recursive recalc.

2004-04-19  Tomasz KÅ?oczko <kloczek pld org pl>

	* docs/sql/Makefile.am: updated EXTRA_DIST files list.

2004-04-19  Mikael Hallendal  <micke imendio com>

	* src/planner-resource-dialog.c:
	(resource_dialog_email_changed_cb): fixed mem-leak.

2004-04-17  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-group-dialog.c: better memory handling.
	* src/planner-resource-dialog.c: undo using focus in/focus out.
	Maybe we use the focus out to change values in planner so this
	could change in the future.
	Implemented "_free" functions for undo system.
	* src/planner-resource-view.c: better memory handling.
	Implemented "_free" functions for undo system.
	
2004-04-17  Richard Hult  <richard imendio com>

	* libplanner/mrp-sql.c: (mrp_sql_save_project):
	* src/planner-sql-plugin.c: (sql_plugin_retrieve_project_id):
	Handle errors (such as no database server running) better.

2004-04-17  Richard Hult  <richard imendio com>

	* libplanner/mrp-task-manager.c (task_manager_do_forward_pass):
	Notify duration changes. Fixes bug #140324.

	* src/planner-window.c (window_get_name): Don't show database
	details such as password.
	(window_confirm_exit_run): Hack for now that removes the save
	button for database projects.

	* data/glade/sql.glade:
	* libplanner/mrp-sql.c: (sql_read_resources):
	* src/planner-sql-plugin.c: (sql_plugin_retrieve_project_id): Fix
	bug #136507, based on patch from Lincoln with further work from
	me.

2004-04-17  Setul Patel   <setulkumarpatel yahoo com>

	* data/ui/main-window.ui:
	* src/planner-window.c: Fix bug #134357.

2004-04-17  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-tree.c: Undo code for task constraints, task
	movement and task indentation.

2004-04-16  Richard Hult  <richard imendio com>

	* src/planner-gantt-row.c: (gantt_row_get_bounds),
	(gantt_row_draw), (gantt_row_point): Fix bug #137581.

2004-04-16  Richard Hult  <richard imendio com>

	* data/stylesheets/Makefile.am:
	* data/stylesheets/html1_css.xsl:
	* data/stylesheets/html1_gantt.xsl:
	* data/stylesheets/html1_resources.xsl:
	* data/stylesheets/html1_tasks.xsl:
	* data/stylesheets/mrproject2html.xsl: Commit patch from Chris
	Ladd to fix bug #129226, bug #135388 and bug #137243.

2004-04-16  Richard Hult  <richard imendio com>

	* src/planner-gantt-view.c: (gantt_view_update_ui): Remove
	whitespace.
	
	* src/planner-resource-view.c: (resource_view_update_ui): Fix bug
	where we were trying to update the resource view bonobo ui while
	it was deactivated.

2004-04-15  Xavier Ordoquy  <xordoquy wanadoo fr>

	* src/planner-ttable-row.c: (ttable_row_event): Removed the
	MOTION_NOTIFY event for read-only view.

2004-04-15  Richard Hult  <richard imendio com>

	* src/planner-task-dialog.c: (task_dialog_task_removed_cb),
	(planner_task_dialog_new): Use connect_object and fix the callback
	signature, fixes bug #140208.

2004-04-15  Richard Hult  <richard imendio com>

	* data/glade/html-output.glade:
	* src/planner-html-plugin.c: (html_plugin_export): Hide the remote
	saving for now since it doesn't really work.

2004-04-15  Richard Hult  <richard imendio com>

	* configure.in: Disable dotnet by default.
	* src/planner-task-tree.c: (planner_task_tree_move_task_up),
	(planner_task_tree_move_task_down): Clean up a bit.

2004-04-15  Richard Hult  <richard imendio com>

	* libplanner/mrp-assignment.c: (assignment_set_property):
	* libplanner/mrp-object.c: (mrp_object_set_property):
	* src/planner-task-dialog.c:
	(task_dialog_resource_units_cell_edited): Workaround for bug
	#138368, based on patch from Lincoln.

2004-04-15  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c: (planner_task_tree_move_task_up),
	(planner_task_tree_move_task_down): Patch from Lincoln.

2004-04-15  Richard Hult  <richard imendio com>

	* src/planner-window.c (window_do_save_as): Fix build.

2004-04-14  Richard Hult  <richard imendio com>

	* libplanner/mrp-project.c: (mrp_project_save_as):
	* src/planner-window.c: (window_do_save_as): Fix bug #139317,
	based on patch from Doroszlai Attila.
	
2004-04-09  Richard Hult  <richard imendio com>

	* src/planner-resource-dialog.c: (resource_dialog_name_changed_cb),
	(resource_dialog_short_name_changed_cb),
	(resource_dialog_resource_type_changed_cb),
	(resource_dialog_type_changed_cb),
	(resource_dialog_group_changed_cb),
	(resource_dialog_email_changed_cb),
	(resource_dialog_cost_changed_cb): Block on the correct user data,
	and handle non-numerical input better.

2004-04-08  Richard Hult  <richard imendio com>

	* src/planner-gantt-model.c:
	(planner_gantt_model_get_path_from_task):
	* src/planner-task-tree.c: (planner_task_tree_remove_task),
	(planner_task_tree_move_task_up),
	(planner_task_tree_move_task_down),
	(planner_task_tree_set_anchor): Commit patch for bug #138595 from
	Lincoln Phipps. Also clean up task removal a bit and add anchor
	handling to Lincoln's patch.

2004-04-07  Richard Hult  <richard imendio com>

	* src/planner-gantt-model.c
	(planner_gantt_model_get_path_from_task): Return NULL if the task
	is not in the tree. Gets rid of warning when removing tasks with
	the undo code.

2004-04-08  Adam Weinberger  <adamw gnome org>

	* configure.in: Added en_CA to ALL_LINGUAS.

2004-04-06  Richard Hult  <richard imendio com>

	* libplanner/mrp-task-manager.c:
	* src/planner-gantt-chart.c:
	* src/planner-relation-arrow.c:
	* src/planner-task-dialog.c: (task_dialog_pred_cell_edited): Fix
	bug #129140, implement remaining task constraint types. Patch from
	Corey Schuhen.

2004-04-06  Richard Hult  <richard imendio com>

	* data/ui/gantt-view.ui:
	* data/ui/resource-view.ui:
	* data/ui/task-view.ui:
	* data/ui/time-table-view.ui: Add tooltips, patch from Setul
	Patel. Fixes bug #130937.

2004-04-06  Richard Hult  <richard imendio com>

	* data/dtd/mrproject-0.6.dtd:
	* data/glade/task-dialog.glade:
	* data/stylesheets/html1_css.xsl:
	* data/stylesheets/html1_tasks.xsl:
	* docs/sql/database-0.11.sql:
	* docs/sql/upgrade-0.6.x-0.11.sql:
	* libplanner/mrp-old-xml.c:
	* libplanner/mrp-parser.c:
	* libplanner/mrp-sql.c:
	* libplanner/mrp-task.c:
	* src/planner-task-dialog.c: Fix bug #137544, task priority
	spinner not effective. Patch from Lincoln Phipps.

2004-04-06  Richard Hult  <richard imendio com>

	* libplanner/mrp-task-manager.c: (task_manager_do_backward_pass):
	Fix bug #137063, higlight critical tasks and sub-tasks. Patch from
	Doroszlai Attila. This also fixes bug #138437.

2004-04-06  Richard Hult  <richard imendio com>

	* src/planner-gantt-row.c:
	* src/planner-task-tree.c:
	* src/planner-task-tree.h: Fix bug #132910, open task properties
	by double-clicking gantt bar and bug #132916, select task by
	clicking gantt bar. Patch from Chris Ladd.
	
2004-04-04 Alvaro del Castillo  <acs barrapunto com>

	* src/planner-task-tree.c: implemented task remove undo
	Currently recovers the task, the position in the tasks tree 
	the task relations and the resources assignments.

2004-03-29  Richard Hult  <richard imendio com>

	* libplanner/mrp-old-xml.c (old_xml_read_assignment): Be more
	robust.

	* src/planner-gantt-row.c (gantt_row_event): Patch from Doroszlai
	Attila to fix popup position.

	* src/planner-gantt-model.c: (gantt_model_get_column_type),
	(gantt_model_get_value):
	* src/planner-gantt-model.h:
	* src/planner-gantt-view.c: (gantt_view_create_widget):
	* src/planner-task-tree.c: (task_tree_wbs_data_func),
	(task_tree_add_column):
	* src/planner-task-view.c: (get_widget): Clean up wbs patch,
	change id to wbs.

2004-03-27  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-group-model.c:
	project object ref
	disconnect signals when destroying the model
	code cleaning in destroy function
	* src/planner-resource-view.c: cleaned unused variable
	* src/planner-resource-dialog.c: (resource_dialog_email_changed_cb)
	corrected string g_value (detected by Lincoln Phipps)
		
2004-03-26  Richard Hult  <richard imendio com>

	* src/planner-gantt-print.c: (planner_gantt_print_do),
	(planner_gantt_print_data_new):
	* src/planner-table-print-sheet.c:
	(table_print_sheet_print_header_cell),
	(table_print_sheet_print_cell), (table_print_sheet_create_column),
	(table_print_sheet_foreach_row), (table_print_sheet_create_pages),
	(planner_table_print_sheet_new), (planner_table_print_sheet_free):
	Don't indent the first column, indent the one with the
	expander. Fixes printing with the WBS column.

2004-03-26  Richard Hult  <richard imendio com>

	* libplanner/mrp-old-xml.c: (old_xml_read_resource): Fix bug
	#138145, read resource note, modified patch from Lincoln Phipps.

2004-03-26  Richard Hult  <richard imendio com>

	* src/planner-gantt-model.c: (gantt_model_get_column_type),
	(gantt_model_get_value):
	* src/planner-gantt-model.h:
	* src/planner-gantt-view.c: (gantt_view_create_widget):
	* src/planner-task-tree.c: (task_tree_id_data_func),
	(task_tree_add_column), (planner_task_tree_new):
	* src/planner-task-tree.h:
	* src/planner-task-view.c: (get_widget): Add WBS column.

2004-03-24  Gareth Owen  <gowen72 yahoo com>

	* configure.in: Added en_GB to ALL_LINGUAS

2004-03-22  Xavier Ordoquy  <xordoquy wanadoo fr>

	* src/planner-ttable-print.c: Removed the buggy resource usage
	view print.

	* src/planner-ttable-row.c: Disable the task move (doesn't respond
	to button press).

2004-03-18  Mikael Hallendal  <micke imendio com>

	* data/stylesheets/html1_css.xsl:
	* data/stylesheets/mrproject2html.xsl:
	- s/MrProject/Planner/g, solves #137571

2004-03-17  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-group-dialog.c: Cleaned code commented.
	* src/planner-resource-dialog.c: Some support for undo stuff.
	We need to find how to undo keystroke dialogs entries.
	If the resource is removed, the dialog is closed.
	* src/planner-task-dialog.c: If task removed, close the dialog.

2004-03-16  Richard Hult  <richard imendio com>

	* src/planner-gantt-print.c: Fix bug #134969, to fix printing
	problems with gantt chart. Patch from Heath Wilkinson again.
	
	* planner.spec.in (BuildRequires): Bring a bit more up to date.

	* configure.in: Up libxml and libxslt requirement, to fix bug
	#136752. Thanks to Jared Jones.

2004-03-15  Richard Hult  <richard imendio com>

	* data/glade/task-dialog.glade: Use better step/page sizes. Fixes
	bug #132342, idea by Lincoln Phipps.

	* src/planner-gantt-row.c: (gantt_row_event): Fix indentation and
	don't mix declarations and assignments.

2004-03-15  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c (planner_task_tree_link_tasks): Hm, I
	could have sworn that this worked before. Reverse the list to get
	the right order when linking.

	* data/glade/add-predecessor.glade: Up the limits to very low/high
	numbers.

2004-03-15  Richard Hult  <richard imendio com>

	* docs/sql/README: Tweak the instructions.

	* Add short name for resources. Fixes bug #132345, based on patch
	from Lincoln Phipps. Also fix a few memory leaks while at it.
	
2004-03-15  Richard Hult  <richard imendio com>

	* src/planner-gantt-print.c (planner_gantt_print_data_new): Patch
	from Heath Wilkinson to fix bug #137204.

	* src/Makefile.am:
	* src/planner-gantt-chart.c: (gantt_chart_insert_task),
	(planner_gantt_chart_get_view), (planner_gantt_chart_set_view),
	(planner_gantt_chart_get_highlight_critical_tasks):
	* src/planner-gantt-chart.h:
	* src/planner-gantt-row.c: (gantt_row_event),
	(planner_gantt_row_init_menu):
	* src/planner-gantt-row.h:
	* src/planner-gantt-view.c: (gantt_view_create_widget),
	(gantt_view_update_zoom_sensitivity):
	* src/planner-task-tree.c: (task_tree_init),
	(task_tree_tree_view_popup_menu): Commit patch from Chris Ladd
	<caladd particlestorm net> to fix bug #129149.

2004-03-13  Alexander Shopov  <ash contact bg>

	* configure.in: Added "bg" (Bulgarian) to ALL_LINGUAS

2004-03-10	Mohammad DAMT  <mdamt bisnisweb com>

	* configure.in: Added id (Indonesian) to ALL_LINGUAS.

2004-02-27  Richard Hult  <richard imendio com>

	* src/planner-ttable-view.c: (get_name): Implement so we don't get
	weird errors when trying to print.

2004-02-26  Richard Hult  <richard imendio com>

	* libplanner/mrp-application.c: (imrp_application_id_set_data):
	* libplanner/mrp-application.h:
	* libplanner/mrp-private.h: Fix a few warnings.

	* src/planner-sql-plugin.c (sql_plugin_retrieve_db_values): Don't
	set NULL strings as gconf values.

2004-02-17  Alvaro del Castillo  <acs barrapunto com>
	
	* libplanner/mrp-project.c
	* libplanner/mrp-resource.c
	* libplanner/mrp-resource.h
	* libplanner/mrp-task.c
	* src/planner-assignment-model.c
	* src/planner-group-dialog.c
	* src/planner-resource-view.c
	Completed the undo/redo stuff for resources and groups
	except the resource dialog that needs some thoughts.
	Started the implementation of free methods in undo/redo commands.
	Cleaned the use of object ids for the moment.
	Cleaned the object clone methods.
	* src/planner-test-plugin.c: cleaned test output

2004-02-16  Richard Hult  <richard imendio com>

	* src/planner-gantt-view.c (init): Fix icon/stock names.

	* src/planner-ttable-view.c (get_menu_label, get_label): Use title
	style and fix clashing access keys.

2004-02-14  Richard Hult  <richard imendio com>

	* data/images/24_link_task.png:
	* data/images/Makefile.am:
	* data/ui/gantt-view.ui:
	* data/ui/task-view.ui:
	* src/planner-application.c:
	* src/planner-gantt-view.c:
	* src/planner-task-tree.c:
	* src/planner-task-view.c: Add menu item and toolbar button for
	Link tasks, patch from Lincoln Phipps.

2004-02-14  Richard Hult  <richard imendio com>

	* src/planner-window.c: (window_undo_state_changed_cb),
	(window_redo_state_changed_cb): Work around a bug, needs to be
	fixed later, see bug #134357.

	* autogen.sh: Check for gtkdocize and run it.

2004-02-10  Alvaro del Castillo  <acs barrapunto com>

	* libplanner/mrp-group.c 
	* src/planner-cmd-manager.c
	* src/planner-group-dialog.c
	Clean from a wrong commit

2004-02-10  Alvaro del Castillo  <acs barrapunto com>

	* po/es.po
	Use the same translation for manager (encargado) in all places
	* src/planner-group-dialog.c
	undo/redo for group default property
	implemented the free function for undo/redo commands

2004-02-08  Alvaro del Castillo  <acs barrapunto com>

	* libplanner/mrp-resource.c
	When a group is deleted the resource removes it if it is its group
	* src/planner-group-dialog.[ch]
	undo/redo work for adding, modifying and removing groups

2004-02-02  Alvaro del Castillo  <acs barrapunto com>

	* libplanner/mrp-resource.[ch]
	Added mrp_resource_clone method that returns a new cloned resource object
	* src/planner-resource-view.c
	Use mrp_resource_clone to store the object in the undo deletion command
	New internal function to convert a string into a GValue using resource
	properties

2004-02-01  Alvaro del Castillo  <acs barrapunto com>

	* libplanner/mrp-application.c
	* libplanner/mrp-application.h
	* libplanner/mrp-object.c
	* libplanner/mrp-private.h
	* libplanner/mrp-project.c
	final implementation for the new object id system
	* src/planner-resource-view.c
	first use of the new object id system

2004-01-30  Xavier Ordoquy  <xordoquy wanadoo fr>

	* configure.in: enables resource usage (timetable) by default.

2004-01-28  Alvaro del Castillo  <acs barrapunto com>

	* libplanner/mrp-application.[ch]
	new method to get the last uid associated with objects
	* libplanner/mrp-object.c
	get a new uid for new objects from mrp-application
	* libplanner/mrp-project.c
	clean the object uid code that is now in mrp-application
	* src/planner-resource-view.c
	first use of the new object id api

2004-01-28  Alvaro del Castillo  <acs barrapunto com>

	* src/configure.in
	libgda disabled by default

2004-01-28  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-resource-view.c
	Solved a core dump when you remove a resource that is been edited
	inline.
	Added undo for the remove resource operation. Missing some properties
	in the undo yet, but we are going to start using object ids before
	going more far.

2004-01-28  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-group-dialog.c
	* src/planner-group-model.c
	* src/planner-group-model.h
	When you add a new group, it is selected by default and the
	group name cell is in editing state.
	* src/planner-resource-view.c
	When you add a resource, the resource name cell is in editing state.

2004-01-28  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-resource-view.c: Added undo for all resources properties.

2004-01-25  Richard Hult  <richard imendio com>

	* src/Makefile.am (sql_plugin): 
	* configure.in: Fix sql plugin flags.

	* src/planner-window.c (window_undo_state_changed_cb) 
	(window_redo_state_changed_cb): Set tooltip as well.

2004-01-25  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-resource-view.c: Added undo for resource name property.
	Now it will be easy to add undo for all the other properties.
	* src/planner-task-tree.c: coding style corrections.

2004-01-25  Alvaro del Castillo  <acs barrapunto com>

	* src/planner-resource-view.c: Added undo for resource insertion.

2004-01-23  Xavier Ordoquy   <xordoquy wanadoo fr>

	* data/images/resources_usage.png:
	* data/images/Makefile.am:
	Created resource usage (timetable) icon

	* src/planner-ttable-view.c:
	Included the new icon and changed timetable name to resource usage.

2004-01-22  Xavier Ordoquy   <xordoquy wanadoo fr>

	* src/planner-ttable-model.c: resources are removed from the ttable.

2004-01-22  Xavier Ordoquy   <xordoquy wanadoo fr>

	* src/planner-ttable-row.c: fixed segfault when leaving planner.

2004-01-15  Alvaro del Castillo  <acs barrapunto com>

	* Big changes for the migration to libgda in the SQL backend 
	* configure.in: Added libgda test. In the next revision
	we have to clean the libpq test cause we won't use it.
	* docs/sql/README: we need a UNICODE database in Postgres
	* libplanner/mrp-sql.[ch]: migration from libpq to libgda
	* libplanner/Makefile.am: use libgda libraries 
	* libplanner/mrp-storage-sql.c: propagate GError also in project loading
	* src/Makefile.am: migration from libpq to libgda
	* src/planner-sql-plugin.c: migration from libpq to libgda

2004-01-14  Richard Hult  <richard imendio com>

	* Makefile.am: Build dotnet bindings conditionally.

	* configure.in: Simplify and bring back the mono checks.

2004-01-14  Anders Carlsson  <andersca gnome org>

	* dotnet/libplanner/libplanner.metadata: Add some return list types.

2004-01-06  Richard Hult  <richard imendio com>

	* configure.in: Require intltool 0.29, comment out dotnet for now.
	
	* Makefile.am: Remove the old intltool hack. 
	
2004-01-03  Anders Carlsson  <andersca gnome org>

	* configure.in:
	* dotnet/Makefile.am:
	* dotnet/libplanner/Makefile.am:
	* dotnet/libplanner/libplanner.metadata:
	* dotnet/samples/Example01.cs:
	* dotnet/samples/Example10.cs:
	* dotnet/samples/Makefile.am:
	* dotnet/sources/Makefile:
	* dotnet/sources/planner-sources.xml:
	Add .NET bindings for libplanner.
	
2003-12-16  Richard Hult  <richard imendio com>

	* src/planner-print-dialog.c:
	* src/planner-gantt-view.c:
	* src/planner-resource-view.c:
	* src/planner-task-view.c:
	* src/planner-view-loader.c:
	* src/planner-view.c:
	* src/planner-view.h: Add a name per view so we can build gconf
	keys for view preferences and use those to remember which views
	should be printed.

	* src/planner-sql-plugin.c: Fix indentation.

2003-12-16  Richard Hult  <richard imendio com>

	* src/planner-sql-plugin.c (sql_plugin_retrieve_db_values): Don't
	access the label that was removed.

2003-12-16  Christian Neumair  <chris gnome-de org>

	* data/glade/add-predecessor.glade:
	* data/glade/calendar-dialog.glade:
	* data/glade/group-dialog.glade:
	* data/glade/html-output.glade:
	* data/glade/new-property.glade:
	* data/glade/project-properties.glade:
	* data/glade/property-dialog.glade:
	* data/glade/resource-dialog.glade:
	* data/glade/resource-input-dialog.glade:
	* data/glade/sql.glade:
	* data/glade/task-dialog.glade:
	* data/glade/task-input-dialog.glade: Some HIGification/usability work.

2003-12-16  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c:
	(task_tree_add_column): Set userdata. Fixes printing.

2003-12-16  Richard Hult  <richard imendio com>

	* src/planner-window.c: 
	* src/planner-project-properties.c:
	* src/planner-task-tree.c:
	* src/planner-cmd-manager.c: More undo work.
	
	* data/ui/task-view.ui:
	* src/planner-task-view.c:
	* src/planner-gantt-view.c: Add critical task highlighting for the
	task view.

2003-12-15  Richard Hult  <richard imendio com>

	* src/planner-cmd-manager.c (planner_cmd_manager_insert_and_do):
	Trim the history if it's too long.

	* src/planner-html-plugin.c (html_plugin_ok_button_clicked): Fix
	bug #129375.

	* src/planner-cmd-manager.c: More work.

	* src/planner-task-tree.c: (task_cmd_insert_do),
	(task_cmd_insert),
	(planner_task_tree_insert_task): 
	(planner_task_tree_insert_subtask): Start editing for newly
	inserted tasks.
	
	* src/planner-window.c: (window_finalize): Unref the cmd manager.

2003-12-14  Richard Hult  <richard imendio com>

	* configure.in:
	* docs/libplanner/Makefile.am: Clean up flags even more, and fix
	bug #129321.

2003-12-14  Richard Hult  <richard imendio com>

	* libplanner/mrp-object.[ch]
	* libplanner/mrp-private.h:
	* libplanner/mrp-project.c: Work in progress.

2003-12-14  Cédric Delfosse <cdelfosse free fr>

	* src/planner-print-dialog.c:
	(load_planner_print_config_from_file),
	(save_planner_print_config_to_file):
	* src/planner-window.c: (window_print_cb): Remember print
	settings.

2003-12-13  Richard Hult  <richard imendio com>

	* .cvsignore:
	* data/glade/.cvsignore:
	* docs/libplanner/libplanner-sections.txt:
	* docs/libplanner/tmpl/libplanner-unused.sgml:
	* docs/libplanner/tmpl/mrp-error.sgml: Clean up.
	
	* src/planner-project-properties.c: (property_cmd_edit),
	(mpp_connect_to_project), (mpp_phase_option_menu_changed_cb),
	(mpp_phase_set_from_widget), (mpp_project_phase_notify_cb),
	(mpp_setup_phases), (mpp_property_added), (mpp_dialog_destroy_cb):
	More undo hacking.

2003-12-12  Xavier Ordoquy <xordoquy wanadoo fr>

	* src/planner-ttable-model.h: typo

	* src/planner-ttable-tree.c:
	* src/planner-ttable-tree.h:
	* src/planner-ttable-view.c:
	PlannerMainWindow has been renamed PlannerWindow.

2003-12-12  Xavier Ordoquy <xordoquy wanadoo fr>

	* data/ui/Makefile.am:
	* src/Makefile.am:
	Added the files needed by time table when configured with.

	* src/planner-ttable-chart.c:
	* src/planner-ttable-chart.h:
	* src/planner-ttable-model.c:
	* src/planner-ttable-model.h:
	* src/planner-ttable-print.c:
	* src/planner-ttable-print.h:
	* src/planner-ttable-row.c:
	* src/planner-ttable-row.h:
	* src/planner-ttable-tree.c:
	* src/planner-ttable-tree.h:
	* src/planner-ttable-view.c:
	Added copyrights, remove C++ comments and debugging output
	try to start cleaning up the code.

2003-12-12  Richard Hult  <richard imendio com>

	* data/glade/project-properties.glade:
	* src/planner-project-properties.c: Undo for most of the stuff,
	and get rid of the sucky gnome-date-edit widget. Don't perform
	changes on "changed", do it on focus out instead.

	* libplanner/mrp-property.c: Fix comment.

	* data/glade/project-properties.glade:
	* src/planner-project-properties.c: Close the calendar selector
	window. Tweak a bit, fix a few UI inconsistencies, remove dialog
	separators.

2003-12-11  Richard Hult  <richard imendio com>

	* src/planner-task-tree.c (task_tree_duration_edited) 
	(task_tree_work_edited): Undo support.

	* data/glade/calendar-dialog.glade: Remove unnecessary string.
	
	* libplanner/mrp-project.c: (project_do_save),
	(project_load_from_sql): Update strings.
	
	* src/planner-marshal.list:
	* src/planner-cmd-manager.c: 
	* src/planner-window.c: (window_undo_state_changed_cb),
	(window_redo_state_changed_cb): Set the labels for undo/redo to
	a string including the name of the command.

	* src/planner-task-tree.c: (task_cmd_insert),
	(task_cmd_edit_property), (planner_task_tree_insert_subtask),
	(planner_task_tree_insert_task): Implement undo for insert
	subtask.

2003-12-11  Richard Hult  <richard imendio com>

	* Makefile.am: Fix distcheck.
	* libplanner/mrp-xsl.c: (html_write): Tweak.
	* src/planner-html-plugin.c:
	(html_output_plugin_ok_button_clicked): Close the dialog when
	we're done.

2003-12-11  Richard Hult  <richard imendio com>

	* configure.in: Add gnome-vfs.
	* data/glade/html-output.glade:
	* data/ui/main-window.ui:
	* src/planner-html-plugin.c:

	* libplanner/mrp-error.h:
	* libplanner/mrp-xsl.c: Start to implement the "save to location
	feature". Based on patch from Bernardo Silveira.
	
	* src/planner-cmd-manager.[ch]:
	* src/planner-window.c:
	* src/planner-task-tree.c: Start implementing undo/redo.

	* src/: s/mg/planner/

2003-12-09  Richard Hult  <richard imendio com>

	* src/planner-application.c (application_init): Lower the limit on
	the number of recent files to keep the menu down a bit.

	* data/ui/main-window.ui: Use correct stock name for print
	preview.

	* Makefile.am: Update for new intltool.

	* src/planner-main-window.c: (get_last_dir), (main_window_open_cb),
	(main_window_do_save_as): Patch from Bernardo Silveira to remember
	the last used dir.

2003-12-08  Xavier Ordoquy <xordoquy wanadoo fr>

	* libplanner/Makefile.am: removed a tab.

2003-12-08  Richard Hult  <richard imendio com>

	* Makefile.am:
	* sql/Makefile.am:
	* configure.in: Add sql dir with the sql stuff.

2003-12-08  Richard Hult  <richard imendio com>

	* configure.in: Add gconf.

	* data/ui/main-window.ui: Fix a string.

	* libplanner/Makefile.am: Remove obsolete comment.
	
	* src/Makefile.am: Link postgres plugin with the pg libs.
	
	* src/planner-application.c:
	(planner_application_get_gconf_client):
	* src/planner-application.h: Add.

	* src/planner-sql-plugin.c: (sql_plugin_retrieve_db_values):
	Store/get values in gconf. Loosely based on patch from Bernardo
	Silveira.

2003-12-08  Richard Hult  <richard imendio com>

	* configure.in: Remove --with-html-dir, since gtk-doc.makefile
	handles that. Gets rid of duplicate --with-html-dir options.
	Add commented python checks, need to add this back.	

2003-12-04  Christian Neumair  <chris gnome-de org>

	* Makefile.am, po-libplanner/*:
	Kill po-libplanner. All translations now live in po.

	* configure.in:
	Ditto. Plus add Estonian (et), Mongolian (mn) and Kannada (kn) to
	ALL_LINGUAS.

2003-12-02  Frederic Crozat  <fcrozat mandrakesoft com>

	* Makefile.am:
	Don't remove intltool-* on make clean, they are 
	generated at configure time.

	* src/Makefile.am:
	Fix parallel build.

2003-12-02  Frederic Crozat  <fcrozat mandrakesoft com>

	* autogen.sh:
	Add support for GNOME2_DIR variable.

	* libplanner-1.pc.in:
	Use correct name for linking.

	* libplanner/Makefile.am:
	Fix library version.

2003-12-02  Frederic Crozat  <fcrozat mandrakesoft com>

	* libplanner/Makefile.am:
	* src/Makefile.am:
	Fix Postgresql compilation (add missing cflags).

2003-12-01  Richard Hult  <richard imendio com>

	* Release 0.11.

	* src/planner-task-tree.c (task_tree_parse_time_string): Fix
	invalid read and...
	(task_tree_get_unit_from_string): ...move i18n initialization
	here.

	* configure.in: Sync translations.

2003-12-01  Ryszard Klos <ryszardklos netscape net>

	* data/stylesheets: Fix the width of the exported html.

2003-11-30  Richard Hult  <richard imendio com>

	* data/ui/main-window.ui: Set delimit to none, to avoid an ugly
	separator at the top.

	* src/planner-resource-view.c (resource_view_insert_resource_cb):
	Focus the newly inserted resource, just like for the task/gantt
	views.

	* libplanner/mrp-task.c (task_remove_assignments): Copy the list
	before removing from it, and null out the assignment list it's
	removed.

2003-11-14  Frederic Crozat  <fcrozat mandrakesoft com>

	* planner/mrp-time.c: (imrp_time_init): Make sure we use UTF-8
	strings, not locale encoded one for month and day names.

Index: libplanner/mrp-assignment.c
===================================================================
--- libplanner/mrp-assignment.c	(revision 940)
+++ libplanner/mrp-assignment.c	(working copy)
@@ -3,6 +3,7 @@
  * Copyright (C) 2001-2003 CodeFactory AB
  * Copyright (C) 2001-2003 Richard Hult <richard imendio com>
  * Copyright (C) 2001-2002 Mikael Hallendal <micke imendio com>
+ * Copyright (C) 2008      Lee Baylis <lee leebaylis co uk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -43,19 +44,20 @@
         PROP_UNITS
 };
 
+static void    assignment_class_init   (MrpAssignmentClass         *klass);
+static void    assignment_init         (MrpAssignment              *assignment);
+static void    assignment_finalize     (GObject                    *object);
+static void    assignment_set_property (GObject                    *object,
+					guint                       prop_id,
+					const GValue               *value,
+					GParamSpec                 *pspec);
+static void    assignment_get_property (GObject                    *object,
+					guint                       prop_id,
+					GValue                     *value,
+					GParamSpec                 *pspec);
+static gint    assignment_edge_compare (gconstpointer               edge1,
+					gconstpointer               edge2); 
 
-static void assignment_class_init        (MrpAssignmentClass *klass);
-static void assignment_init              (MrpAssignment      *assignment);
-static void assignment_finalize          (GObject            *object);
-static void assignment_set_property      (GObject            *object,
-					  guint               prop_id,
-					  const GValue       *value,
-					  GParamSpec         *pspec);
-static void assignment_get_property      (GObject            *object,
-					  guint               prop_id,
-					  GValue             *value,
-					  GParamSpec         *pspec);
-
 static MrpObjectClass *parent_class;
 
 GType
@@ -226,6 +228,33 @@
 	}
 }
 
+static gint
+assignment_edge_compare (gconstpointer edge1,
+			 gconstpointer edge2)
+{
+        const MrpAssignmentEdge *a, *b;
+
+	a = edge1;
+        b = edge2;
+
+	if (a->time < b->time) {
+                return -1;
+        }
+	else if (a->time == b->time) {
+		/* if times are equal, overallocation calculations require that end_edges are sorted before start_edges */
+                if (a->type < b->type) {
+                        return 1;
+                }
+		else if (a->type == b->type) {
+                        return 0;
+                } else {
+                        return -1;
+                }
+        } else {
+                return 1;
+        }
+}
+
 /**
  * mrp_assignment_new:
  *
@@ -267,8 +296,8 @@
  * 
  * Retrieves the #MrpResource associated with @assignment.
  * 
- * Return value: the resource associated with the assignment object. The reference
- * count of the resource is not increased.
+ * Return value: the resource associated with the assignment object. 
+ * The reference count of the resource is not increased.
  **/
 MrpResource *
 mrp_assignment_get_resource (MrpAssignment *assignment)
@@ -294,3 +323,212 @@
 	
 	return assignment->priv->units;
 }
+
+/**
+ * mrp_assignment_edges_insert_sorted_from_assignment:
+ * @edges: a #GList optionally containing #MrpAssignmentEdge objects
+ * @assignment: an #MrpAssignment
+ *
+ * Determines the start and end edges (essentially times + assignment units) 
+ * from an assignment's associated task, and inserts them into the list of 
+ * edges sorted by mrptime. Mostly useful for tracking a MrpResource's 
+ * total assignment units whilst scanning across a project.
+ *
+ * Return Value: pointer to the updated edges GList.
+ **/
+GList *
+mrp_assignment_edges_insert_sorted_from_assignment (GList *edges,
+						    MrpAssignment *assignment)
+{
+	MrpTask           *task;
+	gint              units;
+	MrpAssignmentEdge *start_edge, *end_edge;
+
+	g_return_val_if_fail (MRP_IS_ASSIGNMENT (assignment), edges);
+
+	task = mrp_assignment_get_task (assignment);
+	units = mrp_assignment_get_units (assignment);
+
+	start_edge = g_new0 (MrpAssignmentEdge, 1);
+	start_edge->type = START_EDGE;
+	start_edge->time = mrp_task_get_work_start(task);
+	start_edge->units = units;
+	start_edge->assignment = assignment;
+	start_edge->task = task;
+	
+	edges = g_list_insert_sorted (edges, start_edge, assignment_edge_compare);
+	
+	end_edge = g_new0 (MrpAssignmentEdge, 1);
+	end_edge->type = END_EDGE;
+	end_edge->time = mrp_task_get_finish(task);
+	end_edge->units = units;
+	end_edge->assignment = assignment;
+	end_edge->task = task;
+	
+	edges = g_list_insert_sorted (edges, end_edge, assignment_edge_compare);
+        
+	return edges;
+}
+
+/**
+ * mrp_assignment_edges_insert_sorted_from_assignment_list:
+ * @edges: a #GList containing #MrpAssignmentEdge objects
+ * @assignments: a #GList contianing #MrpAssignment objects
+ *
+ * Determines the sorted start and end edges for all passed assignments. 
+ * Mostly useful for scanning a #MrpResource object's total assignment 
+ * units across a project.
+ *
+ * Return Value: pointer to the updated edges #GList.
+ **/
+GList *
+mrp_assignment_edges_insert_sorted_from_assignment_list (GList *edges,
+							 GList *assignments)
+{
+	GList         *a;
+	MrpAssignment *assignment;
+
+	for (a = assignments; a; a = a->next) {
+                assignment = a->data;
+		edges = mrp_assignment_edges_insert_sorted_from_assignment(edges, assignment);
+	}
+	return edges;
+}
+
+/**
+ * mrp_assignment_edges_plot_units_in_use:
+ * @edges: a #GList containing #MrpAssignmentEdge objects
+ *
+ * Iterates the #GList of #MrpAssignmentEdge objects calculating a 
+ * running total for each #MrpAssignmentEdge by adding units for 
+ * start edges and subtracting them for end edges. Mostly useful for 
+ * calculating a #MrpResource object's allocation within a period.
+ *
+ * Return Value: pointer to the updated edges #GList.
+ **/
+GList *
+mrp_assignment_edges_plot_units_in_use (GList *edges)
+{
+	GList *e;
+	MrpAssignmentEdge *edge;
+	gint units = 0;
+
+        for (e = edges; e; e = e->next) {
+		edge = e->data;
+		units += mrp_assignment_edge_get_delta_units(edge);
+		edge->units_in_use = units;
+	}
+	return edges;
+}
+
+/**
+ * mrp_assignment_edges_calculate_max_units_in_use:
+ * @edges: a #GList containing #MrpAssignmentEdge objects
+ *
+ * Iterates the #GList of #MrpAssignmentEdge objects consulting the 
+ * running total for each #MrpAssignmentEdge and storing the maximum.
+ *
+ * Return Value: #gint containing the maximum units in use.
+ **/
+gint 
+mrp_assignment_edges_calculate_max_units_in_use (GList *edges)
+{
+	GList             *e;
+	MrpAssignmentEdge *edge;
+	gint               units = 0;
+
+	for (e = edges; e; e = e->next){
+		edge = e->data;
+		if (edge->units_in_use > units) {
+			units = edge->units_in_use;
+		}
+	}
+	return units;
+}
+
+/**
+ * mrp_assignment_edges_remove_to_last_before:
+ * @edges: a #GList containing #MrpAssignmentEdge objects
+ * @time: a #mrptime
+ *
+ * Removes all but the last #MrpAssignmentEdge object before @time from @edges.
+ * Mostly useful for isolating time periods for later calculation.
+ *
+ * Return Value: pointer to the updated edges #GList.
+ **/
+GList * 
+mrp_assignment_edges_remove_to_last_before(GList *edges,
+					   mrptime time)
+{
+	GList             *e;
+	MrpAssignmentEdge *edge;
+	
+	if (edges){
+		e = edges->next;
+		if (e){
+			edge = e->data;
+			while (edge->time <= time){
+				edges = g_list_delete_link(edges, edges);
+				e = edges->next;
+				if (!e) {break;}
+				edge = e->data;
+			}
+		}
+	}
+	return edges;
+}
+
+/**
+ * mrp_assignment_edges_remove_from_first_after:
+ * @edges: a #GList containing #MrpAssignmentEdge objects
+ * @time: a #mrptime
+ *
+ * Removes all but the last #MrpAssignmentEdge object after @time from @edges.
+ * Mostly useful for isolating time periods for later calculation.
+ *
+ * Return Value: pointer to the updated edges #GList.
+ **/
+GList * 
+mrp_assignment_edges_remove_from_first_after(GList *edges,
+					     mrptime time)
+{
+	GList             *e, *last;
+	MrpAssignmentEdge *edge;
+
+	if (edges){
+		last = g_list_last(edges);
+		e = last->prev;
+		if (e){
+			edge = e->data;
+			while (time <= edge->time){
+				edges = g_list_delete_link(edges, last);
+				last = g_list_last(edges);
+				e = last->prev;
+				if (!e) {break;}
+				edge = e->data;
+			}
+		}
+	}
+
+	return edges;
+}
+
+/**
+ * mrp_assignment_edge_get_delta_units:
+ * @edge: a #MrpAssignmentEdge
+ *
+ * Edge-sensing function: returns the change in units associated with 
+ * an assignment, either signed positive for a start edge, or negative 
+ * for an end edge. 
+ * 
+ * Return Value: gint representing the change in assignment units at the edge.
+ **/
+gint
+mrp_assignment_edge_get_delta_units (MrpAssignmentEdge *edge)
+{		    
+	if (edge->type == START_EDGE) {
+		return edge->units;
+	} else {
+		return 0 - edge->units;
+	}
+}
Index: libplanner/mrp-assignment.h
===================================================================
--- libplanner/mrp-assignment.h	(revision 940)
+++ libplanner/mrp-assignment.h	(working copy)
@@ -3,6 +3,7 @@
  * Copyright (C) 2001-2002 CodeFactory AB
  * Copyright (C) 2001-2002 Richard Hult <richard imendio com>
  * Copyright (C) 2001-2002 Mikael Hallendal <micke imendio com>
+ * Copyright (C) 2008      Lee Baylis <lee leebaylis co uk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -36,6 +37,8 @@
 
 typedef struct _MrpAssignmentClass MrpAssignmentClass;
 typedef struct _MrpAssignmentPriv  MrpAssignmentPriv;
+typedef enum _MrpAssignmentEdgeType MrpAssignmentEdgeType;
+typedef struct _MrpAssignmentEdge MrpAssignmentEdge;
 
 struct _MrpAssignment {
         MrpObject          parent;
@@ -47,12 +50,36 @@
         MrpObjectClass parent_class;
 };
 
-GType              mrp_assignment_get_type     (void) G_GNUC_CONST;
+enum _MrpAssignmentEdgeType{
+        START_EDGE,
+        END_EDGE
+};
 
-MrpAssignment     *mrp_assignment_new          (void);
+struct _MrpAssignmentEdge {
+        MrpAssignmentEdgeType type;
+        mrptime time;
+        gint units;
+	gint units_in_use;
+        MrpAssignment *assignment;
+        MrpTask *task;
+};
 
-MrpTask           *mrp_assignment_get_task     (MrpAssignment *assignment);
-MrpResource       *mrp_assignment_get_resource (MrpAssignment *assignment);
-gint               mrp_assignment_get_units    (MrpAssignment *assignment);
+GType              mrp_assignment_get_type                                 (void) G_GNUC_CONST;
 
+MrpAssignment     *mrp_assignment_new                                      (void);
+
+MrpTask           *mrp_assignment_get_task                                 (MrpAssignment *assignment);
+MrpResource       *mrp_assignment_get_resource                             (MrpAssignment *assignment);
+gint               mrp_assignment_get_units                                (MrpAssignment *assignment);
+GList *            mrp_assignment_edges_insert_sorted_from_assignment      (GList *edges,
+									    MrpAssignment *assignment);
+GList *            mrp_assignment_edges_insert_sorted_from_assignment_list (GList *edges,
+							                    GList *assignments);
+GList *            mrp_assignment_edges_plot_units_in_use                  (GList *edges);
+gint               mrp_assignment_edges_calculate_max_units_in_use         (GList *edges);
+GList *            mrp_assignment_edges_remove_to_last_before              (GList *edges,
+									    mrptime time);
+GList *            mrp_assignment_edges_remove_from_first_after            (GList *edges,
+									    mrptime time);
+gint               mrp_assignment_edge_get_delta_units                     (MrpAssignmentEdge *edge);
 #endif /* __MRP_ASSIGNMENT_H__ */
Index: libplanner/mrp-resource.c
===================================================================
--- libplanner/mrp-resource.c	(revision 940)
+++ libplanner/mrp-resource.c	(working copy)
@@ -5,6 +5,7 @@
  * Copyright (C) 2002-2003 Richard Hult <richard imendio com>
  * Copyright (C) 2002 Mikael Hallendal <micke imendio com>
  * Copyright (C) 2004 Alvaro del Castillo <acs barrapunto com>
+ * Copyright (C) 2008 Lee Baylis <lee leebaylis co uk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -32,6 +33,9 @@
 #include "mrp-task.h"
 #include "mrp-resource.h"
 
+/* Constant for usage calculations 
+FIXME: need to alter the UI so that users can set the priv->units value per resource, then can remove this constant */
+#define USAGE_MAX_UNITS 100
 
 struct _MrpResourcePriv {
 	gchar           *name;
@@ -69,25 +73,27 @@
 };
 
 
-static void resource_class_init            (MrpResourceClass *klass);
-static void resource_init                  (MrpResource      *resource);
-static void resource_finalize              (GObject          *object);
-static void resource_set_property          (GObject          *object,
-					    guint             prop_id,
-					    const GValue     *value,
-					    GParamSpec       *pspec);
-static void resource_get_property          (GObject          *object,
-					    guint             prop_id,
-					    GValue           *value,
-					    GParamSpec       *pspec);
-static void resource_calendar_changed      (MrpCalendar      *calendar,
-					    MrpResource      *resource);
-static void resource_removed               (MrpObject        *object);
-static void resource_invalidate_task_costs (MrpResource      *resource);
-static void resource_assignment_removed_cb (MrpAssignment    *assignment,
-					    MrpResource      *resource);
-static void resource_group_removed_cb      (MrpGroup         *group,
-					    MrpResource      *resource);
+static void   resource_class_init                  (MrpResourceClass *klass);
+static void   resource_init                        (MrpResource      *resource);
+static void   resource_finalize                    (GObject          *object);
+static void   resource_set_property                (GObject          *object,
+						    guint             prop_id,
+						    const GValue     *value,
+						    GParamSpec       *pspec);
+static void   resource_get_property                (GObject          *object,
+						    guint             prop_id,
+						    GValue           *value,
+						    GParamSpec       *pspec);
+static void   resource_calendar_changed            (MrpCalendar      *calendar,
+						    MrpResource      *resource);
+static void   resource_removed                     (MrpObject        *object);
+static void   resource_invalidate_task_costs       (MrpResource      *resource);
+static void   resource_assignment_removed_cb       (MrpAssignment    *assignment,
+						    MrpResource      *resource);
+static void   resource_group_removed_cb            (MrpGroup         *group,
+						    MrpResource      *resource);
+static GList *resource_get_edges_with_units_in_use (MrpResource      *resource, 
+						    GList            *edges);
 
 
 static MrpObjectClass *parent_class;
@@ -826,3 +832,206 @@
 
 	g_object_set (resource, "calendar", calendar, NULL);
 }
+
+/* There are two ways to look for overallocation:
+
+   - the first is to chart a running total of a resource's allocation 
+     across the whole project, and scan through it looking for total values 
+     of allocation at either a time or some condition. 
+
+     This is the technique previously adopted in planner-usage-row, 
+     now moved here and embellished upon.
+
+   - The second is to scan a resource's allocations for those which are 
+     active at a given time, and add up the usage. Whilst this is likely a 
+     more efficient method for larger projects, we are rarely interested in 
+     an individual time, more usually a period between two times, and so it 
+     is not clear right now whether implementing this second will be of any use.
+*/ 
+
+/**
+ * mrp_resource_get_assignment_edges:
+ * @resource: a #MrpResource
+ * @edges: a #GList optionally containing #MrpAssignmentEdge objects
+ *
+ * Adds all the assignment edges for the resource to the edges glist, 
+ * sorted by mrptime. Usually you want this list to be empty before 
+ * calling this function. Free the edges list when done. Mostly useful 
+ * for calculating total resource allocation over the project.
+ *
+ * Return Value: the updated edges GList
+ **/ 
+GList *
+mrp_resource_get_assignment_edges (MrpResource *resource,
+				   GList *edges)
+{
+	GList                     *assignments;
+	g_return_val_if_fail (MRP_IS_RESOURCE (resource), edges);
+
+	assignments = mrp_resource_get_assignments (resource);
+	edges = mrp_assignment_edges_insert_sorted_from_assignment_list(edges, assignments);
+
+	return edges;
+}
+
+/**
+ * mrp_resource_allocation_status:
+ * @resource: a #MrpResource
+ * @units: a #gint
+ *
+ * Lookup table for allocation status based on the number of units of a 
+ * resource which are allocated
+ *
+ * Return Value: an entry from the MrpResourceAllocation enum
+ **/
+MrpResourceAllocation
+mrp_resource_allocation_status (MrpResource *resource, gint units)
+{
+	g_return_val_if_fail (MRP_IS_RESOURCE (resource), MRP_RESOURCE_OVERALLOCATED);
+/* FIXME: replace USAGE_MAX_UNITS on a per-resource basis rather than a defined constant */
+	if (units == 0) {
+		return MRP_RESOURCE_FREE;
+	}
+	else if (units < USAGE_MAX_UNITS) {
+		return MRP_RESOURCE_UNDERALLOCATED;
+	}
+	else if (units == USAGE_MAX_UNITS) {
+		return MRP_RESOURCE_ALLOCATED;
+	} else {
+		return MRP_RESOURCE_OVERALLOCATED;
+	}
+}
+
+/**
+ * mrp_resource_test_if_overallocated:
+ * @resource: a #MrpResource
+ *
+ * Scans the project duration for the resource and determines if it is
+ * ever overallocated.
+ * 
+ * Return Value: gboolean inidcating whether resource is ever overallocated
+ **/
+gboolean 
+mrp_resource_test_if_overallocated (MrpResource *resource)
+{
+	gint units;
+
+	g_return_val_if_fail (MRP_IS_RESOURCE (resource), TRUE);
+
+	units = mrp_resource_get_max_units_used_between(resource, NULL, NULL);
+
+	if (mrp_resource_allocation_status(resource, units) == MRP_RESOURCE_OVERALLOCATED){
+		return TRUE;
+	}
+	return FALSE;
+}
+
+/**
+ * resource_get_edges_with_units_in_use:
+ * @resource: a #MrpResource
+ *
+ * Return Value: a GList of MrpAssignmentEdge objects with the running total
+ * of units in use calculated.
+ *
+ **/
+GList *
+resource_get_edges_with_units_in_use (MrpResource *resource, 
+				      GList *edges)
+{
+	g_return_val_if_fail (MRP_IS_RESOURCE (resource), edges);
+
+	edges = mrp_resource_get_assignment_edges(resource, edges);
+	edges = mrp_assignment_edges_plot_units_in_use(edges);
+
+	return edges;
+}
+
+
+/**
+ * mrp_resource_get_max_units_used_between:
+ * @resource: a #MrpResource
+ * @start: a #mrptime marking the start of a period, or project start if #NULL
+ * @end: a #mrptime marking the end of a period, or project end if #NULL
+ *
+ * Plots cumulative allocation for the resource across the project, 
+ * then scans between the start and end times given, and calculates 
+ * the maximum allocation in this period. 
+ * 
+ * Return Value: gint indicating the maximum units which have been allocated 
+ * to the resource in this period.
+ **/
+
+gint
+mrp_resource_get_max_units_used_between (MrpResource *resource, 
+					 mrptime start,
+					 mrptime end)
+{
+	GList *edges = NULL;
+	gint  units;
+
+	/* FIXME: replace USAGE_MAX_UNITS on a per-resource basis rather than a defined constant */
+	g_return_val_if_fail (MRP_IS_RESOURCE (resource), USAGE_MAX_UNITS + 1);
+
+	edges = resource_get_edges_with_units_in_use(resource, edges);
+
+	if (start){
+		edges = mrp_assignment_edges_remove_to_last_before(edges, start);
+	}
+	if (end){
+		edges = mrp_assignment_edges_remove_from_first_after(edges, end);
+	}
+
+	units = mrp_assignment_edges_calculate_max_units_in_use(edges);
+
+	g_list_free(edges);
+
+	return units;
+}
+  
+/**
+ * mrp_resource_get_available_units_between:
+ * @resource: a #MrpResource
+ * @start: a #mrptime 
+ * @end: a #mrptime
+ *
+ * Return Value: gint indicating the maximum units which are available 
+ * for the resource in this period without causing overallocation.
+ **/
+gint
+mrp_resource_get_available_units_between (MrpResource *resource,
+					  mrptime start,
+					  mrptime end)
+{
+/* FIXME: replace USAGE_MAX_UNITS on a per-resource basis rather than a defined constant */
+	g_return_val_if_fail (MRP_IS_RESOURCE (resource), -1);
+	/*	gint available;
+
+		available =*/
+	return USAGE_MAX_UNITS - mrp_resource_get_max_units_used_between(resource, start, end);
+
+	/*	if (available < 0){
+		available = 0;
+	}
+	return available;*/
+}
+
+/**
+ * mrp_resource_get_available_units_during:
+ * @resource: a #MrpResource
+ * @task: a #MrpTask 
+ *
+ * Return Value: gint indicating the maximum units which are available 
+ * for the resource between the times the task is running, without 
+ * causing overallocation.
+ **/
+gint
+mrp_resource_get_available_units_during (MrpResource *resource,
+					 MrpTask *task)
+{
+	g_return_val_if_fail (MRP_IS_RESOURCE (resource), -1);
+	g_return_val_if_fail (MRP_IS_TASK (task), -1);
+
+	return mrp_resource_get_available_units_between(resource, 
+							mrp_task_get_work_start(task), 
+							mrp_task_get_finish(task)); 
+}
Index: src/planner-usage-row.c
===================================================================
--- src/planner-usage-row.c	(revision 940)
+++ src/planner-usage-row.c	(working copy)
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <libplanner/mrp-project.h>
 #include <libplanner/mrp-resource.h>
+#include <libplanner/mrp-assignment.h>
 #include <libplanner/mrp-task.h>
 #include <glib/gi18n.h>
 #include <libgnomecanvas/gnome-canvas.h>
@@ -175,23 +176,15 @@
 static GdkBitmap            *break_stipple = NULL;
 static gchar                 break_stipple_pattern[] = { 0x03 };
 
-static GdkColor              color_normal;
-static GdkColor              color_normal_light;
-static GdkColor              color_normal_dark;
+struct _PlannerUsageRowColorScheme {
+	GdkColor plain;
+	GdkColor light;
+	GdkColor dark;
+};
+typedef struct _PlannerUsageRowColorScheme PlannerUsageRowColorScheme;
 
-static GdkColor              color_free;
-static GdkColor              color_free_light;
-static GdkColor              color_free_dark;
+static PlannerUsageRowColorScheme color_schemes[MRP_RESOURCE_LAST_ALLOCATION];
 
-static GdkColor              color_underuse;
-static GdkColor              color_underuse_light;
-static GdkColor              color_underuse_dark;
-
-static GdkColor              color_overuse;
-static GdkColor              color_overuse_light;
-static GdkColor              color_overuse_dark;
-
-
 GType
 planner_usage_row_get_type (void)
 {
@@ -750,22 +743,21 @@
 
                 g_object_add_weak_pointer (G_OBJECT (complete_stipple),
                                            (gpointer) & complete_stipple);
-
-		gnome_canvas_get_color (item->canvas, "LightSkyBlue3", &color_normal);
-		gnome_canvas_get_color (item->canvas, "#9ac7e0", &color_normal_light);
-		gnome_canvas_get_color (item->canvas, "#7da1b5", &color_normal_dark);
+		gnome_canvas_get_color (item->canvas, "LightSkyBlue3", &color_schemes[MRP_RESOURCE_ALLOCATED].plain);
+		gnome_canvas_get_color (item->canvas, "#9ac7e0", &color_schemes[MRP_RESOURCE_ALLOCATED].light);
+		gnome_canvas_get_color (item->canvas, "#7da1b5", &color_schemes[MRP_RESOURCE_ALLOCATED].dark);
 		
-		gnome_canvas_get_color (item->canvas, "indian red", &color_overuse);
-		gnome_canvas_get_color (item->canvas, "#de6464", &color_overuse_light);
-		gnome_canvas_get_color (item->canvas, "#ba5454", &color_overuse_dark);
+		gnome_canvas_get_color (item->canvas, "indian red", &color_schemes[MRP_RESOURCE_OVERALLOCATED].plain);
+		gnome_canvas_get_color (item->canvas, "#de6464", &color_schemes[MRP_RESOURCE_OVERALLOCATED].light);
+		gnome_canvas_get_color (item->canvas, "#ba5454", &color_schemes[MRP_RESOURCE_OVERALLOCATED].dark);
 		
-		gnome_canvas_get_color (item->canvas, "grey", &color_underuse);
-		gnome_canvas_get_color (item->canvas, "#d6d6d6", &color_underuse_light);
-		gnome_canvas_get_color (item->canvas, "#a8a8a8", &color_underuse_dark);
+		gnome_canvas_get_color (item->canvas, "grey", &color_schemes[MRP_RESOURCE_UNDERALLOCATED].plain);
+		gnome_canvas_get_color (item->canvas, "#d6d6d6", &color_schemes[MRP_RESOURCE_UNDERALLOCATED].light);
+		gnome_canvas_get_color (item->canvas, "#a8a8a8", &color_schemes[MRP_RESOURCE_UNDERALLOCATED].dark);
 		
-		gnome_canvas_get_color (item->canvas, "medium sea green", &color_free);
-		gnome_canvas_get_color (item->canvas, "#43c77e", &color_free_light);
-		gnome_canvas_get_color (item->canvas, "#359e64", &color_free_dark);
+		gnome_canvas_get_color (item->canvas, "medium sea green", &color_schemes[MRP_RESOURCE_FREE].plain);
+		gnome_canvas_get_color (item->canvas, "#43c77e", &color_schemes[MRP_RESOURCE_FREE].light);
+		gnome_canvas_get_color (item->canvas, "#359e64", &color_schemes[MRP_RESOURCE_FREE].dark);
 	} else {
                 g_object_ref (complete_stipple);
         }
@@ -829,45 +821,6 @@
 }
 
 typedef enum {
-        START_ASSIGN,
-        END_ASSIGN
-} date_type;
-
-typedef struct {
-        date_type type;
-        mrptime time;
-        gint units;
-        MrpAssignment *assignment;
-        MrpTask *task;
-} Date;
-
-static gint
-usage_row_date_compare (gconstpointer date1,
-			 gconstpointer date2)
-{
-        const Date *a, *b;
-
-	a = date1;
-        b = date2;
-
-	if (a->time < b->time) {
-                return -1;
-        }
-	else if (a->time == b->time) {
-                if (a->type < b->type) {
-                        return -1;
-                }
-		else if (a->type == b->type) {
-                        return 0;
-                } else {
-                        return 1;
-                }
-        } else {
-                return 1;
-        }
-}
-
-typedef enum {
         ROW_MIDDLE = 0,
         ROW_START  = 1 << 0,
         ROW_END    = 1 << 1,
@@ -875,16 +828,16 @@
 } RowChunk;
 
 static void
-usage_row_draw_resource_ival (mrptime          start,
-                               mrptime          end,
-                               gint             units,
-                               RowChunk         chunk,
-                               GdkDrawable     *drawable,
-                               GnomeCanvasItem *item,
-                               gint             x,
-			       gint             y,
-			       gint             width,
-			       gint             height)
+usage_row_draw_resource_ival (mrptime                     start,
+                               mrptime                    end,
+			       PlannerUsageRowColorScheme *color_scheme,
+                               RowChunk                   chunk,
+                               GdkDrawable                *drawable,
+                               GnomeCanvasItem            *item,
+                               gint                       x,
+			       gint                       y,
+			       gint                       width,
+			       gint                       height)
 {
         PlannerUsageRow     *row;
         PlannerUsageRowPriv *priv;
@@ -972,17 +925,7 @@
                 return;
         }
 
-        if (units == 0) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_free);
-        }
-	else if (units < 100) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_underuse);
-        }
-	else if (units == 100) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_normal);
-        } else {
-                gdk_gc_set_foreground (priv->fill_gc, &color_overuse);
-        }
+	gdk_gc_set_foreground (priv->fill_gc, &color_scheme->plain);
 
         /* Draw the central part of the chunk */
 	if (rr_xend >= rr_xstart && rr_yend >= rr_ystart) {
@@ -993,20 +936,10 @@
 				    rr_xend - rr_xstart + 1, rr_yend - rr_ystart + 1);
 	}
 
-        if (units == 0) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_free_light);
-        }
-	else if (units < 100) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_underuse_light);
-        }
-	else if (units == 100) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_normal_light);
-        } else {
-                gdk_gc_set_foreground (priv->fill_gc, &color_overuse_light);
-        }
-	
         //gdk_gc_set_foreground (priv->fill_gc, &color_high);
 
+	gdk_gc_set_foreground (priv->fill_gc, &color_scheme->light);
+
         /* Top of the shadow. */
         if (cs_ystart == rs_ystart) {
                 gdk_draw_line (drawable, priv->fill_gc, r_xstart, rs_ystart,
@@ -1019,20 +952,10 @@
                                rs_xstart, cs_yend);
         }
 	
-	if (units == 0) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_free_dark);
-        }
-	else if (units < 100) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_underuse_dark);
-        }
-	else if (units == 100) {
-                gdk_gc_set_foreground (priv->fill_gc, &color_normal_dark);
-        } else {
-                gdk_gc_set_foreground (priv->fill_gc, &color_overuse_dark);
-        }
-	
 	//gdk_gc_set_foreground (priv->fill_gc, &color_shadow);
 
+	gdk_gc_set_foreground (priv->fill_gc, &color_scheme->dark);
+
         /* Bottom of the shadow. */
         if (cs_yend == rs_yend) {
                 gdk_draw_line (drawable, priv->fill_gc, r_xstart, rs_yend,
@@ -1076,7 +999,7 @@
                                r_yend);
 	}
 }
-
+					       
 static void
 usage_row_draw_resource (PlannerUsageRow *row,
                           GdkDrawable      *drawable,
@@ -1086,52 +1009,24 @@
 			  gint              width,
 			  gint              height)
 {
-        GList         *dates;
-        MrpResource   *resource;
-        MrpTask       *root;
-        MrpAssignment *assignment;
-        MrpTask       *task;
-        MrpProject    *project;
-        GList         *assignments;
-        GList         *a, *d;
-        Date          *date, *date0, *date1;
-        mrptime        work_start, finish, previous_time;
-        gint           units;
-        RowChunk       chunk;
+        GList                      *e, *edges;
+        MrpResource                *resource;
+        MrpTask                    *root;
+        MrpProject                 *project;
+        MrpAssignmentEdge          *edge;
+	mrptime                     finish, previous_time;
+        gint                        units;
+        RowChunk                    chunk;
+	MrpResourceAllocation       status;
+	PlannerUsageRowColorScheme *color_scheme;
 
         resource = row->priv->resource;
 
-        dates = NULL;
-
 	project = mrp_object_get_project (MRP_OBJECT (resource));
 
-	assignments = mrp_resource_get_assignments (resource);
-        for (a = assignments; a; a = a->next) {
-                assignment = a->data;
+	edges = NULL;
+	edges = mrp_resource_get_assignment_edges(resource, edges);
 
-                task = mrp_assignment_get_task (assignment);
-                work_start = mrp_task_get_work_start (task);
-                finish = mrp_task_get_finish (task);
-
-		units = mrp_assignment_get_units (assignment);
-
-		date0 = g_new0 (Date, 1);
-                date0->type = START_ASSIGN;
-                date0->time = work_start;
-                date0->units = units;
-                date0->assignment = assignment;
-                date0->task = task;
-
-                date1 = g_new0 (Date, 1);
-                date1->type = END_ASSIGN;
-                date1->time = finish;
-                date1->units = units;
-                date1->assignment = assignment;
-                date1->task = task;
-                dates = g_list_insert_sorted (dates, date0, usage_row_date_compare);
-                dates = g_list_insert_sorted (dates, date1, usage_row_date_compare);
-        }
-
         units = 0;
         previous_time = mrp_project_get_project_start (project);
 
@@ -1140,39 +1035,37 @@
 
         chunk = ROW_START;
 
-        for (d = dates; d; d = d->next) {
-                date = d->data;
+        for (e = edges; e; e = e->next) {
+                edge = e->data;
 
-                if (date->time != previous_time) {
-                        if (date->time == finish) {
+                if (edge->time != previous_time) {
+                        if (edge->time == finish) {
 				chunk |= ROW_END;
 			}
+			/* Set the color scheme pointer based on allocation units */
+			
+			status = mrp_resource_allocation_status(resource, units);
+			color_scheme = color_schemes + (int)status;
 
                         usage_row_draw_resource_ival (previous_time,
-                                                       date->time,
-                                                       units,
-                                                       chunk,
-                                                       drawable, item,
-                                                       x, y, width, height);
+						      edge->time,
+ 						      color_scheme,
+						      chunk,
+						      drawable, item,
+						      x, y, width, height);
 
                         chunk &= ~ROW_START;
-                        previous_time = date->time;
+                        previous_time = edge->time;
                 }
-
-                if (date->type == START_ASSIGN) {
-                        units += date->units;
-                } else {
-                        units -= date->units;
-                }
-                g_free (date);
+		units += mrp_assignment_edge_get_delta_units(edge);
         }
-        g_list_free (dates);
+        g_list_free (edges);
 
         if (!(chunk & ROW_END)) {
 		chunk |= ROW_END;	
                 usage_row_draw_resource_ival (previous_time,
                                                finish,
-                                               units,
+                                               &color_schemes[MRP_RESOURCE_FREE],
                                                chunk,
                                                drawable, item,
                                                x, y, width, height);
@@ -1257,7 +1150,7 @@
                                                          priv->complete_gc);
                 }
 
-                gdk_gc_set_foreground (priv->fill_gc, &color_normal);
+                gdk_gc_set_foreground (priv->fill_gc, &color_schemes[MRP_RESOURCE_ALLOCATED].plain);
 
                 gdk_draw_rectangle (drawable,
                                     priv->fill_gc,
@@ -1276,7 +1169,7 @@
                 gdk_draw_line (drawable, priv->frame_gc, rx1, cy1, rx2, cy1);
                 gdk_draw_line (drawable, priv->frame_gc, rx1, cy2, rx2, cy2);
 
-                gdk_gc_set_foreground (priv->fill_gc, &color_normal_light);
+                gdk_gc_set_foreground (priv->fill_gc, &color_schemes[MRP_RESOURCE_ALLOCATED].light);
                 gdk_draw_line (drawable,
                                priv->fill_gc,
                                rx1 + 0, cy1 + 1, rx2 - 0, cy1 + 1);
@@ -1287,7 +1180,7 @@
                                        rx1 + 1, cy1 + 1, rx1 + 1, cy2 - 1);
                 }
 
-                gdk_gc_set_foreground (priv->fill_gc, &color_normal_dark);
+                gdk_gc_set_foreground (priv->fill_gc, &color_schemes[MRP_RESOURCE_ALLOCATED].dark);
                 gdk_draw_line (drawable,
                                priv->fill_gc,
                                rx1 + 0, cy2 - 1, rx2 - 0, cy2 - 1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]