2010-02-28 Murray Cumming <murrayc@murrayc.com> Many files: Rename App_Glom to Application (in namespace Glom). 2010-02-28 Murray Cumming <murrayc@murrayc.com> Python button scripts: Add show_table_details() and show_table_list(). * Makefile_libglom.am: * glom/python_embed/python_module/py_glom_module.cc: * glom/libglom/python_embed/py_glom_ui.[h|cc]: Added a PyGlomUI object that can be passed to python functions in addition to the record object, with methods to navigate in the UI. So far there is just show_table_details() and show_table_list(). * glom/glom_developer.glade: Script editor window: Mention the extra ui parameter. * glom/python_embed/glom_python.[h|cc]: Add a callback object parameter so scripts can tell the caller to change things in the UI. * glom/frame_glom.h: Made show_table() public so that the Application can call it. * glom/application.[h|cc]: Add show_table_details() and add_show_list() methods for the callbacks to call. * glom/mode_data/box_data.[h|cc]: Handle the callback signals, to actually do the navigation when a python script requests it. * glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc: Adapted. 2010-02-27 Murray Cumming <murrayc@murrayc.com> Python: Prevent field calculations from changing the data in other fields. * glom/libglom/python_embed/py_glom_record.[h|cc]: Added set_read_only(). * glom/python_embed/glom_python.[h|cc]: glom_evaluate_python_function_implementation(): Add a bool read_only parameter that defaults to true. glom_execute_python_function_implementation(): Pass read_only=false so scripts can write data to the database via the record object. 2010-02-27 Murray Cumming <murrayc@murrayc.com> Increase required version of libgdamm. * configure.ac: Increase libgdamm dependency to the last one that doesn't need libgda 4.1/4.2. We actually need some API that was not in the older one. 2010-02-27 Murray Cumming <murrayc@murrayc.com> Revert use of SqlBuilder because it requires libgda 4.1, which will not be packaged by the upcoming Ubuntu Lucid, which is an important version of an important distro. 2010-02-27 Murray Cumming <murrayc@murrayc.com> More uses of SqlBuilder for SELECT statements. 2010-02-27 Murray Cumming <murrayc@murrayc.com> Fix runtime problems with the use of SqlBuilder. * glom/base_db.[h|cc]: query_execute_select(), query_execute(): Catch more errors and output better debug and error text. get_database_preferences(): Don't bother catching exceptions already caught by query_execute*(). add_standard_tables(): Fix a typo in the SQL query. insert_example_data(): Work around an inability in GdaSqlBuilder to INSERT a NULL value. I have asked about it on the mailing list. 2010-02-26 Murray Cumming <murrayc@murrayc-desktop> Use Gnome::Gda::SqlBuilder * glom/base_db.[h|cc]: query_execute_select(), query_execute(), auto_increment_insert_first_if_necessary(), recalculate_next_auto_increment_value(), get_next_auto_increment_value(), get_database_preferences(), add_standard_table(), set_database_preferences(), insert_example_data(), set_field_value_in_database(): Use Gnome::Gda::SqlBuilder to simplify query building and to make it safer. Most of this work was actually by Johannes Schmid for Openismus. 2010-02-26 Murray Cumming <murrayc@murrayc.com> Fixed the tests build. * tests/test_python_execute_func.cc: * tests/test_python_execute_func_date.cc: Updated for the extra parameters for glom_evaluate_python_function_implementation(). 2010-02-25 Murray Cumming <murrayc@murrayc.com> Python functions: Allow setting of values in the record via []. * glom/python_embed/python_module/py_glom_module.cc: Specify a setitem(), so python code can use [] syntax to set the record's field values as well as getting them. * glom/libglom/python_embed/py_glom_record.[h|cc]: PyGlomRecord_SetFields(): Take and store the primary key details and value, and use it in setitem() to UPDATE the value in the database. * glom/python_embed/glom_python.[h|cc]: glom_execute_python_function_implementation(), glom_evaluate_python_function_implementation(): Take the primary key field and value. * glom/base_db.cc: * glom/base_db_table_data.cc: * glom/mode_data/box_data.cc: * glom/mode_design/fields/dialog_fieldcalculation.cc: * glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc: Adapted. 2010-02-22 Murray Cumming <murrayc@murrayc.com> Avoid showing %20 in the window title. * glom/libglom/document/bakery/document.cc: get_name(): Use Gio::FileInfo::get_display_name() instead of Glib::filename_display_basename() or Glib::filename_display_name(), to avoid showing %20 in the window title bar when there are spaces in the file name. Noticed by Daniel Borgmann.