1.15.2:

2010-08-06  Murray Cumming  <murrayc@murrayc.com>>

	FieldFormatting: Default to show-all for related choices.

	* glom/libglom/data_structure/layout/fieldformatting.cc:

2010-08-06  Murray Cumming  <murrayc@murrayc.com>>

	Formatting: Add get_choices_related() overload to reduce copy/pasted code.

	* glom/libglom/data_structure/layout/fieldformatting.[h|cc]:
  Added a get_choices_related() overload that returns the LayoutItem_Fields
  instead of just the field names. This reduces the copy/pasted code in the
  callers, and makes it easier to support related fields in future.
	* glom/libglom/utils.[h|cc]:
	* glom/mode_data/datawidget/combochoices.[h|cc]:
	* glom/utility_widgets/db_adddel/db_adddel.cc: Adapted and made necessary
  const corrections.

2010-08-06  Murray Cumming  <murrayc@murrayc.com>

	Choices: Fix !show-all lists.

	* glom/mode_data/datawidget/combochoices.[h|cc]:
  refresh_data_from_database_with_foreign_key(): Add a document parameter,
  used to update the cached choices information if necessary.
	* glom/mode_data/flowtablewithfields.cc: set_field_value(): Adapted.

2010-08-06  Murray Cumming  <murrayc@murrayc.com>

	Document loading: Show an error dialog even for unexpected errors.

	* glom/application.cc: on_document_load(): Don't just fail silently when
  there is an unexpected error, for instance if the postgres data directory
  is missing.

2010-08-06  Murray Cumming  <murrayc@murrayc.com>

	Utils::get_choice_values(): Reduce copy/pasted code.

	* glom/libglom/utils.[h|cc]: build_sql_select_with_key(): Add a sort_clause
  parameter.
  get_choice_values(field): Rename this to get_choice_values_all() and change
  the implementation to just call the other get_choice_values(). Add
  a Document* parameter so we can do that.
  get_choice_values(document, field, ...): Sort the list by the first field.
  This should probably be an option in the developer-mode UI.
	* glom/mode_data/datawidget/combo.h:
	* glom/mode_data/datawidget/combochoices.[h|cc]:
	* glom/mode_data/datawidget/comboentry.h:
	* glom/utility_widgets/db_adddel/db_adddel.cc:
  get_choice_values(): Adapt to the change, by adding a Document* parameter.
	* glom/base_db.cc: Adapt.

2010-08-06  Murray Cumming  <murrayc@murrayc.com>

	DbAddDel: Avoid some copy/pasting of code to append items to choices cells.

	* glom/utility_widgets/db_adddel/db_adddel.[h|cc]: Added set_cell_choices(),
  using it in refresh_cell_choices_data_from_database_with_foreign_key() and
  construct_specified_columns_cellrenderer().

2010-08-06  David King  <davidk@openismus.com>

	Minor build system cleanup

	* configure.ac: Drop unnecessary AC_DISABLE_STATIC. Use AS_IF rather
	than shell if...fi. Add a TODO.
	* Makefile.am:
	* Makefile_tests.am: Take advantage of dependencies to reduce
	duplication of linker flags.

2010-08-06  Murray Cumming  <murrayc@murrayc.com>

	List: Choices with !show_all: Update the list when the from_field changes.

	* glom/libglom/utils.[h|cc]: Added a get_choice_values() overload that
	takes the foreign_key.
	* glom/utility_widgets/db_adddel/db_adddel.[h|cc]: Added get_choice_index()
	to get the affected choice lists when a field value changes.
	Added refresh_cell_choices_data_from_database_with_foreign_key() to update
	these lists.
	set_value(): Use these methods to update choice lists when appropriate,
	as already happens in the Details view.

2010-08-05  Murray Cumming  <murrayc@murrayc.com>

	List view: When a value is edited, update other instances of the same field.

	* glom/utility_widgets/db_adddel/db_adddel.[h|cc]:
	get_data_model_column_index(): Add a including_specified_field_layout bool
	parameter, used in a new set_value() method overload that has a
	set_specified_field_layout bool parameter.
	user_changed(): Call set_value() to show the new value in any other
	instances of the same field.
	The details view already does this.

