1.9.1:

2009-02-15  Armin Burgmeier  <armin@openismus.com>

	* glom/libglom/data_structure/field.cc (get_gda_type_name): Use the
	GType from m_field_info instead of converting the glom type to a gda
	type, to take fallback types into account, as used by SQLite for
	numeric values.
	(get_holder): Use the passed value's type to initialize the holder
	type. For binary values, there can be a mismatch between the value
	type and the field type with SQLite. This is not optimal, but it
	works for now.

2009-02-15  Armin Burgmeier  <armin@openismus.com>

	* glom/mode_data/box_data_details.cc (on_flowtable_field_edited):
	Revert the changed value if set_field_value_in_database() throws a
	glib exception.

2009-02-15  Armin Burgmeier  <armin@openismus.com>

	* glom/utility_widgets/db_adddel/db_adddel.cc (user_changed): Revert
	the changed value if set_field_value_in_database() throws an
	exception.

2009-02-15  Armin Burgmeier  <armin@openismus.com>

	* glom/libglom/connectionpool_backends/sqlite.cc: Convert existing
	values explicitely via the date() and time() SQLite functions when
	converting existing values to date or time. This fixes all rows being
	erased when changing a column to date or time.

2009-02-12  Armin Burgmeier  <armin@openismus.com>

	* glom/mode_design/fields/box_db_table_definition.cc
	(check_field_change): Check field's glom type directly instead of
	guessing the glom type from its GType, which might produce a wrong
	result with some of the fallback types used with SQLite.

	* glom/libglom/connectionpool_backends/sqlite.cc (recreate_table):
	Don't crash if transaction rollback fails without the error variable
	being set.

2009-02-10  Armin Burgmeier  <armin@openismus.com>

	* glom/libglom/connectionpool_backends/sqlite.h:
	* glom/libglom/connectionpool_backends/sqlite.cc: Support dropping and
	changing columns, though changing doesn't yet seem to work reliably
	yet.

2009-02-10  Armin Burgmeier  <armin@openismus.com>

	* glom/libglom/connectionpool_backends/sqlite.cc (recreate_table):
	Use get_value_type() to find out a value's not type, not get_g_type()
	which returns the GType the value stores if it's value type is GType.

	* glom/mode_design/fields/box_db_table_definition.cc (on_adddel_add):
	Don't call on_adddel_changed() just to store the field into the
	document, since on_adddel_changed() does a lot of unnecessary extra
	stuff such as calling change_columns() on the backend, which forces a
	whole table recreation with SQLite.

2009-02-10  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db.cc: insert_example_data(): Fixed my typo to fix the 
	build. Sorry.

2009-02-09  Murray Cumming  <murrayc@murrayc.com>

	* glom/libglom/data_structure/field.[h|cc]: get_gda_type(): 
	Renamed to get_gda_type_name(). Removed get_gda_g_type() because 
	we already have a static get_g_type_for_glom_type(). This gets rids of 
	the nasty switch block.
	* glom/base_db.cc: insert_example_data(), get_lookup_value(),
	  get_primary_key_is_in_foundset(): Adapted.

2009-02-09  Armin Burgmeier  <armin@openismus.com>

	* glom/libglom/connectionpool.h:
	* glom/libglom/connectionpool.cc: Added set_server_operation_value(),
	create_server_operation() and perform_server_operation() convenience
	methods to connectionpool backend base class.

	* glom/libglom/connectionpool_backends/sqlite.h:
	* glom libglom/connectionpool_backends/sqlite.cc: Implemented table
	recreation, required for changing or dropping columns, or adding
	primary key columns. The glom type of newly added columns doesn't yet
	seem to be recognized correctly, though.

2009-02-08  Murray Cumming  <murrayc@murrayc.com>

	* glom/utility_widgets/db_adddel/glom_db_treemodel.[h|cc]:
	constuctor/create(): Added a bool find_mode parameter and member 
	variable.
	refresh_from_database(): Create a DataModelArray for find mode, 
	with the appropriate column types.
	* glom/utility_widgets/db_adddel/db_adddel.[h|cc]:
	Remove the awkward ListStore alternative model for find mode that I 
	recently introduced,
	construct_specified_columns(): Instead just specify find_mode=true 
	when creating the tree model.

	* glom/mode_data/box_data_list.cc: Simplify this code again 
	accordingly.

	* glom/utility_widgets/db_adddel/Makefile.am:
	* glom/utility_widgets/db_adddel/treemodel_with_addrow.[h|cc]:
	* glom/utility_widgets/db_adddel/liststore_with_addrow.[h|cc]:
	* regression_tests/Makefile.am:
	* regression_tests/test_treemodel_dynamic_cast.cc:
	Removed these because they are no longer used.

2009-02-08  Johannes Schmid  <jschmid@openismus.com>
	
	* glom/libglom/data_structure/Makefile.am:
	* glom/libglom/data_structure/parameternamegenerator.cc:
	* glom/libglom/data_structure/parameternamegenerator.h:
	New class to generate simple unique holder names
	
	* glom/base_db.cc (insert_example_data):
	Use the new ParameterNameGenerator class

