- Aug 06, 2010
-
-
Murray Cumming authored
* glom/libglom/data_structure/layout/fieldformatting.cc:
-
Murray Cumming authored
-
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.
-
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.
-
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.
-
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.
-
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.
-
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().
-
- Aug 05, 2010
-
-
Murray Cumming authored
-
Murray Cumming authored
* glom/libglom/utils.[h|cc]: Added a get_choice_values() overload that takes the foreign_key. * glom/utility_widgets/db_adddel/db_adddel.[h|cc]: Added get_choice_index() to get the affected choice lists when a field value changes. Added refresh_cell_choices_data_from_database_with_foreign_key() to update these lists. set_value(): Use these methods to update choice lists when appropriate, as already happens in the Details view.
-
Murray Cumming authored
* glom/utility_widgets/db_adddel/db_adddel.[h|cc]: get_data_model_column_index(): Add a including_specified_field_layout bool parameter, used in a new set_value() method overload that has a set_specified_field_layout bool parameter. user_changed(): Call set_value() to show the new value in any other instances of the same field. The details view already does this.
-
Daniel Mustieles García authored
-
- Aug 04, 2010
-
-
Murray Cumming authored
* glom/mode_data/flowtablewithfields.[h|cc]: set_value(), set_other_value(): Avoid copy/pasting of the code.
-
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.
-
- Aug 02, 2010
-
-
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.
-
Murray Cumming authored
-
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.
-
- Jul 27, 2010
-
-
Murray Cumming authored
* tests/test_selfhosting_new_empty.cc: Fix the use of Utils::.
-
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.
-
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.
-
Murray Cumming authored
-
- Jul 25, 2010
-
-
Murray Cumming authored
-
Murray Cumming authored
-
- Jul 24, 2010
-
-
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).
-
- Jul 22, 2010
-
-
Murray Cumming authored
-
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.
-
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.
-
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.
-
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.
-
- Jul 21, 2010
-
-
Murray Cumming authored
* examples/example_smallbusiness.glom: Give some privileges to the accounts and personnel groups and resave-as-an-example. These were probably lost some time.
-
Murray Cumming authored
* glom/libglom/document/document.cc: set_modified(): Actually use m_allow_auto_save so we don't just save every time, overwriting previous saves. For instance, the examples were saved with is_example=false after the document was changed back.
-
Murray Cumming authored
* glom/base_db.[h|cc]: Added set_table_privileges_groups_from_document(). * glom/application.cc: recreate_database_from_example(): call it.
-
Murray Cumming authored
* glom/base_db.[h|cc]: Added add_groups_from_document(). * glom/application.cc: recreate_database_from_example() call it.
-
- Jul 20, 2010
-
-
Murray Cumming authored
* glom/mode_data/notebook_data.cc: * glom/mode_find/notebook_find.cc: Use Gtk::Notebook::append_page() instead of Gtk::Notebook::pages().push_back().
-
- Jul 13, 2010
-
-
Murray Cumming authored
Many files: Try to include box.h or dialog.h before other treemodel.h. Sometimes just add a gtkmm.h to simplify things. This will not be necessary with gtkmm-3.0 (in glom's master branch).
-
- Jul 07, 2010
-
-
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.
-
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.
-
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.
-
- Jul 05, 2010
-
-
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.
-
- Jul 04, 2010
-
-
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().
-