2010-08-04  Murray Cumming  <murrayc@murrayc.com>>

	Simplified some code.

	* glom/mode_data/flowtablewithfields.[h|cc]: set_value(), set_other_value():
  Avoid copy/pasting of the code.

2010-08-04  Murray Cumming  <murrayc@murrayc.com>

	Details: Choices with !show_all: Update the list when the from_field changes.

	* glom/libglom/data_structure/layout/fieldformatting.[h|cc]: Renamed
	set/get_choices() to set/get_choices_related().
	* glom/libglom/utils.cc:
	* glom/libglom/document/document.cc:
	* glom/mode_design/layout/layout_item_dialogs/box_formatting.cc:
	* glom/utility_widgets/db_adddel/db_adddel.cc: Adapted.

	* glom/mode_data/datawidget/combochoices.[h|cc]: Remove the non-default
	constructor that took a second field.
	Move set_choices_with_second() to private.
	Add set_choices_related() and matching member variables.
	Add refresh_data_from_database_with_foreign_key(), like the one in
	Box_Data_RelatedRecords, which gets the related values and calls
	set_choices_with_second().
	* glom/mode_data/datawidget/combo.[h|cc]:
	* glom/mode_data/datawidget/combo_as_radio_buttons.[h|cc]:
	* glom/mode_data/datawidget/combochoiceswithtreemodel.[h|cc]:
	* glom/mode_data/datawidget/comboentry.[h|cc]: Adapt to the changed
	ComboChoices base API.
	* glom/mode_data/datawidget/datawidget.cc:
	create_combo_widget_for_field(): Do not take the second field as a parameter,
	because that is now specified later.
	Constructor: Simplify the code now that ComboChoices does more of the work.
	* glom/mode_data/flowtablewithfields.cc: set_field_value(),
	set_other_field_value(): Call refresh_data_from_database_with_foreign_key() on
	the choice widgets as they already does on the portals, to refresh the list of
	possible values.

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

	FlowTableWithFields: Added get_choices_widgets(from_field).

	* glom/mode_data/datawidget/datawidget.cc: Constructor: Only fill the
	choices list at this point if show_all is set.
	* glom/mode_data/flowtablewithfields.[h|cc]: Addef get_choices_widgets(),
	like the existing get_portals() methods.

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

	Field Formatting: Related Choices: Add a Show All checkbox.

	* glom/glom_developer.glade:
	* glom/libglom/data_structure/layout/fieldformatting.[h|cc]:
	* glom/mode_design/layout/layout_item_dialogs/box_formatting.[h|cc]:
	Add a Show All checkbox to the Related Choices section, so the developer
	may choose to restrict the choices depending on the relationship. The default
	(the previous behaviour) is to show all records from the related table.
	* glom/libglom/document/document.cc: save_before_layout_item_formatting(),
	save_after_layout_item_formatting(): Store the new bool in the document.
	* glom/libglom/utils.cc:
	* glom/mode_data/datawidget/datawidget.cc:
	* glom/utility_widgets/db_adddel/db_adddel.cc: Adapt the code to build, though
	the behaviour has not changed yet.

2010-07-27  Murray Cumming  <murrayc@murrayc.com>

	Fix the tests build after the merge.

	* tests/test_selfhosting_new_empty.cc: Fix the use of Utils::.

2010-07-27  Murray Cumming  <murrayc@murrayc.com>

	Rename libglom-1.14 to libglom-1.16 (parallel-installable)

	* configure.ac: Change the GLOM_ABI_VERSION number.
	* Makefile.am:
	* Makefile_libglom.am:
	* docs/pyglom_reference/Makefile.am:
	* docs/pyglom_reference/index.rst.in:
	* glom/libglom/init.h:
	* glom/python_embed/python_module/py_glom_module.cc:
	* tests/test_load_python_library.cc:
	* win32/build-installer:
	* win32/glom.iss.in: Change mentions of 1.14 to 1.16.