2009-02-07  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db.cc: get_field_value_is_unique(): Use the 
	Field::get_holder(value) method overload instead of get_holder(), 
	avoiding copying the Field and using Field::get_data().
	* glom/libglom/data_structure/field.[h|cc]:
	Removed the get_holder(name) method overload because it is now not 
	used.
	Removed get/set_data() and the member variable because they are now 
	not used.

2009-02-06  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db.cc: get_table_names_from_database(): Comment out the 
	checks for internal tables, because that is now fixed in libgda.
	* glom/mode_data/box_data.[h|cc]:
	* glom/base_db_table_data.[h|cc]: Move refresh_related_fields() 
	(which is virtual) and get_related_fields() down the hierarchy so that 
	the override is also used by DbAddDel, so related fields are updated 
	in the view on list views and related records.
	This really fixes bug #569722 (Johannes Schmid)

2009-02-05  Armin Burgmeier  <armin@openismus.com>

	* glom/utility_widgets/db_adddel/glom_db_treemodel.cc: Added a
	clarifying comment on why we use a DataAccessWrapper.

2009-02-04  Armin Burgmeier  <armin@openismus.com>

	* glom/utility_widgets/db_adddel/glom_db_treemodel.cc
	(DbTreeModelRow::fill_values_if_necessary): Use a
	Gnome::Gda::DataModelWrapper to wrap the resulting cursor-based data
	model. This avoids a special-case for SQLite. Requires libgda trunk.

2009-02-03  Murray Cumming  <murrayc@murrayc.com>

	* glom/glom_document.dtd: Mention the new self_hosted <connection> 
	attribute.

2009-02-03  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db.cc: get_table_names_from_database(): Filter out some 
	extra internal table names which may be created/reported by newer 
	versions of libgda.

2009-02-02  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db_table_data.[h|cc]: Added get_row_selected() virtual function, 
	used in record_new() instead of an always-null TreeModel::iterator.
	This lets lookups, default values, and calculated values be seen when 
	adding new list records or related records.
	* glom/mode_data/box_data_list.[h|cc]: 
	* glom/utility_widgets/db_adddel/db_adddel.[h|cc]: 
	Added get_row_selected() overrides.
	This should fix bug #569722 (Johannes Schmid)

2009-02-02  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db.cc: query_execute_select(), query_execute(): 
	When using --debug_sql, use Statement::to_sql() to show the actual 
	SQL with actual values, though this does not seem to work for 
	non-SELECT queries.
	* glom/mode_data/box_data.cc: refresh_related_fields(): Some extra 
	error checking.

2009-02-02  Murray Cumming  <murrayc@murrayc.com>>

	* glom/base_db.cc: :set_field_value_in_database(): Correct a 
	copy/paste typo that was probably introduced when switching to using 
	parameters, so we now actually specify the primary key, so we really 
	change the data in the database.

2009-01-31  Johannes Schmid  <jschmid@openismus.com>

	* glom/application.cc (on_document_load()):
	Reinit cancelled state and some more cleanups.
	Fixes #569721 – Glom behaves strange when you cancel the new dialog

2009-01-30  Murray Cumming  <murrayc@murrayc.com>

	* glom/glom.glade: Make the labels FILL and EXPAND so they really 
	align left instead of centering. This broke when I resaved with a 
	newer glade-2.

2009-01-30  Murray Cumming  <murrayc@murrayc.com>

	Added some TODO comments where we would like to use SQL parameters 
	instead of Field::sql(), if we can figure out how to do that for 
	fragments of SQL, or how to refactor the code to parse the whole 
	SQL query at once.

2009-01-29  Johannes Schmid  <jhs@openismus.com>

	* glom/base_db.cc:
	* glom/base_db_table_data.cc:
	* glom/mode_data/box_data_calendar_related.cc:
	* glom/mode_data/box_data_list_related.cc:
	Move the rest of queries from sql() to use params where this made sense.
	Some methods generate random sql that is executed elsewhere which means that
	they cannot use parameters themselves. I did not touch those.
	
	* glom/libglom/data_structure/field.cc:
	* glom/libglom/data_structure/field.h:
	Added get_holder(value, name) to avoid having to use temporary field to
	be able to use get_holder() and get_gda_holder_string()

2009-01-29  Johannes Schmid  <jschmid@openismus.com>

	* glom/base_db.cc:
	* glom/base_db_table_data.cc:
	Converted more queries to use parameters

2009-01-27  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db.cc: auto_increment_insert_first_if_necessary(),
	get_next_auto_increment_value(), set_database_preferences():
	Use the new templated Gda::Set::add_holder(), simplifying the code.

2009-01-27  Murray Cumming  <murrayc@murrayc.com>

	* glom/libglom/connectionpool_backends/postgres.cc
	attempt_create_database(): Do not pass an empty Set to 
	create_operation() because I added a method overload in libgdamm.

2009-01-27  Johannes Schmid  <jschmid@openismus.com>

	* glom/base_db.cc (set_field_value_in_database):
	Fix updating of fields with was broken due to a stupid mistake

