1. 19 Feb, 2006 3 commits
    • Murray Cumming's avatar
      on_menu_Mode_Find(): Start the Find mode on the same layout (Details or · d6e61bd9
      Murray Cumming authored
      2006-02-19  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/frame_glom.cc: on_menu_Mode_Find(): Start the Find mode
              on the same layout (Details or List) as the Data mode was in.
              Add a little hack to make sure that we go back into Data mode in List
              view at first, to make sure that the first result will show up
              properly in the Details mode.
              * glom/mode_data/notebook_data.cc:
              * glom/mode_data/notebook_data.h: Added set_current_view().
              * glom/mode_find/notebook_find.cc:
              * glom/mode_find/notebook_find.h: Added set_current_view().
      d6e61bd9
    • Murray Cumming's avatar
      scale(): Call Gtk::Image::get_storage_type() before · a56c4b1d
      Murray Cumming authored
      2006-02-19  Murray Cumming, <murrayc@murrayc.com>
      
              * glom/utility_widgets/imageglom.cc: scale(): Call Gtk::Image::get_storage_type()
              before Gtk::Image::get_pixbuf(), to avoid a critical warning.
      a56c4b1d
    • Murray Cumming's avatar
      Overried on_expose_event() so we can scale the image when we actually have · 7007f055
      Murray Cumming authored
      2006-02-19  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/utility_widgets/imageglom.cc:
              * glom/utility_widgets/imageglom.h: Overried on_expose_event() so we can
              scale the image when we actually have a real (>1) allocation.
              scale(): Do not call set_image() if the scaled pixbuf has exactly the same
              dimensions as the existing image. And do not try to scale the image if the
              allocation is very small, because this will generally fail. This fixes the
              disappearing image problem.
      7007f055
  2. 18 Feb, 2006 1 commit
    • Murray Cumming's avatar
      Added get_has_to_table(), for performance, to avoid string copying. · dfd4f8c3
      Murray Cumming authored
      2006-02-18  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/relationship.cc:
              * glom/data_structure/relationship.h: Added get_has_to_table(), for
              performance, to avoid string copying.
              * glom/utils.cc: build_sql_select_with_where_clause(): Add to_table to the
              FROM list for non-key-linked relationships. libpq adds the implicit FROM if we
              do not do this, but it prints a warning on stdout.
              * glom/mode_data/dialog_layout_list_related.cc: on_combo_relationship_changed():
              Clear the list of fields when the relationship changes, so that there are no
              invalid fields.
      dfd4f8c3
  3. 17 Feb, 2006 2 commits
    • Murray Cumming's avatar
      get_translatable_items(): Return the CustomTitles of LayoutItem_Fields. · aaaa9ac5
      Murray Cumming authored
      2006-02-17  Murray Cumming,  <murrayc@murrayc.com>
      
              * glom/document/document_glom.cc: get_translatable_items(): Return the CustomTitles of
              LayoutItem_Fields.
              * glom/translation/window_translations.cc: load_from_document(): Do not try to get the
              custom titles here, because get_translatable_items() gets them instead.
      aaaa9ac5
    • Murray Cumming's avatar
      New translatable item, for use when layout items can optionally have · e13a121a
      Murray Cumming authored
      2006-02-17  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/layout/Makefile.am:
              * glom/data_structure/layout/custom_title.cc:
              * glom/data_structure/layout/custom_title.h: New translatable
              item, for use when layout items can optionally have special
              titles, when the default (such as Street for contacts::address_street),
              is not appropriate.
              * glom/data_structure/layout/layoutitem_field.cc:
              * glom/data_structure/layout/layoutitem_field.h: Add get/set_title_custom().
              * glom/data_structure/translatable_item.cc:
              * glom/data_structure/translatable_item.h: Add new item type and name.
              * glom/document/document_glom.cc: load_after_layout_item_field(),
              save_before_layout_item_field(): Load/Save the custom_title of
              LayoutItem_Field items.
              * glom/glom.glade: dialog_layout_field_properties.
              * glom/layout_item_dialogs/dialog_field_layout.cc:
              * glom/layout_item_dialogs/dialog_field_layout.h: Add widgets to allow
              a custom title.
              * glom/translation/window_translations.cc: load_from_document():
              Add the custom titles to the list.
              * glom/utility_widgets/datawidget.cc: on_menupopup_activate_layout():
              Save the new field properties, instead of replacing the whole item,
              so that the document gets the new information. Makes this work again.
      e13a121a
  4. 16 Feb, 2006 1 commit
    • Murray Cumming's avatar
      Do not show the Triggered By information if there are not linking key · f7fdb721
      Murray Cumming authored
      2006-02-16  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/combobox_relationship.cc: Do not show the
              Triggered By information if there are not linking key
              fields for a relationship.
              * glom/document/document_glom.cc:
              * glom/document/document_glom.h: get_relationships():
              Optionally also return the extra System Properties
              relationship.
              get_relationship(): Return the extra System Properties
              relationship if it is asked for by name, even though it
              is not saved in the document.
              * glom/mode_data/dialog_choose_field.cc: Show the extra
              System Properties relationship too.
              * po/POTFILES.in: Added document_glom.cc
      f7fdb721
  5. 14 Feb, 2006 2 commits
    • Murray Cumming's avatar
      Added get_has_fields() to identify relationships that actually link fields · 7d7466fe
      Murray Cumming authored
      2006-02-14  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/relationship.cc:
              * glom/data_structure/relationship.h: Added
              get_has_fields() to identify relationships that
              actually link fields in tables.
              * glom/mode_data/box_data_list_related.cc: init_db_details(),
              fill_from_database(): Get all rows (with no where clause) if the
              relationship does not specify linking fields.
              * glom/mode_design/box_db_table_relationships.cc:
              * glom/utils.cc: build_sql_select_with_where():
              If a related field's relationship doesn't specify
              linking fields, don't attempt a JOIN.
      7d7466fe
    • Murray Cumming's avatar
      Code style uniformity: Change strTableName to table_name and · 7cb65fee
      Murray Cumming authored
      2006-02-14  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/base_db.cc:
              * glom/box_db_table.cc:
              * glom/box_db_table.h:
              * glom/box_reports.cc:
              * glom/document/document_glom.cc:
              * glom/document/document_glom.h:
              * glom/frame_glom.cc:
              * glom/frame_glom.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_related.cc:
              * glom/mode_data/notebook_data.cc:
              * glom/mode_data/notebook_data.h:
              * glom/mode_design/box_db_table_relationships.cc:
              * glom/mode_design/dialog_design.cc:
              * glom/mode_design/dialog_design.h:
              * glom/mode_design/dialog_fields.cc:
              * glom/mode_design/dialog_fields.h:
              * glom/mode_design/dialog_relationships.cc:
              * glom/mode_design/dialog_relationships.h:
              * glom/mode_design/fields/box_db_table_definition.cc:
              * glom/mode_find/box_data_details_find.cc:
              * glom/mode_find/notebook_find.cc:
              * glom/mode_find/notebook_find.h:
              * glom/utils.cc: Code style uniformity: Change
              strTableName to table_name and strWhereClause to
              where_clause.
      7cb65fee
  6. 13 Feb, 2006 3 commits
    • Murray Cumming's avatar
      Added get_empty_value_suitable_for_python(). get_record_field_values(): · da305f13
      Murray Cumming authored
      2006-02-13  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/glomconversions.cc:
              * glom/data_structure/glomconversions.h: Added
              get_empty_value_suitable_for_python().
              * glom/mode_data/box_data.cc: get_record_field_values():
              Get full set of suitable empty values if there is no primary key,
              and replace null values with suitable non-null empty values, with
              get_empty_value_suitable_for_python(). This avoids warnings on the
              command line when adding records.
      da305f13
    • Murray Cumming's avatar
      Added get/set_script(). load_after_layout_group(), · a2105501
      Murray Cumming authored
      2006-02-13  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/layout/layoutitem_button.cc:
              * glom/data_structure/layout/layoutitem_button.h:
              Added get/set_script().
              * glom/document/document_glom.cc: load_after_layout_group(),
              save_before_layout_group(): Load/Save the scripts for buttons.
              * glom/utility_widgets/buttonglom.cc:
              * glom/utility_widgets/flowtablewithfields.cc:
              * glom/utility_widgets/flowtablewithfields.h:
              * glom/mode_data/box_data_details.cc:
              * glom/mode_data/box_data_details.h: Handle button clicks and
              run the python code.
              * glom/glom.glade: Add a script editing dialog.
              * glom/mode_data/dialog_layout_details.cc:
              * glom/mode_data/dialog_layout_details.h: on_button_edit():
              Allow editing of buttons and start editing of the title column
              if the item is a group.
              * glom/mode_design/Makefile.am:
              * glom/mode_design/dialog_buttonscript.cc:
              * glom/mode_design/dialog_buttonscript.h: Added button script
              editing dialog.
              * glom/python_embed/glom_python.cc:
              * glom/python_embed/glom_python.h: Added
              glom_execute_python_function_implementation() because we buttons
              do not care about the result.
              * examples/example_smallbusiness.glom: Add a Test Button to the
              Contacts layout, with a pygtk hello world script behind it.
      a2105501
    • Murray Cumming's avatar
      Give it a translatable item type and name so it shows up properly in the · da082c16
      Murray Cumming authored
      2006-02-13  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/layout/layoutitem_button.cc:
              * glom/data_structure/translatable_item.cc:
              * glom/data_structure/translatable_item.h: Give it a
              translatable item type and name so it shows up properly in the
              translations list.
              * glom/document/document_glom.cc: save_before_layout_item_field():
              Load the sequence number of child items. It was pure luck that this
              worked sometimes without this.
              * glom/document/document_glom.h:
              * glom/mode_data/dialog_layout_details.cc: on_button_*(): Set m_modified,
              so that all changes are always saved. I am surprised that this worked before.
              on_cell_data_name(): Mark buttons as such.
              on_cell_data_title(): Allow button titles to be edited.
              * glom/utility_widgets/flowtablewithfields.cc:
              add_button_at_position(): Set the button title and really show the widget.
      da082c16
  7. 12 Feb, 2006 1 commit
    • Murray Cumming's avatar
      Add Button layout item. Details Layout: Put the Add buttons vertically at · 08b0d94f
      Murray Cumming authored
      2006-02-12  Murray Cumming  <murrayc@murrayc.com>
      
              * po/POTFILES.in:
              * glom/Makefile.am:
              * glom/data_structure/layout/Makefile.am:
              * glom/data_structure/layout/layoutitem_button.cc:
              * glom/data_structure/layout/layoutitem_button.h: Add Button
              layout item.
              * glom/glom.glade: Details Layout:
              Put the Add buttons vertically at the right-hand side Add
              an Add Button button.
              * glom/mode_data/treestore_layout.cc:
              * glom/mode_data/treestore_layout.h:
              * glom/mode_data/dialog_layout_details.h:
              * glom/mode_data/dialog_layout_details.cc:
              Use the LayoutItems only in the model, simplifying this
              dramatically, and making it easier to add new types of
              layout items.
              * glom/utility_widgets/Makefile.am:
              * glom/utility_widgets/buttonglom.cc:
              * glom/utility_widgets/buttonglom.h: Add a (non yet useful)
              button widget.
      08b0d94f
  8. 10 Feb, 2006 1 commit
    • Murray Cumming's avatar
      on_document_load(): When saving from an example, do not open the Save As · e2627b7d
      Murray Cumming authored
      2006-02-10  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/application.cc: on_document_load(): When saving from an
              example, do not open the Save As dialog box in the examples directory,
              because it is usually read-only and it is not a wise place to put your
              own stuff. Also see the latest Bakery 2.3.17 for fixes to prevent Save As
              in read-only paths.
      e2627b7d
  9. 09 Feb, 2006 4 commits
    • Murray Cumming's avatar
      Added remove_relationship(), to remove any child items that use the · cfaab469
      Murray Cumming authored
      2006-02-09  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/layout/layoutgroup.cc:
              * glom/data_structure/layout/layoutgroup.h:
              Added remove_relationship(), to remove any
              child items that use the relationship.
              * glom/document/document_glom.cc:
              remove_relationship(): Also remove any layout or report
              parts that use the relationship.
      cfaab469
    • Murray Cumming's avatar
      Added remove_field(). · f37add36
      Murray Cumming authored
      2006-02-09  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/layout/layoutgroup.cc:
              * glom/data_structure/layout/layoutgroup.h: Added remove_field().
              * glom/document/document_glom.cc:
              * glom/document/document_glom.h: Added remove_field().
              * glom/mode_design/fields/box_db_table_definition.cc:
              on_adddel_delete(): Call Document_Glom::remove_field() to prevent
              a crash when deleting a field that is used on a layout.
      f37add36
    • Murray Cumming's avatar
      get_lookup_value(): Convert the key field value, in case the · b6d68b5e
      Murray Cumming authored
      2006-02-09  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/mode_data/box_data.cc: get_lookup_value():
              Convert the key field value, in case the relationship's keys
              have different types.
      b6d68b5e
    • Murray Cumming's avatar
      save_to_document(): Actually add new relationships. · 048ed603
      Murray Cumming authored
      2006-02-09  Murray Cumming, <murrayc@murrayc.com>
      
              * glom/mode_design/box_db_table_relationships.cc:
              save_to_document(): Actually add new relationships.
      048ed603
  10. 08 Feb, 2006 9 commits
    • Murray Cumming's avatar
      Added convert_value(), which attemps to convert between differing value · 41d8e0d9
      Murray Cumming authored
      2006-02-09  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/glomconversions.cc:
              * glom/data_structure/glomconversions.h: Added convert_value(),
              which attemps to convert between differing value types if
              necessary.
              * glom/mode_data/box_data_details.cc:  do_lookups():
              * glom/mode_data/box_data_list.cc: do_lookups(): Use
              convert_value() to avoid errors when looking up a value from
              a field with a different field type.
      |
      41d8e0d9
    • Murray Cumming's avatar
      get_title(): Really fall back to related translations. For instance, if · 44489c2f
      Murray Cumming authored
      2006-02-08  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/translatable_item.cc: get_title(): Really
              fall back to related translations. For instance, if you are in
              the German (Austria) locale, and there is no German (Austria)
              translation for a title, but there is one for German (Germany),
              use it.
      44489c2f
    • Murray Cumming's avatar
      set_translation_original_locale(): Mark the document as modified so that · aadecbe6
      Murray Cumming authored
      2006-02-08  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/document/document_glom.cc:
              set_translation_original_locale(): Mark the document
              as modified so that this is saved.
              * glom/glom.glade: Use language everywhere instead of
              locale.
              * glom/translation/Makefile.am:
              * glom/translation/dialog_change_language.h:
              * glom/translation/dialog_identify_original.cc:
              * glom/translation/dialog_identify_original.h: Show the
              locale name, not the ID.
              * glom/translation/dialog_copy_translation.cc:
              * glom/translation/dialog_copy_translation.h:
              * glom/translation/window_translations.cc:
              * glom/translation/window_translations.h: Implement
              original locale identification and translation copying.
      aadecbe6
    • Murray Cumming's avatar
      Constructor: Call TranslatableItem::set_original_locale() so that · f11f53f9
      Murray Cumming authored
      2006-02-08  Murray Cumming <murrayc@murrayc.com>
      
              * glom/document/document_glom.cc: Constructor:
              Call TranslatableItem::set_original_locale() so that
              TranslatableItem::set_title() does the right thing as early
              as possible. This means that the automatically-generated
              table titles will be visible when loading the document.
      f11f53f9
    • Murray Cumming's avatar
      Optimize the operator==() implementations, fixing Field::operator==() · fa7f25b9
      Murray Cumming authored
      2006-02-08  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/field.cc:
              * glom/data_structure/groupinfo.cc:
              * glom/data_structure/numeric_format.cc:
              * glom/data_structure/privileges.cc:
              * glom/data_structure/relationship.cc:
              * glom/data_structure/translatable_item.cc:
              Optimize the operator==() implementations, fixing
              Field::operator==() along the way, so that entered field titles
              when in non-original locales are used as translations for that
              locale.
              * glom/translation/combobox_locale.cc: Constructor:
              Hide the locale IDs because they are not human-readable.
      fa7f25b9
    • Murray Cumming's avatar
      Added get_locale_name(), moving some of get_list_of_locales() into it. · 5df98db8
      Murray Cumming authored
      2006-02-08  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/iso_codes.cc:
              * glom/data_structure/iso_codes.h: Added get_locale_name(),
              moving some of get_list_of_locales() into it.
              * glom/data_structure/translatable_item.cc: get_title():
              If there is no translation then use the first translation with
              the same language (ignoring the country).
              * glom/translation/window_translations.cc: load_from_document():
              Use get_locale_name() to show the (believed) locale of the original
              strings.
              * glom/utils.cc:
              * glom/utils.h: Added locale_language_id() so we can reuse the code.
      5df98db8
    • Murray Cumming's avatar
      Put all field names in quotes too, to avoid crashes when using uppercase · aefb0db0
      Murray Cumming authored
      2006-02-08  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/base_db.cc:
              * glom/dialog_database_preferences.cc:
              * glom/mode_data/box_data.cc:
              * glom/mode_data/box_data_list_related.cc:
              * glom/mode_design/fields/box_db_table_definition.cc:
              * glom/python_embed/python_module/py_glom_relatedrecord.cc:
              * glom/utils.cc: Put all field names in quotes too, to avoid
              crashes when using uppercase characters in field names.
      aefb0db0
    • Murray Cumming's avatar
      Put all table names in quotes in SQL statements, to avoid errors/crashes · 7571a943
      Murray Cumming authored
      2006-02-08  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/base_db.cc:
              * glom/connectionpool.cc:
              * glom/dialog_database_preferences.cc:
              * glom/mode_data/box_data.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_design/fields/box_db_table_definition.cc:
              * glom/mode_design/users/dialog_users_list.cc:
              * glom/navigation/box_tables.cc:
              * glom/python_embed/python_module/py_glom_relatedrecord.cc:
              * glom/utility_widgets/db_adddel/glom_db_treemodel.cc:
              * glom/utils.cc: Put all table names in quotes in SQL statements,
              to avoid errors/crashes when using non-lowercase table names, and SQL keywords
              as table names.
      7571a943
    • Murray Cumming's avatar
      get_list_of_locales(): Instead of just listing languages, get the full · 25b8f797
      Murray Cumming authored
      2006-02-08  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/iso_codes.cc: get_list_of_locales():
              Instead of just listing languages, get the full list of locale IDs from
              /usr/share/i18n/locales/ (hopefully this works everywhere. If not, let's
              have some configure.in stuff), and build the locale name from the language
              part and country part. So it now also parses iso_3166.xml from iso-codes
              to get translated country names.
              * glom/utils.cc:
              * glom/utils.h: Added locale_simplify() so we can ignore weird parts of
              locale IDs.
              * glom/data_structure/translatable_item.cc: get_current_locale(): Return
              a locale instead of just a language.
              * glom/translation/combobox_locale.cc: Try (unsuccessfully) to align the
              second column. Sort it by name.
              * glom/translation/window_translations.cc: load_from_document(): Prevent
              a crash when the document is 0.
      25b8f797
  11. 07 Feb, 2006 1 commit
    • Murray Cumming's avatar
      Use string_escape_underscores when building the reports and tables menus. · 570d20b7
      Murray Cumming authored
      2006-02-07  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/application.cc: Use string_escape_underscores when building
              the reports and tables menus.
              * glom/utility_widgets/adddel/adddel.cc:
              * glom/utility_widgets/adddel/adddel.h:
              * glom/utility_widgets/db_adddel/db_adddel.cc:
              * glom/utility_widgets/db_adddel/db_adddel.h:
              * glom/utils.cc:
              * glom/utils.h: Move string_escape_underscores() to here.
      570d20b7
  12. 27 Jan, 2006 2 commits
    • Murray Cumming's avatar
      Add German translations. Avoid a null-sharedptr crash when doing a Save As · 9a8fe32e
      Murray Cumming authored
      2006-01-27  Murray Cumming  <murrayc@murrayc.com>
      
              * examples/example_smallbusiness.glom: Add German translations.
              * glom/navigation/box_tables.cc: Avoid a null-sharedptr crash when
              doing a Save As Example.
      9a8fe32e
    • Murray Cumming's avatar
      Use LayoutItems via sharedptr so we can translate the titles of groups, · 71da2f31
      Murray Cumming authored
      2006-01-27  Murray Cumming  <murrayc@murrayc.com>
      
              * Many: Use LayoutItems via sharedptr so we can translate the titles of
              groups, portals, and report parts. LayoutItems are now created during
              document loading, and by layout editing dialogs, but then just shared by the
              various widgets. This means that we no longer need to rebuild the whole layout
              from the widgets when a widget is changed - it is just shared, so we just
              mark the document as modified.
      71da2f31
  13. 26 Jan, 2006 1 commit
  14. 25 Jan, 2006 4 commits
    • Murray Cumming's avatar
      Reuse the Translations window, so it shows the last-used locale when shown · a8d379f5
      Murray Cumming authored
      2006-01-25  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/application.cc: Reuse the Translations window, so it shows the
              last-used locale when shown again.
      a8d379f5
    • Murray Cumming's avatar
      Use Report via sharedptr<> so that Report title translations are used. · 984745c5
      Murray Cumming authored
      2006-01-25  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/application.cc:
              * glom/base_db.cc:
              * glom/base_db.h:
              * glom/box_reports.cc:
              * glom/box_reports.h:
              * glom/dialog_layout_report.cc:
              * glom/dialog_layout_report.h:
              * glom/document/document_glom.cc:
              * glom/document/document_glom.h:
              * glom/frame_glom.cc:
              * glom/mode_data/box_data_list.cc:
              * glom/translation/window_translations.cc: Use Report via
              sharedptr<> so that Report title translations are used.
      984745c5
    • Murray Cumming's avatar
      Use TableInfo via sharedptr<> so that Table title translations are used. · 54f3ca24
      Murray Cumming authored
      2006-01-25  Murray Cumming  <murray@murrayc.com>
      
              * glom/application.cc:
              * glom/base_db.cc:
              * glom/base_db.h:
              * glom/dialog_database_preferences.cc:
              * glom/document/document_glom.cc:
              * glom/document/document_glom.h:
              * glom/glom.glade:
              * glom/mode_design/users/dialog_groups_list.cc:
              * glom/mode_design/users/dialog_users_list.cc:
              * glom/navigation/box_tables.cc:
              * glom/navigation/box_tables.h:
              * glom/relationships_overview/relationships_canvas.cc:
              * glom/relationships_overview/table_canvasitem.cc:
              * glom/relationships_overview/table_canvasitem.h:
              * glom/translation/window_translations.cc: Use TableInfo via
              sharedptr<> so that Table title translations are used.
      54f3ca24
    • Murray Cumming's avatar
      Copy m_title (the original) in copy constructor and operator=(). This · 91b2ebf2
      Murray Cumming authored
      2006-01-24  Murray Cumming  <murray@murrayc.com>
      
              * glom/data_structure/translatable_item.h: Copy m_title
              (the original) in copy constructor and operator=(). This makes
              the table titles show up again and be saved.
              * glom/document/document_glom.cc:
              * glom/document/document_glom.h: Save/load titles in
              load_after_translations() and save_before_translations() instead
              of separately.
              * glom/sharedptr.h: Added cast_dynamic<>, cast_static<>, and
              cast_const<>, based on RefPtr.
              * glom/glom.glade:
              * glom/translation/Makefile.am:
              * glom/translation/combobox_locale.cc:
              * glom/translation/combobox_locale.h: Added set_locale().
              * glom/application.cc:
              * glom/application.h:
              * glom/translation/dialog_change_language.cc:
              * glom/translation/dialog_change_language.h: New dialog
              used to choose a language to test temporarily.
              * po/POTFILES.in: Added dialog_change_language.cc.
      91b2ebf2
  15. 24 Jan, 2006 1 commit
    • Murray Cumming's avatar
      Added a new base class for all items that have a non-translated ID name · 83a58d5f
      Murray Cumming authored
      2006-01-24  Murray Cumming  <murray@murrayc.com>
      
              * glom/data_structure/translatable_item.cc:
              * glom/data_structure/translatable_item.h: Added a new
              base class for all items that have a non-translated ID name and
              a translated title. This base class has a map of translated titles
              for locales.
              * glom/document/document_glom.cc:
              * glom/document/document_glom.h: Added load_after_translations()
              and save_before_translations() and used it for fields, reports,
              tables, and layout items, so these XML nodes get a translations
              node if they have any translations.
              * glom/application.cc:
              * glom/base_db.cc:
              * glom/box_reports.cc:
              * glom/data_structure/Makefile.am:
              * glom/data_structure/field.cc:
              * glom/data_structure/field.h:
              * glom/data_structure/groupinfo.cc:
              * glom/data_structure/groupinfo.h:
              * glom/data_structure/layout/layoutgroup.cc:
              * glom/data_structure/layout/layoutgroup.h:
              * glom/data_structure/layout/layoutitem.cc:
              * glom/data_structure/layout/layoutitem.h:
              * glom/data_structure/relationship.cc:
              * glom/data_structure/relationship.h:
              * glom/data_structure/report.cc:
              * glom/data_structure/report.h:
              * glom/data_structure/tableinfo.cc:
              * glom/data_structure/tableinfo.h:
              * glom/dialog_database_preferences.cc:
              * glom/dialog_layout_report.cc:
              * glom/mode_data/box_data_details.cc:
              * glom/mode_data/box_data_list.cc:
              * glom/mode_data/dialog_layout_details.cc:
              * glom/mode_design/users/dialog_groups_list.cc:
              * glom/navigation/box_tables.cc:
              * glom/utility_widgets/flowtablewithfields.cc: Use the base class
              API, removing superfluous API.
              * glom/translation/window_translations.cc:
              * glom/translation/window_translations.h: Store sharedptr<TranslatableItem>
              in the tree model.
              * po/POTFILES.in: Added the new files.
      83a58d5f
  16. 23 Jan, 2006 4 commits
    • Murray Cumming's avatar
      Just store a const reference (sharedptr) to the Field, instead of copying · 6b24c01f
      Murray Cumming authored
      2006-01-23  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/layout/layoutitem_field.cc:
              * glom/data_structure/layout/layoutitem_field.h:
              Just store a const reference (sharedptr) to the
              Field, instead of copying it.
      6b24c01f
    • Murray Cumming's avatar
      Remove set_full_field_data_empty(). Instead, allow the field cache to be · 0d00e351
      Murray Cumming authored
      2006-01-23  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/data_structure/layout/layoutitem_field.cc:
              * glom/data_structure/layout/layoutitem_field.h:
              Remove set_full_field_data_empty(). Instead, allow
              the field cache to be null and use m_name when
              there is no full data. Use a bool to mark when the
              cache is up-to-date, and do no try to use it when it
              is not up-to-date.
              * glom/mode_data/dialog_layout_details.cc:
              * glom/utils.cc: build_sql_select_with_where_clause():
              Cope with fields with no names, in case that happens.
              * glom/document/document_glom.cc:
              * glom/document/document_glom.h: load_after_layout_item_field()
              and load_after_layout_item_field_formatting(): These functions
              now take the field type, and the table name that can be used to
              discover the field type if necessary. This is necessary in order
              to interperet default values and choices.
      0d00e351
    • Murray Cumming's avatar
      on_adddel_add(): Call on_adddel_changed() to save the guessed title into · b360ea6d
      Murray Cumming authored
      2006-01-23  Murray Cumming  <murrayc@murrayc.com>
      
              * glom/mode_design/fields/box_db_table_definition.cc:
              on_adddel_add(): Call on_adddel_changed() to save the
              guessed title into the document, even when the title is
              not edited by the user.
      b360ea6d
    • Murray Cumming's avatar
      Use Field via sharedptr<Field>, to avoid unnecessary copying. However, · d34cea46
      Murray Cumming authored
      2006-01-23  Murray Cumming <murrayc@murrayc.com>
      
              * Many files: Use Field via sharedptr<Field>, to
              avoid unnecessary copying. However, LayoutItem_Field still
              copies it for now, to avoid conflicts.
              * glom/sharedptr.h: Various improvements, particularly to
              the nonconst->const cast, based on Glib::RefPtr.
      d34cea46