2010-07-25  Murray Cumming  <murrayc@murrayc.com>

	Allow unique fields with same name in multiple tables.

	* glom/libglom/connectionpool_backends/postgres.cc:
	change_column(): Prefix the table name to the constraint name when
	setting/removing the unique-key constraint, as libgda (or PostgreSQL)
	seems to do when creating a field. This prevents a clash when two tables
	have the same field name, and both should be unique.
	This is nasty code anyway that I would rather have in libgda.
	This fixes bug #625192 (fmyhr).

2010-07-22  Murray Cumming  <murrayc@murrayc.com>

	Added --restore command-line option.

	* glom/application.[h|cc]: Added init() with a bool restore option,
  calling do_backup_restore() if appropriate.
	* glom/main.cc: Added a --restore command and pass the bool result to
  Application::init().

  This allows the user to restore from a backup without first loading an
  existing file, though this is so far only possible via the terminal.

2010-07-22  Murray Cumming  <murrayc@murrayc.com>

  Added Developer/Restore Backup menu item.

	* glom/application.[h.cc]: Added a Developer/Restore Backup menu item,
  which lets the user choose a .tar.gz, untars it in /tmp/ and opens it.

	* tests/test_selfhosting_new_empty.cc:
	* glom/libglom/utils.[h|cc]: Move delete_directory() to Utils.
  Added get_directory_child_with_suffix(), used to find the .glom file inside
  an untarred directory.

2010-07-22  Murray Cumming  <murrayc@murrayc.com>

	Saving from a backup: Now works.

	* glom/application.[h|cc]: on_document_load(): Simplify the code to
  create from a backup, modifying the from-example code to handle it too,
  calling a new recreate_database_from_backup() method.
  That now creates the database and then adds the groups before trying
  to restore from the backup file.
	* glom/libglom/connectionpool_backends/backend.h: convert_backup():
	* glom/libglom/connectionpool_backends/postgres.[h|cc]: convert_backup():
	* glom/libglom/connectionpool_backends/sqlite.[h|cc]: convert_backup():
  Add a database_name_parameter. This now expects the database to exist
  already, though it should be empty. It should also already have the
  expected groups.
	* glom/libglom/connectionpool.[h|cc]: convert_backup(): Supply the
  database name. Also update the meta data so we know about the new tables.

2010-07-21  Murray Cumming  <murrayc@murrayc.com>

	Small Business example: Add table privileges.

	* examples/example_smallbusiness.glom: Give some privileges to the
    accounts and personnel groups and resave-as-an-example. These were
    probably lost some time.

2010-07-21  Murray Cumming  <murrayc@murrayc.com>>

	Saving as example: Fix this.

	* glom/libglom/document/document.cc: set_modified(): Actually use
    m_allow_auto_save so we don't just save every time, overwriting
    previous saves. For instance, the examples were saved with is_example=false
    after the document was changed back.

2010-07-21  Murray Cumming  <murrayc@murrayc.com>>

	Saving from examples: Set the table privileges mentioned in the document.

	* glom/base_db.[h|cc]: Added set_table_privileges_groups_from_document().
	* glom/application.cc: recreate_database_from_example(): call it.

2010-07-21  Murray Cumming  <murrayc@murrayc.com>

	Saving from examples: Create the groups mentioned in the document.

	* glom/base_db.[h|cc]: Added add_groups_from_document().
	* glom/application.cc: recreate_database_from_example(): call it.

2010-07-20  Murray Cumming  <murrayc@murrayc.com>>

	Fixed warnings with latest gtkmm-2.24

	* glom/mode_data/notebook_data.cc:
	* glom/mode_find/notebook_find.cc: Use Gtk::Notebook::append_page()
    instead of Gtk::Notebook::pages().push_back().

