1. 19 Feb, 2006 4 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
    • Josep Puigdemont i Casamajó's avatar
      b66707a5
  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 3 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
    • Clytie Siddall's avatar
      vi.po: Updated Vietnamese translation. · 6b0f9013
      Clytie Siddall authored
      6b0f9013
  6. 13 Feb, 2006 5 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
      Increase version. · 72cc978f
      Murray Cumming authored
      72cc978f
    • Murray Cumming's avatar
      Update NEWS · 01748d7e
      Murray Cumming authored
      01748d7e
    • 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 3 commits
  9. 09 Feb, 2006 5 commits
    • Murray Cumming's avatar
      Increase version. · 899a061b
      Murray Cumming authored
      899a061b
    • 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 11 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
      Update ChangeLog with version. · 4ea32812
      Murray Cumming authored
      4ea32812
    • 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
      Update screenshot · 8740394d
      Murray Cumming authored
      8740394d
    • 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. 01 Feb, 2006 3 commits