Skip to content
  1. Aug 06, 2010
    • Murray Cumming's avatar
      FieldFormatting: Default to show-all for related choices. · 97b4c484
      Murray Cumming authored
      * glom/libglom/data_structure/layout/fieldformatting.cc:
      97b4c484
    • Murray Cumming's avatar
      Merge branch 'feature_choices_show_all' · 353a8fd5
      Murray Cumming authored
      353a8fd5
    • Murray Cumming's avatar
      Formatting: Add get_choices_related() overload to reduce copy/pasted code. · c9e654f7
      Murray Cumming authored
      * 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.
      c9e654f7
    • Murray Cumming's avatar
      Choices: Fix !show-all lists. · ed1a56b1
      Murray Cumming authored
      	* 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.
      ed1a56b1
    • Murray Cumming's avatar
      Document loading: Show an error dialog even for unexpected errors. · accd90d9
      Murray Cumming authored
      * 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.
      accd90d9
    • Murray Cumming's avatar
      Utils::get_choice_values(): Reduce copy/pasted code. · 734687d2
      Murray Cumming authored
      * 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.
      734687d2
    • David King's avatar
      Minor build system cleanup · 1baf5328
      David King authored
      * 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.
      1baf5328
    • Murray Cumming's avatar
      DbAddDel: Avoid some copy/pasting of code to append items to choices cells. · a170086a
      Murray Cumming authored
      * 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().
      a170086a
  2. Aug 05, 2010
  3. Aug 04, 2010
    • Murray Cumming's avatar
      Simplified some code. · f66c136c
      Murray Cumming authored
      * glom/mode_data/flowtablewithfields.[h|cc]: set_value(), set_other_value():
        Avoid copy/pasting of the code.
      f66c136c
    • Murray Cumming's avatar
      Choices with !show_all: Update the list when the from_field changes. · ca1a71ca
      Murray Cumming authored
      	* 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(): Call
      	refresh_data_from_database_with_foreign_key() on the choice widgets as it
      	already does on the portals, to refresh the list of possible values.
      ca1a71ca
  4. Aug 02, 2010
    • Murray Cumming's avatar
      FlowTableWithFields: Added get_choices_widgets(from_field). · 098bbc62
      Murray Cumming authored
      * 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.
      098bbc62
    • Murray Cumming's avatar
      Minor const changes. · bed4a684
      Murray Cumming authored
      bed4a684
    • Murray Cumming's avatar
      Field Formatting: Related Choices: Add a Show All checkbox. · 86ccc046
      Murray Cumming authored
      * 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.
      86ccc046
  5. Jul 27, 2010
    • Murray Cumming's avatar
      Fix the tests build after the merge. · dee1e2a2
      Murray Cumming authored
      * tests/test_selfhosting_new_empty.cc: Fix the use of Utils::.
      dee1e2a2
    • Murray Cumming's avatar
      Rename libglom-1.14 to libglom-1.16 (parallel-installable) · c32a7a61
      Murray Cumming authored
      * 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.
      c32a7a61
    • Murray Cumming's avatar
      Adapt to recent gtkmm-3.0 API changes. · 793f3757
      Murray Cumming authored
      * glom/bakery/app_withdoc_gtk.cc: Remove use of Gtk::RecentManager::set_limit().
      * glom/dialog_existing_or_new.[h|cc]:
      * glom/frame_glom.[h|cc]:
      * glom/mode_data/notebook_data..[h|cc]:
      * glom/mode_design/report_layout/dialog_layout_report.[h|cc]:
      * glom/notebook_glom.[h|cc]: Replace use of GtkNotebookPage with Gtk::Widget*
      in switch_page signal handlers.
      793f3757
    • Murray Cumming's avatar
      Merge from glom-1-16 · 43c9c134
      Murray Cumming authored
      43c9c134
  6. Jul 25, 2010
  7. Jul 24, 2010
    • Murray Cumming's avatar
      Allow unique fields with same name in multiple tables. · 17dbb39a
      Murray Cumming authored
      * 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).
      17dbb39a
  8. Jul 22, 2010
    • Murray Cumming's avatar
      1.14.4 · a3f76876
      Murray Cumming authored
      1.14.4
      a3f76876
    • Murray Cumming's avatar
      Added --restore command-line option. · 17423eba
      Murray Cumming authored
      * 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.
      17423eba
    • Murray Cumming's avatar
      Added Developer/Restore Backup menu item. · 644a18a6
      Murray Cumming authored
      * 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.
      644a18a6
    • Murray Cumming's avatar
      DTD: Mention the startup_script node. · 9b75d8ae
      Murray Cumming authored
      	* glom/glom_document.dtd: Add the startup_script node, so that
        the examples validate again.
      	* glom/libglom/document/document.cc: set_child_text_node():
        Do not add new empty nodes. This keeps the document smaller.
      9b75d8ae
    • Murray Cumming's avatar
      Saving from a backup: Now works. · c4b46839
      Murray Cumming authored
      * 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.
      c4b46839
  9. Jul 21, 2010
  10. Jul 20, 2010
  11. Jul 13, 2010
  12. Jul 07, 2010
    • Murray Cumming's avatar
      PostgresQL backups: Suggest a dated name. · 53c32d25
      Murray Cumming authored
      * 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.
      53c32d25
    • Murray Cumming's avatar
      PostgreSQL backups: Archive the directory in a .tar.gz.. · c197c88a
      Murray Cumming authored
      * 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.
      c197c88a
    • Murray Cumming's avatar
      PostgreSQL backups: Use .pgpass. · f99ace4a
      Murray Cumming authored
      * 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.
      f99ace4a
  13. Jul 05, 2010
    • Murray Cumming's avatar
      Show progress in the UI during backup saving and restoring. · e1111517
      Murray Cumming authored
      * 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.
      e1111517
  14. Jul 04, 2010
    • Murray Cumming's avatar
      Improve backup saving and add backup restoring. · fe557320
      Murray Cumming authored
      	* 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().
      fe557320