2010-07-13  Murray Cumming  <murrayc@murrayc.com>

	Fixed warnings, even with the latest gtkmm-2.24.

	Many files: Try to include box.h or dialog.h before other treemodel.h.
    Sometimes just add a gtkmm.h to simplify things. This will not be necessary
    with gtkmm-3.0 (in glom's master branch).

2010-07-07  Murray Cumming  <murrayc@murrayc-desktop>

	PostgresQL backups: Suggest a dated name.

	* glom/application.cc: on_menu_developer_export_backup(): Suggest
    a directory name based on the current name and the date/time.
    Also use the directory name for the .glom filename, as we usually would do,
    instead of calling it just backup.glom.

2010-07-07  Murray Cumming  <murrayc@murrayc.com>

	PostgreSQL backups: Archive the directory in a .tar.gz..

	* configure.ac: Check for the tar and gzip executables.
	* glom/application.cc: on_menu_developer_export_backup(): Use tar
    via the command line, to put it all in a .tar.gz, so it is self-contained.

2010-07-07  Murray Cumming  <murrayc@murrayc.com>

	PostgreSQL backups: Use .pgpass.

	* glom/libglom/connectionpool_backends/postgres.[h|cc]:
	* glom/libglom/connectionpool_backends/postgres_self.[h|cc]:
    Move create_text_file() from PostgresSelf to Postgres and add an
    only_for_current_user bool parameter, so we can use it in a
    new save_password_to_pgpass() method.
    save_backup(), convert_backup(): Temporarily store the password in
    ~/.pgpass, so pg_dump and pg_restore actually work.

2010-07-05  Murray Cumming  <murrayc@murrayc.com>

	Show progress in the UI during backup saving and restoring.

	* glom/application.[h|cc]: on_document_load(),
    on_menu_developer_export_backup(): Show a pulsing progress dialog while
    waiting for backup exporting and restoring.
    on_menu_developer_export_backup(): Close the file chooser dialog as soon
    as we stop using it.

2010-07-03  Murray Cumming  <murrayc@murrayc.com>

	Improve backup saving and add backup restoring.

	* glom/libglom/document/document.[h|cc]: Added get/set_is_backup_file(),
	saved in the XML document..
  on_menu_developer_export_backup(): Mark the .glom file as a backup file.
	Rename recreate_database() to recreate_database_from_example().
	on_document_load(): Handle backup .glom files similarly to examples files,
	but using the backup file instead of example data.
	* glom/frame_glom.cc:
	* glom/libglom/connection_pool.[h|cc]:
	* glom/libglom/connectionpool_backends/backend.[h|cc]: startup(): Return a
	StartupErrors enum, to provide more clues, for instance to say that backup
	data was found.
	Add get/set_database_directory_uri(), replacing the one in sqlite.[h|cc] and
	replacing set_self_hosting_data_uri() in postgres_self.[hc|cc].
	save_backup(): Don't take a filepath - use get_database_directory_uri()
	instead.
	Added convert_backup() to restore from a backup.
	* glom/libglom/connectionpool_backends/sqlite.[h|cc]:
	* glom/libglom/connectionpool_backends/postgres.[h|cc]:
	get_path_to_postgres_executable(): Catch exceptions from Glib::build_filename().
	save_backup(): Use --format=c with pg_dump, because the default one can't be
	used with pg_restore.
	Implement convert_backup(), using pg_restore.
	Added get_self_hosting_config_path(), get_self_hosting_data_path() and
	get_self_hosting_backup_path() to avoid copy/pasting magic paths.
	* glom/libglom/connectionpool_backends/postgres_self.[h|cc]:
	Adapted.
	* glom/application.[h|cc]:
	* tests/test_selfhosting_new_empty.cc: Adapted to check the enum result from
	startup().

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

	Document: Avoid a crash when creating the parent directory.

	* glom/libglom/docment/bakery/document.cc: write_to_disk(): Check the
	result of Gio::File::get_parent() for null, because that happens if we
	provide a path instead of a URI.

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

	Save as Example: Reset the old file URI and allow auto-saving again.

	* glom/application.cc: on_menu_file_save_as_example(): reset the old file
	URI and turn auto-saving back on again, because it makes no sense to leave
	the user editing an example document. This is really an export anyway.
	This allows the user to close the window again after saving as an example.

2010-07-01  Murray Cumming  <murrayc@murrayc.com>

	Add Save Backup menu item.

	* glom/libglom/connectionpool_backends/backend.[h|cc]:
	* glom/libglom/connectionpool_backends/posgres.[h|cc]:
	* glom/libglom/connectionpool_backends/sqlite.[h|cc]: Added save_backup()
	virtual method, using pg_dump for PostgreSQL.
	* glom/libglom/connectionpool.[h|cc]: Add save_backup() here, calling the
	backend.
	* glom/application.cc: Add a Developer/Export Backup menu item, to use
	this feature. This also saves the .glom file.

2010-07-01  Murray Cumming  <murrayc@murrayc.com>

	Spawn functions: Catch some exceptions.

	* glom/libglom/spawn_with_feedback.cc():
	execute_command_line(), execute_command_line_and_wait(): Catch exceptions
	so that these functions don't throw, simplifying caller code. For instance,
	a command may be malformed and rejected by the shell.

2010-06-29  Murray Cumming  <murrayc@murrayc.com>

	* glom/application.[h|cc]: Developer menu: Added an Export Backup menu item.

	* glom/libglom/connectionpool_backends/postgres_central.[h|cc]:
	* glom/libglom/connectionpool_backends/postgres_self.[h|cc]: Moved
    m_host and m_port into the base class:
	* glom/libglom/connectionpool_backends/postgres.[h|cc]:
    because they are used in both derived classes. Therefore remove port
    parameter from attempt_connect().
    Also move get_path_to_postgres_executable() and port_as_string() there
    so they can be used in the base class.

2010-06-29  Murray Cumming  <murrayc@murrayc.com>

	Improve stderr message.

	* glom/libglom/spawn_with_feedback.cc:
    execute_command_line_and_wait_until_second_command_returns_success():
    Correct the error message when a command (such as postgres) fails. As
    noticed in bug #617504.

2010-06-21  David King  <amigadave@amigadave.com>

	Explicitly link with libdl for Python module loading test

	* Makefile_tests.am: Do not rely on libdl being a dependency of a
	library in LIBGLOM_LIBS, by linking with it explicitly.

2010-06-19  Murray Cumming  <murrayc@murrayc.com>

	Use Gnome::Gda::SqlBuilder::Id

	* glom/base_db.cc:
	* glom/libglom/python_embed/py_glom_relatedrecord.cc:
	* glom/libglom/utils.cc:
	* glom/utility_widgets/db_adddel/glom_db_treemodel.cc: Use the typedef
	instead of guint. It is very lengthy, but it is correct.

2010-06-15  Murray Cumming  <murrayc@murrayc.com>

	Use SqlBuilder::add_field_id() to avoid ambiguity.

	* glom/base_db.cc:
	* glom/base_db_table_data.cc:
	* glom/libglom/db_utils.cc:
	* glom/libglom/privs.cc:
	* glom/libglom/python_embed/py_glom_record.cc:
	* glom/libglom/python_embed/py_glom_relatedrecord.cc:
	* glom/libglom/utils.cc:
	* glom/mode_data/box_data.cc:
	* glom/mode_data/box_data_calendar_related.cc:
	* glom/mode_data/box_data_portal.cc:
	* glom/mode_design/dialog_database_preferences.cc:
	* glom/mode_design/fields/box_db_table_definition.cc:
	* glom/report_builder.cc: Replace use of add_id() with the new add_field_id(),
	which lets us specify the table too.

2010-06-15  Murray Cumming  <murrayc@murrayc.com>

	Adapt to latest libgdamm API.

	* glom/base_db.cc:
	* glom/libglom/db_utils.cc:
	* glom/libglom/python_embed/py_glom_relatedrecord.cc:
	* glom/libglom/utils.cc:
	* glom/utility_widgets/db_adddel/glom_db_treemodel.cc:
	SqlBuilder::add_field_id() was renamed to add_field_value_id(), though I now
	notice that no value is involved when it is used for SELECT queries.