1.0.4: 2006-05-21 Murray Cumming * examples/example_smallbusiness.glom: Contacts reports: Restore the group-by fields. I wonder why these were lost. 2006-05-21 Murray Cumming * glom/base_db.cc: report_build(): Try to catch the exception here, but it still crashes if there is a SQL error during report building. 2006-05-21 Murray Cumming * glom/base_db.cc: report_build_records(): Add a space before LIMIT, to avoid it ever clashing with the ASC before it. 2006-05-21 Murray Cumming * configure.in: Use IT_PROG_INTLTOOL instead of AC_PROG_INTLTOOL for intltool. It is apparently the new way. 2006-05-21 Murray Cumming * glom.desktop.in.in: Remove the .png extension from the icon name, as advised by http://live.gnome.org/GnomeGoals/AppIcon . * glom/mode_design/fields/dialog_fieldcalculation.cc: Remove the [?] * icons/Makefile.am: Add EXTRA_DIST stuff to fix distcheck from the list of dependent relationships. It looks like an errror. 2006-05-21 Murray Cumming * Makefile.am: * configure.in: * glom.png: Removed. We use the stuff in icons/ instead. * icons/Makefile.am: * icons/glom.png: * icons/glom.svg: * icons/glom_icon_large.png: * logo/glom_icon.png: * logo/glom_icon.svg: * logo/glom_icon.xcf: * logo/glom_icon_large.png: Moved files from logo/ to icons/ and used the Makefile snippet from http://live.gnome.org/GnomeGoals/AppIcon . Among other things, this means that the scalable icon is installed. glom.svg: I increased the size of the window shape and removed the database-cylinder shadow to prevent wasted space. glom.png was regenerated from the svg. 2006-05-21 Murray Cumming * logo/glom_icon.svg: Change canvas size to 480x480, so I can use 10px sizes that will be 1px in the 48x48px icon. 2006-05-21 Murray Cumming * logo/glom_icon.svg: Use the Tango color palette, though there is surely more to do to make it a tango icon. 2006-05-20 Murray Cumming * glom/utility_widgets/db_adddel/glom_db_treemodel.cc: refresh_from_database(): Handle Gda exceptions here so we can fail a bit more gracefully. 2006-05-20 Murray Cumming * glom/base_db.cc: get_calculation_fields(): Check the relationships used by the calculation. If a relationship is used, report that the from-field should trigger the calculation. This did not actually need the big changes below, though they might be useful some time. 2006-05-20 Murray Cumming * glom/base_db.cc: * glom/base_db.h: Added predicate_LayoutItemIsEqual class for std::find_if. calculate_field(), set_field_value_in_database(), get_field_value_in_database(), do_calculations(), get_calculated_fields(), get_calculation_fields(), do_lookups(), refresh_related_fields(): Deal in LayoutItem_Field rather than Field, so we can trigger recalculations from related fields. Added LayoutFieldInRecord to replace FieldInRecord in most places. It preserves the parent table information. * glom/libglom/utils.cc: * glom/libglom/utils.h: Added build_sql_select_with_where_clause() and build_sql_select_with_key() that takes lists of non-const LayoutItems. This is annoying, but better than removing const from everywhere else. * glom/mode_data/box_data.cc: * glom/mode_data/box_data.h: * glom/mode_data/box_data_details.cc: * glom/mode_data/box_data_list.cc: * glom/mode_design/fields/dialog_fieldcalculation.cc: Adapted to API changes. 2006-05-20 Murray Cumming * glom/base_db.cc: * glom/base_db.h: Rename get_record_field_values() to get_record_field_values_for_calculation() to make things clearer. * glom/libglom/python_embed/py_glom_related.cc: Related_tp_as_mapping_getitem(): Leave key_value_sqlized as empty if there is no key value to find related records. * glom/libglom/python_embed/py_glom_relatedrecord.cc: PyGlomRelatedRecord_SetRelationship(): Leave key_value_sqlized as null if there is no key value to find related records. RelatedRecord_generic_aggregate(), RelatedRecord_tp_as_mapping_getitem(): Do not try to get related records if the key is empty. This then returns a Py_None when the python calculation tries to get related records. It could test for it, or just let the error cause an overall Py_None return result. * glom/python_embed/glom_python.cc: glom_execute_python_function_implementation: Check whether the result is Py_None. If it is then return a suitable empty value, instead of converting it to a string. * glom/libglom/data_structure/glomconversions.cc: * glom/libglom/data_structure/glomconversions.h: Remove get_empty_value_suitable_for_python(). * glom/mode_data/box_data.cc: * glom/mode_data/box_data_details.cc: Use get_empty_value() instead of get_empty_value_suitable_for_python() because the python calculations (and our code for getting related records from python) do need to know whether non-text fields are empty. 2006-05-19 Murray Cumming * glom/mode_data/box_data.cc: * glom/mode_data/box_data.h: Added virtual set_primary_key_value(), so that record_new() can set the primary key as soon as it has been set in the database. record_new(): Take a row iterator, so we can update the list row. After inserting the record, set the primary key value, and do lookups and refresh-related so that the other row fields update. Return the datamodel. * glom/mode_data/box_data_details.cc: * glom/mode_data/box_data_details.h: Override set_primary_key_value() * glom/mode_data/box_data_list.cc: * glom/mode_data/box_data_list.h: Override set_primary_key_value(). on_adddel_user_added(): Provide the row iterator to record_new() and to on_record_added(). on_record_added(): Take the row iterator * glom/mode_data/box_data_list_related.cc: * glom/mode_data/box_data_list_related.h: on_record_added(): Take the row iterator, to avoid a slow lookup to discover it. 2006-05-15 Murray Cumming * autogen.sh: Use specific versions of aclocal, autoheader, autoconf, and automake, because the default version on Ubuntu Dapper (and probably Debian) does not have AM_PATH_PYTHON(). This should help people not using jhbuild, though I guess it might make life worse for others if those versioned executables are not present. Tell me if it is a problem. 2006-05-07 Murray Cumming * glom/libglom/connectionpool.cc: * glom/libglom/connectionpool.h: connect(): Attempt the connection on both port 5433 and 5432, to make life easier for Ubuntu Dapper users, because it defaults postgres 8.1 to port 5433. Bug #340836 from Paul Schulz. 2006-05-07 Murray Cumming * examples/example_smallbusiness.glom: Invoices: Mark the invoice lines relationship as allowing editing, so that people can actually edit the invoice lines portal. Bug #340919 from Hendrik Richter. 2006-05-07 Murray Cumming * glom/mode_data/box_data_details.cc: refresh_from_database(): Check for a null m_primary_key_field, to prevent a crash when editing the fields so that no field is a primary key. 2006-05-07 Murray Cumming * glom/libglom/data_structure/relationship.cc: * glom/libglom/data_structure/relationship.h: Added clone() methods, though we do not use them yet. * glom/libglom/sharedptr.h: operator==() check for equality, though this did not stop the crash. * glom/mode_data/dialog_choose_relationship.cc: select_item(): If the relationship is null, unselect all items. * glom/mode_data/dialog_layout_details.cc: * glom/mode_data/dialog_layout_details.h: offer_relationship_list(): Optionally take the current relationship as a parameter so that the current one is highlighted in the dialog. Just change the existing portal, instead of setting the portal in the model row, because this causes some kind of memory management confusion that caused a crash, and it is inefficient anyway. Bug #340888 from Hendrik Richter. Call row_changed() to tell the TreeView to update the display. 2006-05-05 Murray Cumming * glom/base_db.cc: * glom/base_db.h: get_fields_for_table_from_database(): Report all primary keys are also being unique, because they all must be. postgres_change_column_extras(): When changing whether a field is a primary key, deal with the fact that the uniqueness was a side-effect of it being a primary key, and do not try to add/drop a non-existant uniqueness constraint, or specify uniqueness with both constraints. Also, use the correct postgres SQL syntax for setting/unsetting whether a field is a primary key. It is very postgres specific. Return a modified version of the field definition, so that callers can display the new field definition correctly, so the constraints can be witnessed by the user. * glom/mode_design/fields/box_db_table_definition.cc: * glom/mode_design/fields/box_db_table_definition.h: on_adddel_changed(): Update the row to show any constraints enforced when changing the field definition. This makes primary keys always unique and unchecks unique when it removes primary key, though uniquness can then be specified separately. * glom/mode_data/box_data_list.cc: get_record_counts(): Avoid a segfault when the model is null, which happens at the moment when there is no primary key. 2006-05-05 Murray Cumming * glom/base_db.cc: postgres_change_column_extras(): Really set/unset the uniqueness constraint. This is very Postgres specific. We should do this with libgda one day, if it can do it. 2006-05-05 Murray Cumming * glom/python_embed/python_module/Makefile.am: Put some stuff in LIBADD instead of LDFLAGS. This seems to work, and seems to be necessary on cygwin. Bug #338844 from Yselkowitz. 2006-05-05 Murray Cumming * glom/utility_widgets/adddel/adddel.cc: on_button_press_event_Popup(): Do not edit on double-click because it is annoying/confusing when the cells are editable on single click as well. This affects the table list, and the field list, all of which have a separate Open/Edit button. 2006-05-05 Murray Cumming * glom/libglom/Makefile.am: Put everything in LIBADD instead of some in LDFLAGS. This seems to work, and seems to be necessary on cygwin. Bug #338844 from Yselkowitz. 2006-05-05 Murray Cumming * Makefile.am: Define ACLOCAL_AMFLAGS so that autoreconf works. Bug #338844 from Yselkowitz. 2006-05-05 Murray Cumming * glom/utility_widgets/flowtablewithfields.cc: Do not make notebook tab titles bold. It gets annoying when there are many tabs, and is not that helpful, as well as being non-HIG. 2006-05-05 Murray Cumming * glom/utility_widgets/flowtablewithfields.cc: * glom/utility_widgets/flowtablewithfields.h: Do not put the labels in Gtk::Alignments. They are not necessary. This should save a little memory and speed. 2006-05-05 Murray Cumming * glom/utility_widgets/flowtable.cc: * glom/utility_widgets/flowtable.h: on_size_allocate(): Give the full max first-item width to first items, instead of just what they request, so that labels can expand and align in the actually-available space, so that xalign is useful. * glom/utility_widgets/flowtablewithfields.cc: add_field_at_position(): Use label xalign and yalign instead of the Gtk::Aligment alignment, because it is not needed. Align labels left, though I previously was trying to align them right. Right alignment is untidy when using groups, because the entries do not line up across groups, and that would be very difficult to implement. The vertical alignment of labels seems to be neater now. 2006-04-30 Murray Cumming * glom/frame_glom.cc: * glom/frame_glom.h: show_table(): init_db_details(): Added optional primary_key_value_for_details parameter. Pass it to show_table(). on_notebook_data_record_details_requested(): Pass the primary key value to show_table() instead of calling show_details() afterwards, so that Glom does not show intermediate layouts. * glom/mode_data/notebook_data.cc: * glom/mode_data/notebook_data.h: Added optional primary_key_value_for_details parameter and show the details layout with this record when it is specified. 2006-04-29 Murray Cumming * glom/mode_data/box_data_details.cc: * glom/mode_data/box_data_list.cc: * glom/mode_data/box_data_list.h: * glom/mode_data/notebook_data.cc: * glom/utility_widgets/db_adddel/db_adddel.cc: * glom/utility_widgets/db_adddel/db_adddel.h: * glom/utility_widgets/db_adddel/db_adddel_withbuttons.cc: Changes select_item() to take a LayoutItem_Field instead of an index, to simplify things. get_view_column_index(): Take the button column into account, so that, for instance, clicking Add on the list view doesn't sometimes activate the button, taking us to the details view instead. 2006-04-29 Murray Cumming * regexxered some method names to all lowercase. 2006-04-29 Murray Cumming * glom/base_db.cc: * glom/base_db.h: Added check_entered_value_for_uniqueness() and get_field_value_is_unique() and get_field_value_in_database(). set_entered_field_data(): Catch exceptions here, and return false, so that the caller can handle errors more easily and more immediately. * glom/mode_data/box_data_details.cc: on_flowtable_field_edited(): * glom/mode_data/box_data_list.cc: on_adddel_user_added(), on_adddel_user_changed(): Warn the user if the new value would not be unique, if it needs to be. This adds a new translatable string, but the new string replaces an untranslated error message from Postgres.