2009-01-26  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db.cc: get_fields_for_table_from_database(),
	auto_increment_insert_first_if_necessary(),
	get_next_auto_increment_value(), insert_example_data():
	* glom/libglom/data_structure/field.cc: get_holder(): Adapt to 
	my set_value()/set_value_as_value() changes in libgdamm to slightly 
	simply the code. I guess that a better add_param() method could 
	simplify it more.

2009-01-26  Johannes Schmid  <jschmid@openismus.com>

	* glom/base_db.cc:
	* glom/base_db.h:
	Ported more queries to use parameters. query_execute_select() now
	accepts parameters.
	
	* glom/base_db_table_data.cc:
	* glom/dialog_database_preferences.cc:
	* glom/frame_glom.cc:
	* glom/mode_data/box_data.cc:
	* glom/mode_data/box_data_calendar_related.cc:
	* glom/mode_data/box_data_details.cc:
	* glom/mode_design/fields/box_db_table_definition.cc:
	* glom/mode_design/print_layouts/canvas_print_layout.cc:
	Removed parent_window argument from query_execute_select() call.
		
	* glom/libglom/data_structure/field.cc:
	* glom/libglom/data_structure/field.h:
	Added get_holder() und get_gda_holder_string() as conveniece methods

2009-01-25  Johannes Schmid <jschmid@openismus.com>

	* glom/base_db.cc:
	Some cosmetic changes to error messages and removed the reference()
	call that is obviously caused by a bug in the postgres provider.

2009-01-24  Armin Burgmeier  <armin@openismus.com>

	* glom/libglom/data_structure/fieldtypes.cc (constructor): Added
	GdaBlob as a fallback type for GdaBinary, so that
	Field::set_field_info() sets the correct glom type if the GType is
	GDA_TYPE_BLOB.

	* glom/libglom/data_structure/glomconversions.cc
	(get_pixbuf_for_gda_value): Allow the value having type
	GDA_TYPE_BLOB, and handle this appropriately. These changes fix images
	in SQLite with libgda4, requiring libgda trunk.

	* glom/utility_widgets/db_adddel/glom_db_treemodel.cc
	(refresh_from_database): Use STATEMENT_MODEL_RANDOM_ACCESS to create
	the data model when using SQLite, because of bug #567891.

	* glom/mode_design/fields/box_db_table_definition.cc (fill_field): Use
	the field's glom type directly, instead of guessing it from the
	field's GType.

2009-01-23  Johannes Schmid  <jhs@openismus.com>

	* glom/base_db.cc:
	* glom/base_db.h:
	Refactored query_execute() to be able to use additional parameters. Changed
	insert_example_data() to use the new method.
	
	* glom/libglom/data_structure/field.cc:
	* glom/libglom/data_structure/field.h:
	Added get_gda_g_type() and made get_gda_type() should a wrapper around it
	
	* glom/base_db_table_data.cc:
	* glom/dialog_database_preferences.cc:
	* glom/mode_data/box_data_calendar_related.cc:
	* glom/mode_data/box_data_list_related.cc:
	* glom/mode_design/users/dialog_groups_list.cc:
	* glom/mode_design/users/dialog_users_list.cc:
	* glom/navigation/box_tables.cc:
	* glom/utility_widgets/db_adddel/glom_db_treemodel.cc:
	Removed the unused Gtk::Window* parameter from all query_execute() calls

2009-01-22  Murray Cumming  <murrayc@murrayc.com>

	* glom/base_db.cc: insert_example_data(): Catch exceptions as const.
	Remove spaces before (, again.

2009-01-22  Johannes Schmid  <jschmid@openismus.com>

	* glom/base_db.cc (insert_example_data(), get_connection()):
	* glom/base_db.h:
	Fixed insertion of example data by using variables in the sql statement
	instead of inserting the data directly in the statement (which confuses the
	GdaSqlParser and is inefficient)
	
	* glom/libglom/data_structure/field.cc (get_gda_type()):
	* glom/libglom/data_structure/field.h:
	Added a method to get the gda GType of the field. This is necessary to
	prepare the sql statement so I would rather like to reuse get_sql_type().
	Currntly investigating on gnome-db-list.

2009-01-20  Murray Cumming  <murrayc@murrayc.com>

	* glom/libglom/document/document_glom.cc: save_changes():
	Revert the Johannes change here too, because it is causing infinite 
	loops when adding fields, and probably at other times, repeatedly 
	saving the file. The code is not equivalent.

2009-01-19  Murray Cumming  <murrayc@murrayc.com>

	* glom/application.cc: document_history_add: Revert the previous,
	because I removed the new API from Bakery and just fixed the existing 
	Bakery method instead.

2009-01-19  Johannes Schmid  <jschmid@openismus.com>

	* glom/application.cc: document_history_add():
	Avoid a critical warning by adding the recent data instead of
	letting Gtk::RecentManager query for non-existing uris which causes a
	Gtk-Critical. Requires new bakery trunk
	
	* glom/libglom/document/document_glom.cc:
	Don't duplicate code from Bakery.