0.8.23: 2005-04-23 Murray Cumming * glom/utility_widgets/comboentryglom.cc: * glom/utility_widgets/comboentryglom.h: * glom/utility_widgets/comboglomchoicesbase.cc: * glom/utility_widgets/datawidget.cc: Actually use the Combo* constructors that take a second LayoutItem_Field column. 2005-04-23 Murray Cumming * glom/mode_data/dialog_layout_details.cc: on_button_add_field(): Make fields editable by default. 2005-04-23 Murray Cumming * glom/base_db.cc: * glom/base_db.h: * glom/box_db_table.cc: * glom/box_db_table.h: * glom/dialog_invalid_data.cc: * glom/dialog_invalid_data.h: * glom/mode_data/box_data.cc: * glom/mode_data/box_data.h: * glom/mode_data/box_data_details.cc: * glom/mode_data/box_data_details.h: * glom/mode_data/box_data_list.cc: * glom/mode_data/box_data_list.h: * glom/mode_data/box_data_list_related.cc: * glom/mode_data/box_data_list_related.h: * glom/mode_data/notebook_data.cc: * glom/mode_find/box_data_details_find.cc: * glom/mode_find/box_data_list_find.cc: * glom/utility_widgets/adddel/adddel.cc: * glom/utility_widgets/comboentryglom.cc: * glom/utility_widgets/db_adddel/db_adddel.cc: * glom/utility_widgets/entryglom.cc: * glom/utility_widgets/flowtablewithfields.cc: Rename fill_from_database_layout() to create_layout(), refresh_db_details() to refresh_data_from_database() and describe how these and the other 2 methods work together in the class documentation for Box_Data. 2005-04-23 Murray Cumming * glom/box_db_table.cc: * glom/box_db_table.h: Remove fill_fields(). It has no use here. Its equivalent is the new fill_database_layout() in Box_Data, a derived class. * glom/mode_data/box_data.cc: * glom/mode_data/box_data.h: Add virtual fill_database_layout() so the derived implementations can be called from init_db_details(). * glom/mode_data/box_data_details.cc: fill_database_layout() is now called by the base class, at the appropriate time, so we do not need to call it from fill_database(). refresh_db_details(): Call fill_from_database() instead of init_db_details() so we do not unnecessarily rebuild the whole layout UI. * glom/mode_data/box_data_list.cc: * glom/mode_data/box_data_list.h: fill_fields(): Rename to fill_database_layout(), which is now called from the base class. fill_from_database(): Do not call fill_fields/ fill_database_layout() unnecessarily here. * glom/mode_data/notebook_data.cc: * glom/mode_data/notebook_data.h: Rename on_Details_user_requested_details() to on_list_user_requested_details() because that it is a signal on list, not details. * glom/mode_design/fields/box_db_table_definition.cc: fill_from_database(): Call fill_fields() because the base class does not call it anymore. * glom/utility_widgets/flowtablewithfields.cc: add_layout_item_at_position(). When adding a Box_Data_List_Related portal, call add_view() before init_db_details() because the latter needs the document. 2005-04-22 Murray Cumming * glom/mode_data/box_data_list.cc: Add the DbAddDel as a view with add_view(), so it has the document. * glom/utility_widgets/cellrendererlist.cc: * glom/utility_widgets/cellrendererlist.h: Handle the editing_started signal to add the second column. * glom/utility_widgets/db_adddel/db_adddel.cc: * glom/utility_widgets/db_adddel/db_adddel.h: Fill the second choices column of the CellRendererList. 2005-04-22 Murray Cumming * glom/data_structure/glomconversions.cc: Added some warnings for when relationships are unexpectedly empty. * glom/data_structure/layout/layoutitem_field.cc: get_has_choices(). Return false if the choices information is empty, so we have no empty dropdown menus. * glom/data_structure/layout/layoutitem_portal.cc: * glom/data_structure/layout/layoutitem_portal.h: Store the whole Relationship information here. * glom/document/document_glom.cc: * glom/document/document_glom.h: Use a more explicit data structure for layouts, clearly marking related (portal) layouts. update_relationships(): Update related (portal) layouts too. * glom/mode_data/dialog_layout_list_related.cc: on_button_formatting(): Specify the correct table name, so we get choices from the related table, not the parent table. 2005-04-22 Murray Cumming * glom/glom.glade: * glom/mode_data/dialog_layout_details.cc: * glom/mode_data/dialog_layout_details.h: * glom/mode_data/treestore_layout.h: Details Layout: Add a Formatting button, because I can not yet implement a context menu for a GtkComboBox, and because nothing should be available only via a context menu anyway. 2005-04-22 Murray Cumming * glom/Makefile.am: * glom/utility_widgets/Makefile.am: * glom/utility_widgets/adddel/Makefile.am: * glom/utility_widgets/adddel/adddel.cc: * glom/utility_widgets/adddel/cellrendererlist.cc: * glom/utility_widgets/adddel/cellrendererlist.h: Move cellrendererlist out of adddel into utlity_widgets, because it is also used by DbAddDel. * glom/utility_widgets/cellrendererlist.cc: * glom/utility_widgets/cellrendererlist.h: * glom/utility_widgets/comboentryglom.cc: * glom/utility_widgets/comboentryglom.h: * glom/utility_widgets/comboglomchoicesbase.cc: * glom/utility_widgets/comboglomchoicesbase.h: Add ComboGlom and ComboGlomChoicesBase which is a base class for ComboGlom and ComboEntryGlom. * glom/utility_widgets/datawidget.cc: Use ComboGlom instead of ComboEntryGlom when the choices should be restricted. * glom/utility_widgets/db_adddel/db_adddel.cc: Restrict the choices when specified, using CellRendererCombo::property_has_entry(). 2005-04-21 Murray Cumming * examples/example_smallbusiness.glom: Add drop down choices for name_title. * glom/data_structure/field.h: * glom/data_structure/glomconversions.cc: get_text_for_gda_value(): Prevent use of values that do not have the expected type. * glom/document/document_glom.cc: * glom/document/document_glom.h: Added get/set_attribute_value_as_value() for convenience. load_after(), save_before(): load/save the custom choices. * glom/mode_data/dialog_field_layout.cc: * glom/mode_data/dialog_field_layout.h: Really save/load the custom choices, by storing and using the correct column index. 2005-04-21 Murray Cumming * glom/data_structure/glomconversions.cc: * glom/data_structure/glomconversions.h: Add get_choice_values(), with code moved from DataWidget. * glom/utility_widgets/datawidget.cc: * glom/utility_widgets/db_adddel/db_adddel.cc: Use a CellRendererCombo on the List view, if the field layout has choices. However, it only shows the first column so far. * glom/base_db.cc: * glom/box_db.cc: * glom/dialog_connection.cc: * glom/dialog_connection.h: * glom/document/document_glom.cc: * glom/document/document_glom.h: * glom/frame_glom.cc: * glom/main.cc: * glom/mode_data/box_data_details.cc: * glom/mode_data/box_data_list.cc: * glom/mode_data/box_data_list_related.cc: * glom/mode_data/dialog_field_layout.cc: * glom/mode_data/dialog_layout.cc: * glom/mode_data/dialog_layout.h: * glom/mode_data/dialog_layout_details.cc: * glom/mode_data/dialog_layout_list.cc: * glom/mode_data/dialog_layout_list_related.cc: * glom/mode_design/box_db_table_relationships.cc: * glom/mode_find/box_data_details_find.cc: * glom/navigation/box_tables.cc: Use get_document() from the View base class instead of another member variable. Use add_view() and remove_view() in some more places. 2005-04-21 Murray Cumming * glom/document/document_glom.cc: * glom/document/document_glom.h: Added update_cache_relationship() and call it from set_relationship() and load_after() instead of filling-in relationship details along the way. * glom/mode_design/fields/dialog_fielddefinition.cc: * glom/utility_widgets/comboentryglom.cc: * glom/utility_widgets/comboentryglom.h: * glom/utility_widgets/datawidget.cc: * glom/utility_widgets/datawidget.h: * glom/utility_widgets/flowtablewithfields.cc: Show data from the second related field in the drop down choice. 2005-04-21 Murray Cumming * examples/example_smallbusiness.glom: Invoice details: Added choice of contacts dropdown. * glom/data_structure/glomconversions.cc: util_trim(): reverse iterate from rbegin to rend, not the other way around. This avoids accessing invalid memory too. * glom/data_structure/layout/layoutitem_field.cc: * glom/data_structure/layout/layoutitem_field.h: Add members and methods for choices drop-downs. * glom/document/document_glom.cc: Load/Save the choices details for LayoutItem_Fields. * glom/glom.glade: * glom/main.cc: * glom/mode_data/box_data.h: * glom/mode_data/box_data_details.cc: * glom/mode_data/box_data_list.cc: * glom/mode_data/dialog_choose_relationship.cc: * glom/mode_data/dialog_choose_relationship.h: * glom/mode_data/dialog_field_layout.cc: * glom/mode_data/dialog_field_layout.h: * glom/mode_data/dialog_layout.h: * glom/mode_data/dialog_layout_details.cc: * glom/mode_data/dialog_layout_list.cc: * glom/mode_data/dialog_layout_list_related.cc: * glom/utility_widgets/Makefile.am: * glom/utility_widgets/adddel/adddel.cc: * glom/utility_widgets/adddel/adddel.h: * glom/utility_widgets/adddel/adddel_withbuttons.cc: * glom/utility_widgets/adddel/adddel_withbuttons.h: * glom/utility_widgets/comboentryglom.cc: * glom/utility_widgets/comboentryglom.h: * glom/utility_widgets/datawidget.cc: * glom/utility_widgets/datawidget.h: * glom/utility_widgets/entryglom.cc: * glom/utility_widgets/entryglom.h: * glom/utility_widgets/flowtablewithfields.cc: * glom/utility_widgets/layoutwidgetbase.cc: * glom/utility_widgets/layoutwidgetbase.h: In the Layout Properties dialog, show a second tab for choices, either a custom list or a list from a related record. Only works on Details so far. * glom/frame_glom.cc:on_menu_developer_users(), * glom/mode_data/box_data_list_related.cc: destructor, * glom/mode_data/box_data.cc: destructor, Call remove_view() before deleting the dialog. 2005-04-19 Murray Cumming * glom/mode_data/box_data.cc: * glom/mode_data/box_data.h: Add m_TableFields and fill it in fill_database(), as a cache instead of repeatedly getting it from the document. get_lookup_fields(), get_calculated_fields(), * glom/mode_data/box_data_details.cc: recalculate_fields_for_related_records(), Examine all table fields, via m_TableFields, instead of just shown fields. 2005-04-19 Murray Cumming * glom/application.cc: * glom/box_db_table.cc: * glom/document/document_glom.cc: * glom/frame_glom.cc: * 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_data/box_data_list_related.cc: * glom/mode_find/box_data_details_find.cc: * glom/mode_find/box_data_list_find.cc: * glom/navigation/box_tables.cc: More use of Field methods instead of getting the FieldAttributes and using its methods. This should be more efficient. 2005-04-19 Murray Cumming,,, * glom/data_structure/field.cc: * glom/data_structure/field.h: Add get_primary_key(), get_unique_key(), get_default_value(), etc, so we do not always need to copy the whole FileAttributes member just to get a little information. * glom/mode_design/fields/box_db_table_definition.cc: * glom/mode_design/fields/dialog_fielddefinition.cc: * glom/utility_widgets/db_adddel/db_adddel.cc: * glom/utility_widgets/flowtablewithfields.cc: Use the Field methods instead of getting the FieldAttributes and using its methods. This should be more efficient. 0.8.22: